]>
git.saurik.com Git - wxWidgets.git/blob - demos/dbbrowse/pgmctrl.h
abbe978aa7d7f8f189e2c491f01f5998c552767c
1 //---------------------------------------------------------------------------
3 // Purpose: Programm Control with a Tree
4 // Author: Mark Johnson
5 // Modified by: 19990806.mj10777
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
16 TreeData(const wxString
& desc
) : m_desc(desc
) { }
18 void ShowInfo(wxTreeCtrl
*tree
);
22 //---------------------------------------------------------------------------
23 class PgmCtrl
: public wxTreeCtrl
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
36 wxString Temp0
, Temp1
, Temp2
, Temp3
, Temp4
, Temp5
;
37 //---------------------------------------------------------------------------
39 PgmCtrl(wxWindow
*parent
);
40 PgmCtrl(wxWindow
*parent
, const wxWindowID id
,const wxPoint
& pos
, const wxSize
& size
,long style
);
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
50 wxString SaveDSN
; // Needed for User and Password
51 //---------------------------------------------------------------------------
54 void OnSelChanged(wxTreeEvent
& event
);
55 void OnRightSelect(wxTreeEvent
& event
);
56 void OnMouseMove(wxMouseEvent
& event
);
57 void OnUserPassword();
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
)
68 //---------------------------------------------------------------------------
69 #define PGMCTRL_01_BEGIN 1000
70 #define PGMCTRL_ODBC_USER 1001
71 #define PGMCTRL_01_END 1010
72 //---------------------------------------------------------------------------