Commit | Line | Data |
---|---|---|
b5ffecfc GT |
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 | |
c09d434d | 9 | // RCS-ID: $Id$ |
b5ffecfc GT |
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 | // Global structure for holding ODBC connection information | |
22 | extern struct DbStuff DbConnectInf; | |
23 | //------------------------------------------------------------------------------ | |
24 | extern wxConfigBase *p_ProgramCfg; // All Config and Path information | |
25 | extern wxLogTextCtrl *p_LogBook; // All Log messages | |
26 | extern wxString LogBuf; // String for all Logs | |
27 | //--------------------------------------------------------------------------- | |
28 | class PgmCtrl; // Declared in PgmCtrl.h file | |
29 | class DocSplitterWindow; // Declared at the end of the file | |
30 | //--------------------------------------------------------------------------- | |
31 | class mjDoc | |
32 | { | |
33 | public: | |
34 | //--------------------------------------------------------------------------- | |
35 | mjDoc(); | |
36 | virtual ~mjDoc(); | |
37 | int Sash; | |
38 | //--------------------------------------------------------------------------- | |
39 | //-- declare document Vars here --------------------------------------------- | |
40 | //--------------------------------------------------------------------------- | |
41 | wxString Temp0, Temp1, Temp2, Temp3, Temp4, Temp5; | |
42 | BrowserDB *db_Br; // Pointer to wxDB | |
43 | DSN *p_DSN; | |
44 | int i_DSN; // Counter | |
45 | //--------------------------------------------------------------------------- | |
46 | DocSplitterWindow *p_Splitter; | |
47 | wxFrame *p_MainFrame; // SDI Version | |
48 | PgmCtrl *p_PgmCtrl; | |
49 | DBTree *p_DBTree; | |
50 | DBGrid *p_DBGrid; | |
51 | wxTextCtrl *p_LogWin; | |
52 | wxTabbedWindow *p_TabArea; | |
53 | wxPaggedWindow *p_PageArea; | |
54 | int i_TabNr; // Amount of active Views in Tab | |
55 | int i_PageNr; // Amount of active Views in Page | |
56 | //--------------------------------------------------------------------------- | |
57 | //-- declare document Functions here ---------------------------------------- | |
58 | //--------------------------------------------------------------------------- | |
59 | bool OnNewDocument(); | |
60 | bool OnInitView(); | |
61 | bool OnInitODBC(); | |
62 | bool OnChosenDSN(int Which); | |
63 | bool OnChosenTbl(int Tab,wxString Table); | |
64 | //--------------------------------------------------------------------------- | |
65 | void OnLeer(wxString Aufrufer); // Dummy Funktion | |
66 | //--------------------------------------------------------------------------- | |
67 | }; | |
68 | class DocSplitterWindow: public wxSplitterWindow | |
69 | { | |
70 | public: | |
71 | mjDoc *pDoc; | |
72 | DocSplitterWindow(wxWindow *parent, wxWindowID id); | |
73 | virtual bool OnSashPositionChange(int newSashPosition) | |
74 | { | |
75 | if ( !wxSplitterWindow::OnSashPositionChange(newSashPosition) ) | |
76 | return FALSE; | |
77 | pDoc->Sash = newSashPosition; | |
78 | return TRUE; | |
79 | } | |
80 | DECLARE_EVENT_TABLE() | |
81 | }; | |
82 | //--------------------------------------------------------------------------- |