]>
git.saurik.com Git - wxWidgets.git/blob - samples/sashtest/sashtest.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Layout window/sash sample
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #include <wx/toolbar.h>
14 // Define a new application
15 class MyApp
: public wxApp
21 class MyCanvas
: public wxScrolledWindow
24 MyCanvas(wxWindow
*parent
, const wxPoint
& pos
, const wxSize
& size
);
25 virtual void OnDraw(wxDC
& dc
);
26 void OnEvent(wxMouseEvent
& event
);
32 class MyFrame
: public wxMDIParentFrame
36 MyFrame(wxWindow
*parent
, const wxWindowID id
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
38 void OnSize(wxSizeEvent
& event
);
39 void OnAbout(wxCommandEvent
& event
);
40 void OnNewWindow(wxCommandEvent
& event
);
41 void OnQuit(wxCommandEvent
& event
);
42 void OnToggleWindow(wxCommandEvent
& event
);
43 void OnSashDrag(wxSashEvent
& event
);
46 wxSashLayoutWindow
* m_topWindow
;
47 wxSashLayoutWindow
* m_leftWindow1
;
48 wxSashLayoutWindow
* m_leftWindow2
;
49 wxSashLayoutWindow
* m_bottomWindow
;
54 class MyChild
: public wxMDIChildFrame
58 MyChild(wxMDIParentFrame
*parent
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
60 void OnActivate(wxActivateEvent
& event
);
61 void OnQuit(wxCommandEvent
& event
);
66 #define SASHTEST_QUIT 1
67 #define SASHTEST_NEW_WINDOW 2
68 #define SASHTEST_REFRESH 3
69 #define SASHTEST_CHILD_QUIT 4
70 #define SASHTEST_ABOUT 5
71 #define SASHTEST_TOGGLE_WINDOW 6
73 #define ID_WINDOW_TOP 100
74 #define ID_WINDOW_LEFT1 101
75 #define ID_WINDOW_LEFT2 102
76 #define ID_WINDOW_BOTTOM 103