]>
Commit | Line | Data |
---|---|---|
c92b0f9a | 1 | //-------------------------------------------------------------------------------------------------- |
b5ffecfc | 2 | // Name: Doc.h |
c92b0f9a | 3 | // Purpose: a non-MFC Document (a do-it-yourself document) |
b5ffecfc GT |
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$ |
c92b0f9a MJ |
10 | //---------------------------------------------------------------------------------------- |
11 | //-- Some Global Vars -------------------------------------------------------------------- | |
12 | //---------------------------------------------------------------------------------------- | |
b5ffecfc GT |
13 | class DSN |
14 | { | |
15 | public: | |
16 | wxString Dsn; | |
17 | wxString Drv; | |
18 | wxString Pas; | |
19 | wxString Usr; | |
20 | }; | |
c92b0f9a | 21 | //---------------------------------------------------------------------------------------- |
b5ffecfc | 22 | // Global structure for holding ODBC connection information |
e2f1cfb2 | 23 | extern wxDbConnectInf DbConnectInf; |
c92b0f9a | 24 | //---------------------------------------------------------------------------------------- |
b5ffecfc GT |
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 | |
c92b0f9a | 28 | //---------------------------------------------------------------------------------------- |
b5ffecfc GT |
29 | class PgmCtrl; // Declared in PgmCtrl.h file |
30 | class DocSplitterWindow; // Declared at the end of the file | |
c92b0f9a | 31 | //---------------------------------------------------------------------------------------- |
3fa0976a | 32 | class MainDoc |
b5ffecfc GT |
33 | { |
34 | public: | |
c92b0f9a | 35 | //--------------------------------------------------------------------------------------- |
3fa0976a MJ |
36 | MainDoc(); |
37 | virtual ~MainDoc(); | |
b5ffecfc | 38 | int Sash; |
c92b0f9a MJ |
39 | //--------------------------------------------------------------------------------------- |
40 | //-- declare document Vars here --------------------------------------------------------- | |
41 | //--------------------------------------------------------------------------------------- | |
b5ffecfc GT |
42 | wxString Temp0, Temp1, Temp2, Temp3, Temp4, Temp5; |
43 | BrowserDB *db_Br; // Pointer to wxDB | |
44 | DSN *p_DSN; | |
45 | int i_DSN; // Counter | |
c92b0f9a MJ |
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 | //--------------------------------------------------------------------------------------- | |
b5ffecfc GT |
63 | bool OnNewDocument(); |
64 | bool OnInitView(); | |
65 | bool OnInitODBC(); | |
66 | bool OnChosenDSN(int Which); | |
67 | bool OnChosenTbl(int Tab,wxString Table); | |
c92b0f9a | 68 | //--------------------------------------------------------------------------------------- |
b5ffecfc | 69 | void OnLeer(wxString Aufrufer); // Dummy Funktion |
c92b0f9a | 70 | //--------------------------------------------------------------------------------------- |
b5ffecfc GT |
71 | }; |
72 | class DocSplitterWindow: public wxSplitterWindow | |
73 | { | |
74 | public: | |
3fa0976a | 75 | MainDoc *pDoc; |
b5ffecfc GT |
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 | }; | |
c92b0f9a | 86 | //---------------------------------------------------------------------------------------- |