]>
git.saurik.com Git - wxWidgets.git/blob - samples/sashtest/sashtest.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Layout window/sash sample
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #include "wx/toolbar.h"
13 // Define a new application
14 class MyApp
: public wxApp
20 class MyCanvas
: public wxScrolledWindow
23 MyCanvas(wxWindow
*parent
, const wxPoint
& pos
, const wxSize
& size
);
24 virtual void OnDraw(wxDC
& dc
);
25 void OnEvent(wxMouseEvent
& event
);
31 class MyFrame
: public wxMDIParentFrame
35 MyFrame(wxWindow
*parent
, const wxWindowID id
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
37 void OnSize(wxSizeEvent
& event
);
38 void OnAbout(wxCommandEvent
& event
);
39 void OnNewWindow(wxCommandEvent
& event
);
40 void OnQuit(wxCommandEvent
& event
);
41 void OnToggleWindow(wxCommandEvent
& event
);
42 void OnSashDrag(wxSashEvent
& event
);
45 wxSashLayoutWindow
* m_topWindow
;
46 wxSashLayoutWindow
* m_leftWindow1
;
47 wxSashLayoutWindow
* m_leftWindow2
;
48 wxSashLayoutWindow
* m_bottomWindow
;
53 class MyChild
: public wxMDIChildFrame
57 MyChild(wxMDIParentFrame
*parent
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
59 void OnActivate(wxActivateEvent
& event
);
60 void OnQuit(wxCommandEvent
& event
);
65 #define SASHTEST_QUIT wxID_EXIT
66 #define SASHTEST_NEW_WINDOW 2
67 #define SASHTEST_REFRESH 3
68 #define SASHTEST_CHILD_QUIT 4
69 #define SASHTEST_ABOUT wxID_ABOUT
70 #define SASHTEST_TOGGLE_WINDOW 6
72 #define ID_WINDOW_TOP 100
73 #define ID_WINDOW_LEFT1 101
74 #define ID_WINDOW_LEFT2 102
75 #define ID_WINDOW_BOTTOM 103