]> git.saurik.com Git - wxWidgets.git/blame - demos/dbbrowse/pgmctrl.h
Updates to wxFrame to include SHowFullScreen method
[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$
b5ffecfc
GT
8// Copyright: (c) Mark Johnson, Berlin Germany, mj10777@gmx.net
9// Licence: wxWindows license
c92b0f9a 10//----------------------------------------------------------------------------------------
3fa0976a 11class MainDoc; // Declared in doc.h file
c92b0f9a 12//----------------------------------------------------------------------------------------
b5ffecfc
GT
13class TreeData : public wxTreeItemData
14{
c92b0f9a 15 public:
b5ffecfc 16 TreeData(const wxString& desc) : m_desc(desc) { }
b5ffecfc 17 void ShowInfo(wxTreeCtrl *tree);
c92b0f9a 18 wxString m_desc;
b5ffecfc 19};
c92b0f9a 20//----------------------------------------------------------------------------------------
b5ffecfc
GT
21class PgmCtrl : public wxTreeCtrl
22{
23 public:
24 enum
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
33 };
34 wxString Temp0, Temp1, Temp2, Temp3, Temp4, Temp5;
c92b0f9a 35//----------------------------------------------------------------------------------------
b5ffecfc
GT
36 PgmCtrl() { }
37 PgmCtrl(wxWindow *parent);
38 PgmCtrl(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const wxSize& size,long style);
39 virtual ~PgmCtrl();
3fa0976a 40 MainDoc *pDoc;
c92b0f9a 41//----------------------------------------------------------------------------------------
b5ffecfc
GT
42 int i_TabArt; // Tab = 0 ; Page = 1;
43 int i_ViewNr; // View Nummer in Tab / Page
c92b0f9a 44//----------------------------------------------------------------------------------------
b5ffecfc
GT
45 wxImageList *p_imageListNormal;
46 wxMenu *popupMenu1; // OnDBClass
47 wxPoint TreePos;
48 wxString SaveDSN; // Needed for User and Password
c92b0f9a 49//----------------------------------------------------------------------------------------
b5ffecfc
GT
50 public:
51 int OnPopulate();
669f7a11 52 void OnSelChanged(wxMouseEvent& event);
b5ffecfc
GT
53 void OnRightSelect(wxTreeEvent& event);
54 void OnMouseMove(wxMouseEvent& event);
669f7a11 55 void OnUserPassword(wxCommandEvent& event);
b5ffecfc
GT
56
57 public:
c92b0f9a 58//----------------------------------------------------------------------------------------
b5ffecfc
GT
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)
64 DECLARE_EVENT_TABLE()
65};
c92b0f9a 66//----------------------------------------------------------------------------------------
b5ffecfc
GT
67#define PGMCTRL_01_BEGIN 1000
68#define PGMCTRL_ODBC_USER 1001
69#define PGMCTRL_01_END 1010
c92b0f9a 70//----------------------------------------------------------------------------------------