]> git.saurik.com Git - wxWidgets.git/blame - contrib/samples/foldbar/extended/extended.h
Re-adding setup0.h for OpenWatcom makefile build.
[wxWidgets.git] / contrib / samples / foldbar / extended / extended.h
CommitLineData
957f5ab7
VZ
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"
7e3c8a02 12#include "wx/foldbar/foldpanelbar.h"
957f5ab7
VZ
13
14wxMenuBar *CreateMenuBar(bool with_window);
15
16enum
17{
c74ca0c0
WS
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
957f5ab7
VZ
25};
26
27// Define a new application
28class MyApp: public wxApp
29{
30 public:
31 bool OnInit(void);
32};
33
34class 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
45class 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
c74ca0c0
WS
60 void OnCollapseMe(wxCommandEvent &event);
61 void OnExpandMe(wxCommandEvent &event);
957f5ab7 62
c74ca0c0 63 void OnSlideColour(wxScrollEvent &event);
957f5ab7 64
c74ca0c0 65 void OnStyleChange(wxCommandEvent &event);
957f5ab7
VZ
66
67protected:
68 wxSashLayoutWindow* m_leftWindow1;
69
70private:
c74ca0c0
WS
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;
957f5ab7
VZ
77
78DECLARE_EVENT_TABLE()
79};
80
81class 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
90DECLARE_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