]> git.saurik.com Git - wxWidgets.git/blame - demos/dbbrowse/doc.h
Updated makefile for mobile sample.
[wxWidgets.git] / demos / dbbrowse / doc.h
CommitLineData
c92b0f9a 1//--------------------------------------------------------------------------------------------------
645889ad 2// Name: doc.h
c92b0f9a 3// Purpose: a non-MFC Document (a do-it-yourself document)
829c421b 4// Author: Mark Johnson
b5ffecfc
GT
5// Modified by: 19990808.mj10777
6// Created: 19990808
7// Copyright: (c) Mark Johnson
8// Licence: wxWindows license
c09d434d 9// RCS-ID: $Id$
645889ad 10
c92b0f9a
MJ
11//----------------------------------------------------------------------------------------
12//-- Some Global Vars --------------------------------------------------------------------
13//----------------------------------------------------------------------------------------
b5ffecfc
GT
14class DSN
15{
645889ad
GT
16public:
17 wxString Dsn;
18 wxString Drv;
19 wxString Pas;
20 wxString Usr;
b5ffecfc 21};
645889ad 22
c92b0f9a 23//----------------------------------------------------------------------------------------
645889ad 24// Global structure for holding ODBC connection information
eacf9d88 25//extern wxDbConnectInf DbConnectInf;
645889ad 26
c92b0f9a 27//----------------------------------------------------------------------------------------
b5ffecfc
GT
28extern wxConfigBase *p_ProgramCfg; // All Config and Path information
29extern wxLogTextCtrl *p_LogBook; // All Log messages
30extern wxString LogBuf; // String for all Logs
645889ad 31
c92b0f9a 32//----------------------------------------------------------------------------------------
b5ffecfc
GT
33class PgmCtrl; // Declared in PgmCtrl.h file
34class DocSplitterWindow; // Declared at the end of the file
645889ad 35
c92b0f9a 36//----------------------------------------------------------------------------------------
3fa0976a 37class MainDoc
b5ffecfc 38{
645889ad
GT
39public:
40 //---------------------------------------------------------------------------------------
41 MainDoc();
42 virtual ~MainDoc();
43 int Sash;
44 //---------------------------------------------------------------------------------------
45 //-- declare document Vars here ---------------------------------------------------------
46 //---------------------------------------------------------------------------------------
47 wxString Temp0, Temp1, Temp2, Temp3, Temp4, Temp5;
48 BrowserDB *db_Br; // Pointer to wxDB
49 DSN *p_DSN;
50 int i_DSN; // Counter
51 wxString s_BColour;
52 wxFont *ft_Doc;
53 //---------------------------------------------------------------------------------------
54 DocSplitterWindow *p_Splitter;
55 wxHtmlHelpController *p_Help;
56 wxFrame *p_MainFrame; // SDI Version
57 PgmCtrl *p_PgmCtrl;
58 DBTree *p_DBTree;
59 DBGrid *p_DBGrid;
60 wxTextCtrl *p_LogWin;
61 wxTabbedWindow *p_TabArea;
62 wxPagedWindow *p_PageArea;
63 int i_TabNr; // Amount of active Views in Tab
64 int i_PageNr; // Amount of active Views in Page
65 //---------------------------------------------------------------------------------------
66 //-- declare document Functions here ----------------------------------------------------
67 //---------------------------------------------------------------------------------------
68 bool OnNewDocument();
69 bool OnInitView();
70 bool OnInitODBC();
71 bool OnChosenDSN(int Which);
72 bool OnChosenTbl(int Tab,wxString Table);
73 //---------------------------------------------------------------------------------------
74 void OnLeer(wxString Aufrufer); // Dummy Funktion
75 //---------------------------------------------------------------------------------------
b5ffecfc 76};
645889ad
GT
77
78//----------------------------------------------------------------------------------------
b5ffecfc
GT
79class DocSplitterWindow: public wxSplitterWindow
80{
645889ad
GT
81public:
82 MainDoc *pDoc;
83 DocSplitterWindow(wxWindow *parent, wxWindowID id);
84 virtual bool OnSashPositionChange(int newSashPosition)
85 {
86 if ( !wxSplitterWindow::OnSashPositionChange(newSashPosition) )
87 return FALSE;
88 pDoc->Sash = newSashPosition;
89 return TRUE;
90 }
91 DECLARE_EVENT_TABLE()
b5ffecfc 92};
c92b0f9a 93//----------------------------------------------------------------------------------------