]>
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
11 //----------------------------------------------------------------------------------------
12 class MainDoc
; // Declared in doc.h file
14 //----------------------------------------------------------------------------------------
15 class TreeData
: public wxTreeItemData
18 TreeData(const wxString
& desc
) : m_desc(desc
) { }
19 void ShowInfo(wxTreeCtrl
*tree
);
23 //----------------------------------------------------------------------------------------
24 class PgmCtrl
: public wxTreeCtrl
28 { // The order here must be the same as in m_imageListNormal !
29 TreeIc_Logo
, // logo.ico
30 TreeIc_DsnClosed
, // dsnclose.ico
31 TreeIc_DsnOpen
, // dsnopen.ico
32 TreeIc_DocClosed
, // d_closed.ico
33 TreeIc_DocOpen
, // d_open.ico
34 TreeIc_FolderClosed
, // f_closed.ico
35 TreeIc_FolderOpen
// f_open.ico
37 wxString Temp0
, Temp1
, Temp2
, Temp3
, Temp4
, Temp5
;
38 //----------------------------------------------------------------------------------------
40 PgmCtrl(wxWindow
*parent
);
41 PgmCtrl(wxWindow
*parent
, const wxWindowID id
,const wxPoint
& pos
, const wxSize
& size
,long style
);
44 //----------------------------------------------------------------------------------------
45 int i_TabArt
; // Tab = 0 ; Page = 1;
46 int i_ViewNr
; // View Nummer in Tab / Page
47 //----------------------------------------------------------------------------------------
48 wxImageList
*p_imageListNormal
;
49 wxMenu
*popupMenu1
; // OnDBClass
51 wxString SaveDSN
; // Needed for User and Password
52 //----------------------------------------------------------------------------------------
55 void OnSelChanged(wxMouseEvent
& event
);
56 void OnRightSelect(wxTreeEvent
& event
);
57 void OnMouseMove(wxMouseEvent
& event
);
58 void OnUserPassword(wxCommandEvent
& event
);
61 //----------------------------------------------------------------------------------------
62 // NB: due to an ugly wxMSW hack you _must_ use DECLARE_DYNAMIC_CLASS()
63 // if you want your overloaded OnCompareItems() to be called.
64 // OTOH, if you don't want it you may omit the next line - this will
65 // make default (alphabetical) sorting much faster under wxMSW.
66 DECLARE_DYNAMIC_CLASS(PgmCtrl
)
70 //----------------------------------------------------------------------------------------
71 #define PGMCTRL_01_BEGIN 1000
72 #define PGMCTRL_ODBC_USER 1001
73 #define PGMCTRL_01_END 1010
74 //----------------------------------------------------------------------------------------