File: doc.h

package info (click to toggle)
wxwidgets2.6 2.6.3.2.1.5%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 83,228 kB
  • ctags: 130,941
  • sloc: cpp: 820,043; ansic: 113,030; python: 107,485; makefile: 42,996; sh: 10,305; lex: 194; yacc: 128; xml: 95; pascal: 74
file content (93 lines) | stat: -rw-r--r-- 4,074 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
//--------------------------------------------------------------------------------------------------
// Name:        doc.h
// Purpose:     a non-MFC Document (a do-it-yourself document)
// Author:      Mark Johnson
// Modified by: 19990808.mj10777
// Created:     19990808
// Copyright:   (c) Mark Johnson
// Licence:     wxWindows license
// RCS-ID:      $Id: doc.h,v 1.10 2004/06/01 18:22:16 ABX Exp $

//----------------------------------------------------------------------------------------
//-- Some Global Vars --------------------------------------------------------------------
//----------------------------------------------------------------------------------------
class DSN
{
public:
    wxString  Dsn;
    wxString  Drv;
    wxString  Pas;
    wxString  Usr;
};

//----------------------------------------------------------------------------------------
// Global structure for holding ODBC connection information
//extern wxDbConnectInf DbConnectInf;

//----------------------------------------------------------------------------------------
extern wxConfigBase   *p_ProgramCfg;       // All Config and Path information
extern wxLogTextCtrl  *p_LogBook;          // All Log messages
extern wxString        LogBuf;             // String for all Logs

//----------------------------------------------------------------------------------------
class PgmCtrl;             // Declared in PgmCtrl.h file
class DocSplitterWindow;   // Declared at the end of the file

//----------------------------------------------------------------------------------------
class MainDoc
{
public:
    //---------------------------------------------------------------------------------------
    MainDoc();
    virtual ~MainDoc();
    int Sash;
    //---------------------------------------------------------------------------------------
    //-- declare document Vars here ---------------------------------------------------------
    //---------------------------------------------------------------------------------------
    wxString Temp0, Temp1, Temp2, Temp3, Temp4, Temp5;
    BrowserDB *db_Br;  // Pointer to wxDB
    DSN       *p_DSN;
    int        i_DSN;  // Counter
    wxString   s_BColour;
    wxFont    *ft_Doc;
    //---------------------------------------------------------------------------------------
    DocSplitterWindow    *p_Splitter;
    wxHtmlHelpController *p_Help;
    wxFrame              *p_MainFrame;     // SDI Version
    PgmCtrl              *p_PgmCtrl;
    DBTree               *p_DBTree;
    DBGrid               *p_DBGrid;
    wxTextCtrl           *p_LogWin;
    wxTabbedWindow       *p_TabArea;
    wxPagedWindow        *p_PageArea;
    int                   i_TabNr;         // Amount of active Views in Tab
    int                   i_PageNr;        // Amount of active Views in Page
    //---------------------------------------------------------------------------------------
    //-- declare document Functions here ----------------------------------------------------
    //---------------------------------------------------------------------------------------
    bool OnNewDocument();
    bool OnInitView();
    bool OnInitODBC();
    bool OnChosenDSN(int Which);
    bool OnChosenTbl(int Tab,wxString Table);
    //---------------------------------------------------------------------------------------
    void OnLeer(wxString Aufrufer);  // Dummy Funktion
    //---------------------------------------------------------------------------------------
};

//----------------------------------------------------------------------------------------
class DocSplitterWindow: public wxSplitterWindow
{
public:
    MainDoc *pDoc;
    DocSplitterWindow(wxWindow *parent, wxWindowID id);
    virtual bool OnSashPositionChange(int newSashPosition)
    {
        if ( !wxSplitterWindow::OnSashPositionChange(newSashPosition) )
            return false;
        pDoc->Sash = newSashPosition;
        return true;
    }
    DECLARE_EVENT_TABLE()
};
//----------------------------------------------------------------------------------------