]> git.saurik.com Git - wxWidgets.git/blob - demos/dbbrowse/pgmctrl.h
Various compiler changes
[wxWidgets.git] / demos / dbbrowse / pgmctrl.h
1 //----------------------------------------------------------------------------------------
2 // Name: pgmctrl.h
3 // Purpose: Programm Control with a Tree
4 // Author: Mark Johnson
5 // Modified by: 19990806.mj10777
6 // Created: 19991010
7 // RCS-ID: $Id$
8 // Copyright: (c) Mark Johnson, Berlin Germany, mj10777@gmx.net
9 // Licence: wxWindows license
10 //----------------------------------------------------------------------------------------
11 class MainDoc; // Declared in doc.h file
12 //----------------------------------------------------------------------------------------
13 class TreeData : public wxTreeItemData
14 {
15 public:
16 TreeData(const wxString& desc) : m_desc(desc) { }
17 void ShowInfo(wxTreeCtrl *tree);
18 wxString m_desc;
19 };
20 //----------------------------------------------------------------------------------------
21 class PgmCtrl : public wxTreeCtrl
22 {
23 public:
24 enum
25 { // The order here must be the same as in m_imageListNormal !
26 TreeIc_Logo, // logo.ico
27 TreeIc_DsnClosed, // dsnclose.ico
28 TreeIc_DsnOpen, // dsnopen.ico
29 TreeIc_DocClosed, // d_closed.ico
30 TreeIc_DocOpen, // d_open.ico
31 TreeIc_FolderClosed, // f_closed.ico
32 TreeIc_FolderOpen // f_open.ico
33 };
34 wxString Temp0, Temp1, Temp2, Temp3, Temp4, Temp5;
35 //----------------------------------------------------------------------------------------
36 PgmCtrl() { }
37 PgmCtrl(wxWindow *parent);
38 PgmCtrl(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const wxSize& size,long style);
39 virtual ~PgmCtrl();
40 MainDoc *pDoc;
41 //----------------------------------------------------------------------------------------
42 int i_TabArt; // Tab = 0 ; Page = 1;
43 int i_ViewNr; // View Nummer in Tab / Page
44 //----------------------------------------------------------------------------------------
45 wxImageList *p_imageListNormal;
46 wxMenu *popupMenu1; // OnDBClass
47 wxPoint TreePos;
48 wxString SaveDSN; // Needed for User and Password
49 //----------------------------------------------------------------------------------------
50 public:
51 int OnPopulate();
52 void OnSelChanged(wxMouseEvent& event);
53 void OnRightSelect(wxTreeEvent& event);
54 void OnMouseMove(wxMouseEvent& event);
55 void OnUserPassword(wxCommandEvent& event);
56
57 public:
58 //----------------------------------------------------------------------------------------
59 // NB: due to an ugly wxMSW hack you _must_ use DECLARE_DYNAMIC_CLASS()
60 // if you want your overloaded OnCompareItems() to be called.
61 // OTOH, if you don't want it you may omit the next line - this will
62 // make default (alphabetical) sorting much faster under wxMSW.
63 DECLARE_DYNAMIC_CLASS(PgmCtrl)
64 DECLARE_EVENT_TABLE()
65 };
66 //----------------------------------------------------------------------------------------
67 #define PGMCTRL_01_BEGIN 1000
68 #define PGMCTRL_ODBC_USER 1001
69 #define PGMCTRL_01_END 1010
70 //----------------------------------------------------------------------------------------