Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Application.h>
- #include <Button.h>
- #include <LayoutBuilder.h>
- #include <StringView.h>
- #include <Window.h>
- BView*
- _AlignedStringView(const char* str)
- {
- BStringView* view = new BStringView("", str);
- view->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT, B_ALIGN_TOP));
- return view;
- }
- int main()
- {
- new BApplication("application/x-vnd.test.stringview");
- BWindow* window = new BWindow(BRect(100, 100, 300, 300),
- "STringview test", B_TITLED_WINDOW, B_AUTO_UPDATE_SIZE_LIMITS);
- BLayoutBuilder::Group<>(window, B_VERTICAL)
- .Add(_AlignedStringView("bhal"))
- .Add(new BStringView("", "AAAAAAAAAAAAAAAAAAAAAAA"))
- .Add(new BStringView("", "ZoooP!"));
- window->Show();
- be_app->Run();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement