]>
git.saurik.com Git - wxWidgets.git/blob - utils/framelayout/samples/demo/fl_demo.h
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
44 class wxObjectStorage
;
47 typedef wxPanel MyTestPanel
;
49 // Define a new application type
51 class MyApp
: public wxApp
57 // Define a new frame type
59 class MyFrame
: public wxFrame
63 wxFrameLayout
* mLayouts
[MAX_LAYOUTS
];
65 wxFrameLayout
* mpNestedLayout
;
66 wxFrameLayout
* mpAboutBoxLayout
;
74 wxTextCtrl
* mpClntWindow
;
75 wxPanel
* mpInternalFrm
;
77 wxImageList mImageList
;
81 // helpers for control-creation
83 wxTextCtrl
* CreateTxtCtrl ( const wxString
& txt
= "wxTextCtrl", wxWindow
* parent
= NULL
);
84 wxTreeCtrl
* CreateTreeCtrl( const wxString
& label
= "TreeCtrl" );
85 wxChoice
* CreateChoice ( const wxString
& txt
= "Choice1" );
86 wxButton
* CreateButton ( const wxString
& label
= "wxButton",
87 wxWindow
* pParent
= NULL
, long id
= ID_SAY_ITSOK
);
89 // helpers for layout-creation
91 void AddSearchToolbars( wxFrameLayout
& layout
, wxWindow
* pParent
);
92 wxWindow
* CreateDevLayout( wxFrameLayout
& layout
, wxWindow
* pParent
);
94 void DropInSomeBars( int layoutNo
);
95 void CreateLayout( int layoutNo
);
96 void RemoveLayout( int layoutNo
);
97 void DestroyEverything();
101 void ActivateLayout( int layoutNo
);
103 void SerializeMe( wxObjectStorage
& store
);
107 MyFrame(wxFrame
*frame
, char *title
,
108 int x
, int y
, int w
, int h
);
112 void SyncMenuBarItems();
118 void OnLoad( wxCommandEvent
& event
);
119 void OnStore( wxCommandEvent
& event
);
120 void OnAutoSave( wxCommandEvent
& event
);
121 void OnQuit(wxCommandEvent
& event
);
122 void OnAbout(wxCommandEvent
& event
);
123 void OnSettings( wxCommandEvent
& event
);
124 void OnRemove( wxCommandEvent
& event
);
125 void OnRemoveAll( wxCommandEvent
& event
);
126 void OnRecreate( wxCommandEvent
& event
);
127 void OnFirst( wxCommandEvent
& event
);
128 void OnSecond( wxCommandEvent
& event
);
129 void OnThird( wxCommandEvent
& event
);
131 void OnSayItsOk( wxCommandEvent
& event
);
132 void OnBtnYes( wxCommandEvent
& event
);
133 void OnBtnNo( wxCommandEvent
& event
);
134 void OnBtnEsc( wxCommandEvent
& event
);
136 void OnChar( wxKeyEvent
& event
);
138 DECLARE_EVENT_TABLE()