]>
git.saurik.com Git - wxWidgets.git/blob - contrib/samples/foldbar/extended/extended.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Layout/foldpanelbar sample
4 // Author: Jorgen Bodde
7 // Copyright: Jorgen Bodde based upon FoldPanelBar sample (c) Julian Smart
8 // Licence: wxWindows license
9 /////////////////////////////////////////////////////////////////////////////
11 #include "wx/toolbar.h"
12 #include "wx/foldbar/foldpanelbar.h"
14 wxMenuBar
*CreateMenuBar(bool with_window
);
18 ID_COLLAPSEME
= 10000,
24 ID_USE_FILLED_RECTANGLE
27 // Define a new application
28 class MyApp
: public wxApp
34 class MyCanvas
: public wxScrolledWindow
37 MyCanvas(wxWindow
*parent
, const wxPoint
& pos
, const wxSize
& size
);
38 virtual void OnDraw(wxDC
& dc
);
39 void OnEvent(wxMouseEvent
& event
);
45 class MyFrame
: public wxMDIParentFrame
49 MyFrame(wxWindow
*parent
, const wxWindowID id
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
51 void OnSize(wxSizeEvent
& event
);
52 void OnAbout(wxCommandEvent
& event
);
53 void OnNewWindow(wxCommandEvent
& event
);
54 void OnQuit(wxCommandEvent
& event
);
55 void OnToggleWindow(wxCommandEvent
& event
);
56 void OnFoldPanelBarDrag(wxSashEvent
& event
);
57 void OnCreateBottomStyle(wxCommandEvent
& event
);
58 void OnCreateNormalStyle(wxCommandEvent
& event
);
60 void OnCollapseMe(wxCommandEvent
&event
);
61 void OnExpandMe(wxCommandEvent
&event
);
63 void OnSlideColour(wxScrollEvent
&event
);
65 void OnStyleChange(wxCommandEvent
&event
);
68 wxSashLayoutWindow
* m_leftWindow1
;
71 void ReCreateFoldPanel(int fpb_flags
);
72 wxFoldPanelBar
*m_pnl
;
75 wxSlider
*m_rslider1
, *m_gslider1
, *m_bslider1
, *m_rslider2
, *m_gslider2
, *m_bslider2
;
81 class MyChild
: public wxMDIChildFrame
85 MyChild(wxMDIParentFrame
*parent
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
, const long style
);
87 void OnActivate(wxActivateEvent
& event
);
88 void OnQuit(wxCommandEvent
& event
);
93 #define FPBTEST_QUIT 1
94 #define FPBTEST_NEW_WINDOW 2
95 #define FPBTEST_REFRESH 3
96 #define FPBTEST_CHILD_QUIT 4
97 #define FPBTEST_ABOUT 5
98 #define FPBTEST_TOGGLE_WINDOW 6
99 #define FPB_BOTTOM_STICK 7
100 #define FPB_SINGLE_FOLD 8
102 #define ID_WINDOW_TOP 100
103 #define ID_WINDOW_LEFT1 101
104 #define ID_WINDOW_LEFT2 102
105 #define ID_WINDOW_BOTTOM 103