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