]> git.saurik.com Git - wxWidgets.git/blame_incremental - samples/sashtest/sashtest.h
Turkish translations update from Çağrı Doğan.
[wxWidgets.git] / samples / sashtest / sashtest.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: sashtest.h
3// Purpose: Layout window/sash sample
4// Author: Julian Smart
5// Modified by:
6// Created: 04/01/98
7// Copyright: (c) Julian Smart
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#include "wx/toolbar.h"
12
13// Define a new application
14class MyApp: public wxApp
15{
16 public:
17 bool OnInit(void);
18};
19
20class MyCanvas: public wxScrolledWindow
21{
22 public:
23 MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size);
24 virtual void OnDraw(wxDC& dc);
25 void OnEvent(wxMouseEvent& event);
26
27 DECLARE_EVENT_TABLE()
28};
29
30// Define a new frame
31class MyFrame: public wxMDIParentFrame
32{
33 public:
34
35 MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
36
37 void OnSize(wxSizeEvent& event);
38 void OnAbout(wxCommandEvent& event);
39 void OnNewWindow(wxCommandEvent& event);
40 void OnQuit(wxCommandEvent& event);
41 void OnToggleWindow(wxCommandEvent& event);
42 void OnSashDrag(wxSashEvent& event);
43
44protected:
45 wxSashLayoutWindow* m_topWindow;
46 wxSashLayoutWindow* m_leftWindow1;
47 wxSashLayoutWindow* m_leftWindow2;
48 wxSashLayoutWindow* m_bottomWindow;
49
50DECLARE_EVENT_TABLE()
51};
52
53class MyChild: public wxMDIChildFrame
54{
55 public:
56 MyCanvas *canvas;
57 MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
58 ~MyChild(void);
59 void OnActivate(wxActivateEvent& event);
60 void OnQuit(wxCommandEvent& event);
61
62DECLARE_EVENT_TABLE()
63};
64
65#define SASHTEST_QUIT wxID_EXIT
66#define SASHTEST_NEW_WINDOW 2
67#define SASHTEST_REFRESH 3
68#define SASHTEST_CHILD_QUIT 4
69#define SASHTEST_ABOUT wxID_ABOUT
70#define SASHTEST_TOGGLE_WINDOW 6
71
72#define ID_WINDOW_TOP 100
73#define ID_WINDOW_LEFT1 101
74#define ID_WINDOW_LEFT2 102
75#define ID_WINDOW_BOTTOM 103
76