]>
git.saurik.com Git - wxWidgets.git/blob - utils/framelayout/samples/demo/fl_demo.h
a6a5542bf0396323fd14ad85a63eca82f5bb110d
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Contrib. demo
4 // Author: Aleksandras Gluchovas
8 // Copyright: (c) Aleksandras Gluchovas
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
15 // ID for the menu commands
17 #define MINIMAL_QUIT 1
18 #define MINIMAL_ABOUT 102
22 #define ID_AUTOSAVE 105
23 #define ID_SETTINGS 106
25 #define ID_REMOVEALL 108
26 #define ID_RECREATE 109
27 #define ID_ACTIVATE 110
32 #define ID_SAY_ITSOK 114
33 #define ID_BTN_YES 115
35 #define ID_BTN_ESC 117
39 #define FIRST_LAYOUT 0
40 #define SECOND_LAYOUT 1
41 #define THIRD_LAYOUT 2
46 typedef wxPanel MyTestPanel
;
48 // Define a new application type
50 class MyApp
: public wxApp
56 // Define a new frame type
58 class MyFrame
: public wxFrame
62 wxFrameLayout
* mLayouts
[MAX_LAYOUTS
];
64 wxFrameLayout
* mpNestedLayout
;
65 wxFrameLayout
* mpAboutBoxLayout
;
73 wxTextCtrl
* mpClntWindow
;
74 wxPanel
* mpInternalFrm
;
76 wxImageList mImageList
;
80 // helpers for control-creation
82 wxTextCtrl
* CreateTxtCtrl ( const wxString
& txt
= "wxTextCtrl", wxWindow
* parent
= NULL
);
83 wxTreeCtrl
* CreateTreeCtrl( const wxString
& label
= "TreeCtrl" );
84 wxChoice
* CreateChoice ( const wxString
& txt
= "Choice1" );
85 wxButton
* CreateButton ( const wxString
& label
= "wxButton",
86 wxWindow
* pParent
= NULL
, long id
= ID_SAY_ITSOK
);
88 // helpers for layout-creation
90 void AddSearchToolbars( wxFrameLayout
& layout
, wxWindow
* pParent
);
91 wxWindow
* CreateDevLayout( wxFrameLayout
& layout
, wxWindow
* pParent
);
93 void DropInSomeBars( int layoutNo
);
94 void CreateLayout( int layoutNo
);
95 void RemoveLayout( int layoutNo
);
96 void DestroyEverything();
100 void ActivateLayout( int layoutNo
);
105 MyFrame(wxFrame
*frame
, char *title
,
106 int x
, int y
, int w
, int h
);
110 void SyncMenuBarItems();
116 void OnQuit(wxCommandEvent
& event
);
117 void OnAbout(wxCommandEvent
& event
);
118 void OnSettings( wxCommandEvent
& event
);
119 void OnRemove( wxCommandEvent
& event
);
120 void OnRemoveAll( wxCommandEvent
& event
);
121 void OnRecreate( wxCommandEvent
& event
);
122 void OnFirst( wxCommandEvent
& event
);
123 void OnSecond( wxCommandEvent
& event
);
124 void OnThird( wxCommandEvent
& event
);
126 void OnSayItsOk( wxCommandEvent
& event
);
127 void OnBtnYes( wxCommandEvent
& event
);
128 void OnBtnNo( wxCommandEvent
& event
);
129 void OnBtnEsc( wxCommandEvent
& event
);
131 void OnChar( wxKeyEvent
& event
);
133 DECLARE_EVENT_TABLE()