]>
git.saurik.com Git - wxWidgets.git/blob - demos/dbbrowse/pgmctrl.h
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 MainDoc
; // Declared in doc.h file
12 //----------------------------------------------------------------------------------------
13 class TreeData
: public wxTreeItemData
16 TreeData(const wxString
& desc
) : m_desc(desc
) { }
17 void ShowInfo(wxTreeCtrl
*tree
);
20 //----------------------------------------------------------------------------------------
21 class PgmCtrl
: public wxTreeCtrl
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
34 wxString Temp0
, Temp1
, Temp2
, Temp3
, Temp4
, Temp5
;
35 //----------------------------------------------------------------------------------------
37 PgmCtrl(wxWindow
*parent
);
38 PgmCtrl(wxWindow
*parent
, const wxWindowID id
,const wxPoint
& pos
, const wxSize
& size
,long style
);
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
48 wxString SaveDSN
; // Needed for User and Password
49 //----------------------------------------------------------------------------------------
52 void OnSelChanged(wxTreeEvent
& event
);
53 void OnRightSelect(wxTreeEvent
& event
);
54 void OnMouseMove(wxMouseEvent
& event
);
55 void OnUserPassword();
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
)
66 //----------------------------------------------------------------------------------------
67 #define PGMCTRL_01_BEGIN 1000
68 #define PGMCTRL_ODBC_USER 1001
69 #define PGMCTRL_01_END 1010
70 //----------------------------------------------------------------------------------------