~ubuntu-dev/wxwidgets2.6/upstream-debian

« back to all changes in this revision

Viewing changes to demos/dbbrowse/pgmctrl.h

  • Committer: Daniel T Chen
  • Date: 2006-06-26 10:15:11 UTC
  • Revision ID: crimsun@ubuntu.com-20060626101511-a4436cec4c6d9b35
ImportĀ DebianĀ 2.6.3.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//----------------------------------------------------------------------------------------
 
2
// Name:        pgmctrl.h
 
3
// Purpose:     Programm Control with a Tree
 
4
// Author:      Mark Johnson
 
5
// Modified by: 19990806.mj10777
 
6
// Created:     19991010
 
7
// RCS-ID:      $Id: pgmctrl.h,v 1.8 2005/01/31 18:09:46 ABX Exp $
 
8
// Copyright:   (c) Mark Johnson, Berlin Germany
 
9
// Licence:     wxWindows license
 
10
 
 
11
//----------------------------------------------------------------------------------------
 
12
class MainDoc;             // Declared in doc.h file
 
13
 
 
14
//----------------------------------------------------------------------------------------
 
15
class TreeData : public wxTreeItemData
 
16
{
 
17
public:
 
18
    TreeData(const wxString& desc) : m_desc(desc) { }
 
19
    void ShowInfo(wxTreeCtrl *tree);
 
20
    wxString m_desc;
 
21
};
 
22
 
 
23
//----------------------------------------------------------------------------------------
 
24
class PgmCtrl : public wxTreeCtrl
 
25
{
 
26
public:
 
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
    //----------------------------------------------------------------------------------------
 
53
public:
 
54
    int  OnPopulate();
 
55
    void OnSelChanged(wxMouseEvent& event);
 
56
    void OnRightSelect(wxTreeEvent& event);
 
57
    void OnMouseMove(wxMouseEvent& event);
 
58
    void OnUserPassword(wxCommandEvent& event);
 
59
 
 
60
public:
 
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()
 
68
};
 
69
 
 
70
//----------------------------------------------------------------------------------------
 
71
#define PGMCTRL_01_BEGIN     1000
 
72
#define PGMCTRL_ODBC_USER    1001
 
73
#define PGMCTRL_01_END       1010
 
74
//----------------------------------------------------------------------------------------