]> git.saurik.com Git - wxWidgets.git/blame - demos/dbbrowse/pgmctrl.h
minor fixes to #include
[wxWidgets.git] / demos / dbbrowse / pgmctrl.h
CommitLineData
c92b0f9a 1//----------------------------------------------------------------------------------------
b5ffecfc
GT
2// Name: pgmctrl.h
3// Purpose: Programm Control with a Tree
4// Author: Mark Johnson
5// Modified by: 19990806.mj10777
6// Created: 19991010
c09d434d 7// RCS-ID: $Id$
829c421b 8// Copyright: (c) Mark Johnson, Berlin Germany
b5ffecfc 9// Licence: wxWindows license
645889ad 10
c92b0f9a 11//----------------------------------------------------------------------------------------
3fa0976a 12class MainDoc; // Declared in doc.h file
645889ad 13
c92b0f9a 14//----------------------------------------------------------------------------------------
b5ffecfc
GT
15class TreeData : public wxTreeItemData
16{
645889ad
GT
17public:
18 TreeData(const wxString& desc) : m_desc(desc) { }
19 void ShowInfo(wxTreeCtrl *tree);
20 wxString m_desc;
b5ffecfc 21};
645889ad 22
c92b0f9a 23//----------------------------------------------------------------------------------------
b5ffecfc
GT
24class PgmCtrl : public wxTreeCtrl
25{
645889ad
GT
26public:
27 enum
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
36 };
37 wxString Temp0, Temp1, Temp2, Temp3, Temp4, Temp5;
38 //----------------------------------------------------------------------------------------
39 PgmCtrl() { }
40 PgmCtrl(wxWindow *parent);
41 PgmCtrl(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const wxSize& size,long style);
42 virtual ~PgmCtrl();
43 MainDoc *pDoc;
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
50 wxPoint TreePos;
51 wxString SaveDSN; // Needed for User and Password
52 //----------------------------------------------------------------------------------------
53public:
54 int OnPopulate();
55 void OnSelChanged(wxMouseEvent& event);
56 void OnRightSelect(wxTreeEvent& event);
57 void OnMouseMove(wxMouseEvent& event);
58 void OnUserPassword(wxCommandEvent& event);
59
60public:
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)
67 DECLARE_EVENT_TABLE()
b5ffecfc 68};
645889ad 69
c92b0f9a 70//----------------------------------------------------------------------------------------
b5ffecfc
GT
71#define PGMCTRL_01_BEGIN 1000
72#define PGMCTRL_ODBC_USER 1001
73#define PGMCTRL_01_END 1010
c92b0f9a 74//----------------------------------------------------------------------------------------