]> git.saurik.com Git - wxWidgets.git/blob - demos/dbbrowse/doc.h
add makefile.b32
[wxWidgets.git] / demos / dbbrowse / doc.h
1 //---------------------------------------------------------------------------
2 // Name: Doc.h
3 // Purpose: First attempt to make a MDIProgram with a Tree and ListView
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 //------------------------------------------------------------------------------
10 //-- Some Global Vars ------------------------------------------------------
11 //------------------------------------------------------------------------------
12 class DSN
13 {
14 public:
15 wxString Dsn;
16 wxString Drv;
17 wxString Pas;
18 wxString Usr;
19 };
20 // Global structure for holding ODBC connection information
21 extern struct DbStuff DbConnectInf;
22 //------------------------------------------------------------------------------
23 extern wxConfigBase *p_ProgramCfg; // All Config and Path information
24 extern wxLogTextCtrl *p_LogBook; // All Log messages
25 extern wxString LogBuf; // String for all Logs
26 //---------------------------------------------------------------------------
27 class PgmCtrl; // Declared in PgmCtrl.h file
28 class DocSplitterWindow; // Declared at the end of the file
29 //---------------------------------------------------------------------------
30 class mjDoc
31 {
32 public:
33 //---------------------------------------------------------------------------
34 mjDoc();
35 virtual ~mjDoc();
36 int Sash;
37 //---------------------------------------------------------------------------
38 //-- declare document Vars here ---------------------------------------------
39 //---------------------------------------------------------------------------
40 wxString Temp0, Temp1, Temp2, Temp3, Temp4, Temp5;
41 BrowserDB *db_Br; // Pointer to wxDB
42 DSN *p_DSN;
43 int i_DSN; // Counter
44 //---------------------------------------------------------------------------
45 DocSplitterWindow *p_Splitter;
46 wxFrame *p_MainFrame; // SDI Version
47 PgmCtrl *p_PgmCtrl;
48 DBTree *p_DBTree;
49 DBGrid *p_DBGrid;
50 wxTextCtrl *p_LogWin;
51 wxTabbedWindow *p_TabArea;
52 wxPaggedWindow *p_PageArea;
53 int i_TabNr; // Amount of active Views in Tab
54 int i_PageNr; // Amount of active Views in Page
55 //---------------------------------------------------------------------------
56 //-- declare document Functions here ----------------------------------------
57 //---------------------------------------------------------------------------
58 bool OnNewDocument();
59 bool OnInitView();
60 bool OnInitODBC();
61 bool OnChosenDSN(int Which);
62 bool OnChosenTbl(int Tab,wxString Table);
63 //---------------------------------------------------------------------------
64 void OnLeer(wxString Aufrufer); // Dummy Funktion
65 //---------------------------------------------------------------------------
66 };
67 class DocSplitterWindow: public wxSplitterWindow
68 {
69 public:
70 mjDoc *pDoc;
71 DocSplitterWindow(wxWindow *parent, wxWindowID id);
72 virtual bool OnSashPositionChange(int newSashPosition)
73 {
74 if ( !wxSplitterWindow::OnSashPositionChange(newSashPosition) )
75 return FALSE;
76 pDoc->Sash = newSashPosition;
77 return TRUE;
78 }
79 DECLARE_EVENT_TABLE()
80 };
81 //---------------------------------------------------------------------------