]> git.saurik.com Git - wxWidgets.git/blame - samples/mdi/mdi.h
fixed arguments to make it wxMSW compatible
[wxWidgets.git] / samples / mdi / mdi.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: mdi.cpp
3// Purpose: MDI sample
4// Author: Julian Smart
5// Modified by:
6// Created: 04/01/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart and Markus Holzem
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
6b0eb19f
JS
12#ifdef __WINDOWS__
13#ifdef __WIN95__
14#define wxToolBar wxToolBar95
15#else
16#define wxToolBar wxToolBarMSW
17#endif
18#endif
19
c801d85f
KB
20// Define a new application
21class MyApp: public wxApp
22{
23 public:
24 bool OnInit(void);
25};
26
27class MyCanvas: public wxScrolledWindow
28{
29 public:
30 MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size);
31 virtual void OnDraw(wxDC& dc);
32 void OnEvent(wxMouseEvent& event);
33
34 DECLARE_EVENT_TABLE()
35};
36
37#ifdef __WINDOWS__
38
6b0eb19f 39class TestRibbon: public wxToolBar
c801d85f
KB
40{
41 public:
42 TestRibbon(wxFrame *frame, int x = 0, int y = 0, int w = -1, int h = -1,
43 long style = wxNO_BORDER, int direction = wxVERTICAL, int RowsOrColumns = 2);
44 bool OnLeftClick(int toolIndex, bool toggled);
45 void OnMouseEnter(int toolIndex);
46 void OnPaint(wxPaintEvent& event);
47
48 DECLARE_EVENT_TABLE()
49};
50
51#endif
52
53// Define a new frame
54class MyFrame: public wxMDIParentFrame
55{
56 public:
57 wxTextCtrl *textWindow;
58
59#ifdef __WINDOWS__
60 TestRibbon* toolBar;
61#endif
62
63 MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
64 bool OnClose(void);
65 void OnSize(wxSizeEvent& event);
66 void OnAbout(wxCommandEvent& event);
67 void OnNewWindow(wxCommandEvent& event);
68 void OnQuit(wxCommandEvent& event);
69
70DECLARE_EVENT_TABLE()
71};
72
73class MyChild: public wxMDIChildFrame
74{
75 public:
76 MyCanvas *canvas;
77 MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
78 ~MyChild(void);
79 bool OnClose(void);
80 void OnActivate(wxActivateEvent& event);
81 void OnQuit(wxCommandEvent& event);
82
83DECLARE_EVENT_TABLE()
84};
85
86#define MDI_QUIT 1
87#define MDI_NEW_WINDOW 2
88#define MDI_REFRESH 3
89#define MDI_CHILD_QUIT 4
90#define MDI_ABOUT 5