]>
git.saurik.com Git - wxWidgets.git/blob - demos/dbbrowse/dbtree.h
1 //----------------------------------------------------------------------------------------
3 // Purpose: Tree with Table and Views, branches show Field information
4 // Author: Mark Johnson
5 // Modified by: 19991129.mj10777
7 // Copyright: (c) Mark Johnson
8 // Licence: wxWindows license
11 //----------------------------------------------------------------------------------------
12 class MainDoc
; // Declared in doc.h file
14 //----------------------------------------------------------------------------------------
15 class DBTreeData
: public wxTreeItemData
18 DBTreeData(const wxString
& desc
) : m_desc(desc
) { }
19 void ShowInfo(wxTreeCtrl
*tree
);
23 //----------------------------------------------------------------------------------------
24 class DBTree
: 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_TAB
, // tab.ico
33 TreeIc_VIEW
, // view.ico
34 TreeIc_COL
, // col.ico
35 TreeIc_KEY
, // key.ico
36 TreeIc_KEYF
, // keyf.ico
37 TreeIc_DocOpen
, // d_open.ico
38 TreeIc_DocClosed
, // d_closed.ico
39 TreeIc_FolderClosed
, // f_closed.ico
40 TreeIc_FolderOpen
// f_open.ico
42 wxString Temp0
, Temp1
, Temp2
, Temp3
, Temp4
, Temp5
;
43 //----------------------------------------------------------------------------------------
45 DBTree(wxWindow
*parent
);
46 DBTree(wxWindow
*parent
, const wxWindowID id
,const wxPoint
& pos
, const wxSize
& size
,long style
);
49 wxDbInf
*ct_BrowserDB
;
50 //----------------------------------------------------------------------------------------
51 int i_TabArt
; // Tab = 0 ; Page = 1;
52 int i_ViewNr
; // View Nummer in Tab / Page
53 int i_Which
; // Which View, Database is this/using
54 wxString s_DSN
; // Name of the Dataset
55 wxMenu
*popupMenu1
; // OnDBClass
56 wxMenu
*popupMenu2
; // OnDBGrid & OnTableclass
58 //----------------------------------------------------------------------------------------
59 wxImageList
*p_imageListNormal
;
60 //----------------------------------------------------------------------------------------
63 void OnSelChanged(wxTreeEvent
& event
);
64 void OnRightSelect(wxTreeEvent
& event
);
65 void OnDBGrid(wxCommandEvent
& event
);
66 void OnDBClass(wxCommandEvent
& event
);
67 void OnTableClass(wxCommandEvent
& event
);
68 void OnTableClassAll(wxCommandEvent
& event
);
69 void OnMouseEvent(wxMouseEvent
& event
);
70 void OnMouseMove(wxMouseEvent
& event
);
72 //----------------------------------------------------------------------------------------
73 // NB: due to an ugly wxMSW hack you _must_ use DECLARE_DYNAMIC_CLASS()
74 // if you want your overloaded OnCompareItems() to be called.
75 // OTOH, if you don't want it you may omit the next line - this will
76 // make default (alphabetical) sorting much faster under wxMSW.
77 DECLARE_DYNAMIC_CLASS(DBTree
)
81 //----------------------------------------------------------------------------------------
82 #define POPUP_01_BEGIN 1100
83 #define DATA_SHOW 1101
85 #define DATA_TABLE 1103
86 #define DATA_TABLE_ALL 1104
87 #define POPUP_01_END 1117
88 //----------------------------------------------------------------------------------------