]>
Commit | Line | Data |
---|---|---|
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 |
14 | class DSN |
15 | { | |
645889ad GT |
16 | public: |
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 |
28 | extern wxConfigBase *p_ProgramCfg; // All Config and Path information |
29 | extern wxLogTextCtrl *p_LogBook; // All Log messages | |
30 | extern wxString LogBuf; // String for all Logs | |
645889ad | 31 | |
c92b0f9a | 32 | //---------------------------------------------------------------------------------------- |
b5ffecfc GT |
33 | class PgmCtrl; // Declared in PgmCtrl.h file |
34 | class DocSplitterWindow; // Declared at the end of the file | |
645889ad | 35 | |
c92b0f9a | 36 | //---------------------------------------------------------------------------------------- |
3fa0976a | 37 | class MainDoc |
b5ffecfc | 38 | { |
645889ad GT |
39 | public: |
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 |
79 | class DocSplitterWindow: public wxSplitterWindow |
80 | { | |
645889ad GT |
81 | public: |
82 | MainDoc *pDoc; | |
83 | DocSplitterWindow(wxWindow *parent, wxWindowID id); | |
84 | virtual bool OnSashPositionChange(int newSashPosition) | |
85 | { | |
86 | if ( !wxSplitterWindow::OnSashPositionChange(newSashPosition) ) | |
5151c7af | 87 | return false; |
645889ad | 88 | pDoc->Sash = newSashPosition; |
5151c7af | 89 | return true; |
645889ad GT |
90 | } |
91 | DECLARE_EVENT_TABLE() | |
b5ffecfc | 92 | }; |
c92b0f9a | 93 | //---------------------------------------------------------------------------------------- |