2000-02-12 09:11:17 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2001-02-01 15:24:44 -05:00
|
|
|
// Name: doc.h
|
2000-02-12 09:11:17 -05:00
|
|
|
// Purpose: a non-MFC Document (a do-it-yourself document)
|
2001-02-12 14:23:44 -05:00
|
|
|
// Author: Mark Johnson
|
2000-01-28 10:25:32 -05:00
|
|
|
// Modified by: 19990808.mj10777
|
|
|
|
// Created: 19990808
|
|
|
|
// Copyright: (c) Mark Johnson
|
|
|
|
// Licence: wxWindows license
|
2000-01-31 08:20:36 -05:00
|
|
|
// RCS-ID: $Id$
|
2001-02-01 15:24:44 -05:00
|
|
|
|
2000-02-12 09:11:17 -05:00
|
|
|
//----------------------------------------------------------------------------------------
|
|
|
|
//-- Some Global Vars --------------------------------------------------------------------
|
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 10:25:32 -05:00
|
|
|
class DSN
|
|
|
|
{
|
2001-02-01 15:24:44 -05:00
|
|
|
public:
|
|
|
|
wxString Dsn;
|
|
|
|
wxString Drv;
|
|
|
|
wxString Pas;
|
|
|
|
wxString Usr;
|
2000-01-28 10:25:32 -05:00
|
|
|
};
|
2001-02-01 15:24:44 -05:00
|
|
|
|
2000-02-12 09:11:17 -05:00
|
|
|
//----------------------------------------------------------------------------------------
|
2001-02-01 15:24:44 -05:00
|
|
|
// Global structure for holding ODBC connection information
|
2001-02-03 12:55:00 -05:00
|
|
|
//extern wxDbConnectInf DbConnectInf;
|
2001-02-01 15:24:44 -05:00
|
|
|
|
2000-02-12 09:11:17 -05:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 10:25:32 -05:00
|
|
|
extern wxConfigBase *p_ProgramCfg; // All Config and Path information
|
|
|
|
extern wxLogTextCtrl *p_LogBook; // All Log messages
|
|
|
|
extern wxString LogBuf; // String for all Logs
|
2001-02-01 15:24:44 -05:00
|
|
|
|
2000-02-12 09:11:17 -05:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 10:25:32 -05:00
|
|
|
class PgmCtrl; // Declared in PgmCtrl.h file
|
|
|
|
class DocSplitterWindow; // Declared at the end of the file
|
2001-02-01 15:24:44 -05:00
|
|
|
|
2000-02-12 09:11:17 -05:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-02-21 03:05:13 -05:00
|
|
|
class MainDoc
|
2000-01-28 10:25:32 -05:00
|
|
|
{
|
2001-02-01 15:24:44 -05:00
|
|
|
public:
|
|
|
|
//---------------------------------------------------------------------------------------
|
|
|
|
MainDoc();
|
|
|
|
virtual ~MainDoc();
|
|
|
|
int Sash;
|
|
|
|
//---------------------------------------------------------------------------------------
|
|
|
|
//-- declare document Vars here ---------------------------------------------------------
|
|
|
|
//---------------------------------------------------------------------------------------
|
|
|
|
wxString Temp0, Temp1, Temp2, Temp3, Temp4, Temp5;
|
|
|
|
BrowserDB *db_Br; // Pointer to wxDB
|
|
|
|
DSN *p_DSN;
|
|
|
|
int i_DSN; // Counter
|
|
|
|
wxString s_BColour;
|
|
|
|
wxFont *ft_Doc;
|
|
|
|
//---------------------------------------------------------------------------------------
|
|
|
|
DocSplitterWindow *p_Splitter;
|
|
|
|
wxHtmlHelpController *p_Help;
|
|
|
|
wxFrame *p_MainFrame; // SDI Version
|
|
|
|
PgmCtrl *p_PgmCtrl;
|
|
|
|
DBTree *p_DBTree;
|
|
|
|
DBGrid *p_DBGrid;
|
|
|
|
wxTextCtrl *p_LogWin;
|
|
|
|
wxTabbedWindow *p_TabArea;
|
|
|
|
wxPagedWindow *p_PageArea;
|
|
|
|
int i_TabNr; // Amount of active Views in Tab
|
|
|
|
int i_PageNr; // Amount of active Views in Page
|
|
|
|
//---------------------------------------------------------------------------------------
|
|
|
|
//-- declare document Functions here ----------------------------------------------------
|
|
|
|
//---------------------------------------------------------------------------------------
|
|
|
|
bool OnNewDocument();
|
|
|
|
bool OnInitView();
|
|
|
|
bool OnInitODBC();
|
|
|
|
bool OnChosenDSN(int Which);
|
|
|
|
bool OnChosenTbl(int Tab,wxString Table);
|
|
|
|
//---------------------------------------------------------------------------------------
|
|
|
|
void OnLeer(wxString Aufrufer); // Dummy Funktion
|
|
|
|
//---------------------------------------------------------------------------------------
|
2000-01-28 10:25:32 -05:00
|
|
|
};
|
2001-02-01 15:24:44 -05:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 10:25:32 -05:00
|
|
|
class DocSplitterWindow: public wxSplitterWindow
|
|
|
|
{
|
2001-02-01 15:24:44 -05:00
|
|
|
public:
|
|
|
|
MainDoc *pDoc;
|
|
|
|
DocSplitterWindow(wxWindow *parent, wxWindowID id);
|
|
|
|
virtual bool OnSashPositionChange(int newSashPosition)
|
|
|
|
{
|
|
|
|
if ( !wxSplitterWindow::OnSashPositionChange(newSashPosition) )
|
2004-06-01 14:27:09 -04:00
|
|
|
return false;
|
2001-02-01 15:24:44 -05:00
|
|
|
pDoc->Sash = newSashPosition;
|
2004-06-01 14:27:09 -04:00
|
|
|
return true;
|
2001-02-01 15:24:44 -05:00
|
|
|
}
|
|
|
|
DECLARE_EVENT_TABLE()
|
2000-01-28 10:25:32 -05:00
|
|
|
};
|
2000-02-12 09:11:17 -05:00
|
|
|
//----------------------------------------------------------------------------------------
|