]> git.saurik.com Git - wxWidgets.git/blob - contrib/samples/foldbar/extended/extended.h
Removed useless pragma after fixing code to use insigned ints.
[wxWidgets.git] / contrib / samples / foldbar / extended / extended.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: extended.h
3 // Purpose: Layout/foldpanelbar sample
4 // Author: Jorgen Bodde
5 // Modified by:
6 // Created: 24/07/2004
7 // Copyright: Jorgen Bodde based upon FoldPanelBar sample (c) Julian Smart
8 // Licence: wxWindows license
9 /////////////////////////////////////////////////////////////////////////////
10
11 #include "wx/toolbar.h"
12 #include "wx/foldbar/foldpanelbar.h"
13
14 wxMenuBar *CreateMenuBar(bool with_window);
15
16 enum
17 {
18 ID_COLLAPSEME = 10000,
19 ID_APPLYTOALL,
20 ID_USE_HGRADIENT,
21 ID_USE_VGRADIENT,
22 ID_USE_SINGLE,
23 ID_USE_RECTANGLE,
24 ID_USE_FILLED_RECTANGLE
25 };
26
27 // Define a new application
28 class MyApp: public wxApp
29 {
30 public:
31 bool OnInit(void);
32 };
33
34 class MyCanvas: public wxScrolledWindow
35 {
36 public:
37 MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size);
38 virtual void OnDraw(wxDC& dc);
39 void OnEvent(wxMouseEvent& event);
40
41 DECLARE_EVENT_TABLE()
42 };
43
44 // Define a new frame
45 class MyFrame: public wxMDIParentFrame
46 {
47 public:
48
49 MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
50
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);
59
60 void OnCollapseMe(wxCommandEvent &event);
61 void OnExpandMe(wxCommandEvent &event);
62
63 void OnSlideColour(wxScrollEvent &event);
64
65 void OnStyleChange(wxCommandEvent &event);
66
67 protected:
68 wxSashLayoutWindow* m_leftWindow1;
69
70 private:
71 void ReCreateFoldPanel(int fpb_flags);
72 wxFoldPanelBar *m_pnl;
73 wxButton *m_btn;
74 wxCheckBox *m_single;
75 wxSlider *m_rslider1, *m_gslider1, *m_bslider1, *m_rslider2, *m_gslider2, *m_bslider2;
76 int m_flags;
77
78 DECLARE_EVENT_TABLE()
79 };
80
81 class MyChild: public wxMDIChildFrame
82 {
83 public:
84 MyCanvas *canvas;
85 MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
86 ~MyChild(void);
87 void OnActivate(wxActivateEvent& event);
88 void OnQuit(wxCommandEvent& event);
89
90 DECLARE_EVENT_TABLE()
91 };
92
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
101
102 #define ID_WINDOW_TOP 100
103 #define ID_WINDOW_LEFT1 101
104 #define ID_WINDOW_LEFT2 102
105 #define ID_WINDOW_BOTTOM 103
106