]>
git.saurik.com Git - wxWidgets.git/blob - samples/sashtest/sashtest.h
ed5fa54197de3782653062af6b3a0c8a5788e410
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
);
39 void OnSize(wxSizeEvent
& event
);
40 void OnAbout(wxCommandEvent
& event
);
41 void OnNewWindow(wxCommandEvent
& event
);
42 void OnQuit(wxCommandEvent
& event
);
43 void OnToggleWindow(wxCommandEvent
& event
);
44 void OnSashDrag(wxSashEvent
& event
);
47 wxSashLayoutWindow
* m_topWindow
;
48 wxSashLayoutWindow
* m_leftWindow1
;
49 wxSashLayoutWindow
* m_leftWindow2
;
50 wxSashLayoutWindow
* m_bottomWindow
;
55 class MyChild
: public wxMDIChildFrame
59 MyChild(wxMDIParentFrame
*parent
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
62 void OnActivate(wxActivateEvent
& event
);
63 void OnQuit(wxCommandEvent
& event
);
68 #define SASHTEST_QUIT 1
69 #define SASHTEST_NEW_WINDOW 2
70 #define SASHTEST_REFRESH 3
71 #define SASHTEST_CHILD_QUIT 4
72 #define SASHTEST_ABOUT 5
73 #define SASHTEST_TOGGLE_WINDOW 6
75 #define ID_WINDOW_TOP 100
76 #define ID_WINDOW_LEFT1 101
77 #define ID_WINDOW_LEFT2 102
78 #define ID_WINDOW_BOTTOM 103