1 /* 2 * Copyright 2010, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Clemens Zeidler <haiku@clemens-zeidler.de> 7 */ 8 #ifndef WINDOW_STACK_TEST_H 9 #define WINDOW_STACK_TEST_H 10 11 #include <Box.h> 12 #include <Button.h> 13 #include <GroupLayoutBuilder.h> 14 #include <ListView.h> 15 #include <StringItem.h> 16 #include <StringView.h> 17 18 19 class BWindow; 20 21 22 class WindowListItem : public BStringItem 23 { 24 public: 25 WindowListItem(const char* text, BWindow* window); 26 27 BWindow* Window() { return fWindow; } 28 29 private: 30 BWindow* fWindow; 31 }; 32 33 34 class MainView : public BBox 35 { 36 public: 37 MainView(); 38 virtual ~MainView() {} 39 40 virtual void AttachedToWindow(); 41 virtual void MessageReceived(BMessage* message); 42 43 private: 44 BStringView* fStackedWindowsLabel; 45 BListView* fStackedWindowsList; 46 BButton* fGetWindowsButton; 47 BButton* fAddWindowButton; 48 BButton* fRemoveWindowButton; 49 }; 50 51 52 #endif 53