]> git.saurik.com Git - wxWidgets.git/blame - contrib/samples/foldbar/extended/extended.h
Get rid of wxFontMapper in wxBase library.
[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"
12#include "foldpanelbar.h"
13
14wxMenuBar *CreateMenuBar(bool with_window);
15
16enum
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
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
60 void OnCollapseMe(wxCommandEvent &event);
61 void OnExpandMe(wxCommandEvent &event);
62
63 void OnSlideColour(wxScrollEvent &event);
64
65 void OnStyleChange(wxCommandEvent &event);
66
67protected:
68 wxSashLayoutWindow* m_leftWindow1;
69
70private:
71 void ReCreateFoldPanel(int fpb_flags);
72 wxFoldPanelBar *_pnl;
73 wxButton *_btn;
74 wxCheckBox *_single;
75 wxSlider *_rslider1, *_gslider1, *_bslider1, *_rslider2, *_gslider2, *_bslider2;
76 int _flags;
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