]> git.saurik.com Git - wxWidgets.git/blob - demos/dbbrowse/pgmctrl.h
dbbrowse.rc dbgrid.cpp dbtree.cpp dbtree.h help.de/icons.htm
[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 mjDoc; // Declared in doc.h file
12 //---------------------------------------------------------------------------
13 class TreeData : public wxTreeItemData
14 {
15 public:
16 TreeData(const wxString& desc) : m_desc(desc) { }
17
18 void ShowInfo(wxTreeCtrl *tree);
19
20 wxString m_desc;
21 };
22 //---------------------------------------------------------------------------
23 class PgmCtrl : public wxTreeCtrl
24 {
25 public:
26 enum
27 { // The order here must be the same as in m_imageListNormal !
28 TreeIc_Logo, // logo.ico
29 TreeIc_DsnClosed, // dsnclose.ico
30 TreeIc_DsnOpen, // dsnopen.ico
31 TreeIc_DocClosed, // d_closed.ico
32 TreeIc_DocOpen, // d_open.ico
33 TreeIc_FolderClosed, // f_closed.ico
34 TreeIc_FolderOpen // f_open.ico
35 };
36 wxString Temp0, Temp1, Temp2, Temp3, Temp4, Temp5;
37 //---------------------------------------------------------------------------
38 PgmCtrl() { }
39 PgmCtrl(wxWindow *parent);
40 PgmCtrl(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const wxSize& size,long style);
41 virtual ~PgmCtrl();
42 mjDoc *pDoc;
43 //---------------------------------------------------------------------------
44 int i_TabArt; // Tab = 0 ; Page = 1;
45 int i_ViewNr; // View Nummer in Tab / Page
46 //---------------------------------------------------------------------------
47 wxImageList *p_imageListNormal;
48 wxMenu *popupMenu1; // OnDBClass
49 wxPoint TreePos;
50 wxString SaveDSN; // Needed for User and Password
51 //---------------------------------------------------------------------------
52 public:
53 int OnPopulate();
54 void OnSelChanged(wxTreeEvent& event);
55 void OnRightSelect(wxTreeEvent& event);
56 void OnMouseMove(wxMouseEvent& event);
57 void OnUserPassword();
58
59 public:
60 //---------------------------------------------------------------------------
61 // NB: due to an ugly wxMSW hack you _must_ use DECLARE_DYNAMIC_CLASS()
62 // if you want your overloaded OnCompareItems() to be called.
63 // OTOH, if you don't want it you may omit the next line - this will
64 // make default (alphabetical) sorting much faster under wxMSW.
65 DECLARE_DYNAMIC_CLASS(PgmCtrl)
66 DECLARE_EVENT_TABLE()
67 };
68 //---------------------------------------------------------------------------
69 #define PGMCTRL_01_BEGIN 1000
70 #define PGMCTRL_ODBC_USER 1001
71 #define PGMCTRL_01_END 1010
72 //---------------------------------------------------------------------------