]> git.saurik.com Git - wxWidgets.git/blob - samples/treelay/treelay.h
update libpng-dev deps.
[wxWidgets.git] / samples / treelay / treelay.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: treelay.h
3 // Purpose: wxTreeLayout sample
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 7/4/98
7 // RCS-ID: $Id$
8 // Copyright: (c) 1998 Julian Smart
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 // Define a new application
13 class MyApp: public wxApp
14 {
15 public:
16 virtual bool OnInit();
17 virtual int OnExit();
18 void TreeTest(wxTreeLayoutStored& tree, wxDC& dc);
19 };
20
21 DECLARE_APP(MyApp)
22
23 class MyCanvas;
24
25 class MyFrame: public wxFrame
26 {
27 public:
28 MyCanvas *canvas;
29 MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size);
30
31 void OnCloseWindow(wxCloseEvent& event);
32 void OnQuit(wxCommandEvent& event);
33 void OnAbout(wxCommandEvent& event);
34 void OnLeftRight(wxCommandEvent& event);
35 void OnTopBottom(wxCommandEvent& event);
36
37 DECLARE_EVENT_TABLE()
38 };
39
40 // Define a new canvas which can receive some events
41 class MyCanvas: public wxScrolledWindow
42 {
43 public:
44 MyCanvas(wxWindow *frame);
45 void OnPaint(wxPaintEvent& event);
46 void OnEvent(wxMouseEvent& event);
47 void OnChar(wxKeyEvent& event);
48 DECLARE_EVENT_TABLE()
49 };
50
51 #define TEST_QUIT 1
52 #define TEST_ABOUT 2
53 #define TEST_LEFT_RIGHT 3
54 #define TEST_TOP_BOTTOM 4
55