X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c09d434d55bc73de619e14c99ac2e3777c77a298..38cfbffa153c8835025b4207faaf0a12b0b53e6f:/demos/dbbrowse/dbtree.h diff --git a/demos/dbbrowse/dbtree.h b/demos/dbbrowse/dbtree.h index 823e3be478..0ed916390d 100644 --- a/demos/dbbrowse/dbtree.h +++ b/demos/dbbrowse/dbtree.h @@ -1,25 +1,23 @@ -//--------------------------------------------------------------------------- -// Name: DBTree.h -// Purpose: Shows ODBC Catalog entries for Databases +//---------------------------------------------------------------------------------------- +// Name: DBTree.cpp/.h +// Purpose: Tree with Table and Views, branches show Field information // Author: Mark Johnson // Modified by: 19991129.mj10777 // Created: 19991129 // Copyright: (c) Mark Johnson // Licence: wxWindows license // RCS-ID: $Id$ -//--------------------------------------------------------------------------- -class mjDoc; // Declared in Doc.h file -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- +class MainDoc; // Declared in Doc.h file +//---------------------------------------------------------------------------------------- class DBTreeData : public wxTreeItemData { public: DBTreeData(const wxString& desc) : m_desc(desc) { } - void ShowInfo(wxTreeCtrl *tree); - - wxString m_desc; + wxString m_desc; }; -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- class DBTree : public wxTreeCtrl { public: @@ -29,23 +27,24 @@ class DBTree : public wxTreeCtrl TreeIc_DsnClosed, // dsnclose.ico TreeIc_DsnOpen, // dsnopen.ico TreeIc_TAB, // tab.ico + TreeIc_VIEW, // view.ico TreeIc_COL, // col.ico TreeIc_KEY, // key.ico TreeIc_KEYF, // keyf.ico - TreeIc_DocClosed, // d_closed.ico TreeIc_DocOpen, // d_open.ico + TreeIc_DocClosed, // d_closed.ico TreeIc_FolderClosed, // f_closed.ico TreeIc_FolderOpen // f_open.ico }; wxString Temp0, Temp1, Temp2, Temp3, Temp4, Temp5; -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- DBTree() { } DBTree(wxWindow *parent); DBTree(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const wxSize& size,long style); virtual ~DBTree(); - mjDoc *pDoc; + MainDoc *pDoc; wxDbInf *ct_BrowserDB; -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- int i_TabArt; // Tab = 0 ; Page = 1; int i_ViewNr; // View Nummer in Tab / Page int i_Which; // Which View, Database is this/using @@ -53,21 +52,21 @@ class DBTree : public wxTreeCtrl wxMenu *popupMenu1; // OnDBClass wxMenu *popupMenu2; // OnDBGrid & OnTableclass wxPoint TreePos; -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- wxImageList *p_imageListNormal; -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- public: int OnPopulate(); void OnSelChanged(wxTreeEvent& event); void OnRightSelect(wxTreeEvent& event); - void OnDBGrid(wxMenu& menu, wxCommandEvent& event); - void OnDBClass(wxMenu& menu, wxCommandEvent& event); - void OnTableClass(wxMenu& menu, wxCommandEvent& event); - void OnTableClassAll(wxMenu& menu, wxCommandEvent& event); + void OnDBGrid(wxCommandEvent& event); + void OnDBClass(wxCommandEvent& event); + void OnTableClass(wxCommandEvent& event); + void OnTableClassAll(wxCommandEvent& event); void OnMouseEvent(wxMouseEvent& event); void OnMouseMove(wxMouseEvent& event); public: -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- // NB: due to an ugly wxMSW hack you _must_ use DECLARE_DYNAMIC_CLASS() // if you want your overloaded OnCompareItems() to be called. // OTOH, if you don't want it you may omit the next line - this will @@ -75,11 +74,11 @@ class DBTree : public wxTreeCtrl DECLARE_DYNAMIC_CLASS(DBTree) DECLARE_EVENT_TABLE() }; -//------------------------------------------------------------------------------ +//---------------------------------------------------------------------------------------- #define POPUP_01_BEGIN 1100 #define DATA_SHOW 1101 #define DATA_DB 1102 #define DATA_TABLE 1103 #define DATA_TABLE_ALL 1104 #define POPUP_01_END 1117 -//------------------------------------------------------------------------------ +//----------------------------------------------------------------------------------------