Huge cleanup of the code. Reformatting, spelling fixes, standardizing on wxWindows conventions, etc.

Changed the couple lines of code required to work with checkins of the new ODBC classes that use wxStrings.
Fixed a ton of memory leaks
Demo still crashes on exit though - this problem has exited for nearly a year though.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker
2001-02-01 20:24:44 +00:00
parent 4fdae9972d
commit 645889ad25
17 changed files with 3157 additions and 2979 deletions

View File

@@ -9,57 +9,61 @@
// RCS-ID: $Id$
//----------------------------------------------------------------------------------------
#if !defined(wxUSE_NEW_GRID) || !(wxUSE_NEW_GRID)
#error "DBGrid requires the new wxGrid class"
#error "DBGrid requires the new wxGrid class"
#endif
//----------------------------------------------------------------------------------------
class MainDoc;
//----------------------------------------------------------------------------------------
class DBGrid: public wxGrid
{
public:
DBGrid(wxWindow *parent, const wxWindowID id,const wxPoint& pos,const wxSize& size, long style);
virtual ~DBGrid();
//---------------------------------------------------------------------------------------
int i_TabArt; // Tab = 0 ; Page = 1;
int i_ViewNr; // View Nummer in Tab / Page
int i_Which; // Which View, Database is this/using
//---------------------------------------------------------------------------------------
MainDoc* pDoc;
wxDbInf* ct_BrowserDB;
BrowserDB* db_Br;
wxMenu *popupMenu1; // OnDBClass
wxMenu *popupMenu2; // OnDBGrid & OnTableclass
bool b_EditModus;
//---------------------------------------------------------------------------------------
wxString logBuf,Temp0;
wxPoint MousePos;
//---------------------------------------------------------------------------------------
void OnModusEdit(wxCommandEvent& event);
void OnModusBrowse(wxCommandEvent& event);
void OnMouseMove(wxMouseEvent& event);
int OnTableView(wxString Table);
//-----
void OnCellChange( wxGridEvent& );
void OnCellLeftClick( wxGridEvent& );
void OnCellLeftDClick( wxGridEvent& );
void OnCellRightClick( wxGridEvent& );
void OnCellRightDClick( wxGridEvent& );
void OnColSize( wxGridSizeEvent& );
void OnEditorShown( wxGridEvent& );
void OnEditorHidden( wxGridEvent& );
void OnLabelLeftClick( wxGridEvent& );
void OnLabelLeftDClick( wxGridEvent& );
void OnLabelRightClick( wxGridEvent& );
void OnLabelRightDClick( wxGridEvent& );
void OnRangeSelected( wxGridRangeSelectEvent& );
void OnRowSize( wxGridSizeEvent& );
void OnSelectCell( wxGridEvent& );
//---------------------------------------------------------------------------------------
DECLARE_EVENT_TABLE()
public:
DBGrid(wxWindow *parent, const wxWindowID id,const wxPoint& pos,const wxSize& size, long style);
virtual ~DBGrid();
//---------------------------------------------------------------------------------------
int i_TabArt; // Tab = 0 ; Page = 1;
int i_ViewNr; // View Nummer in Tab / Page
int i_Which; // Which View, Database is this/using
//---------------------------------------------------------------------------------------
MainDoc* pDoc;
wxDbInf* ct_BrowserDB;
BrowserDB* db_Br;
wxMenu *popupMenu1; // OnDBClass
wxMenu *popupMenu2; // OnDBGrid & OnTableclass
bool b_EditModus;
//---------------------------------------------------------------------------------------
wxString logBuf,Temp0;
wxPoint MousePos;
//---------------------------------------------------------------------------------------
void OnModusEdit(wxCommandEvent& event);
void OnModusBrowse(wxCommandEvent& event);
void OnMouseMove(wxMouseEvent& event);
int OnTableView(wxString Table);
//-----
void OnCellChange( wxGridEvent& );
void OnCellLeftClick( wxGridEvent& );
void OnCellLeftDClick( wxGridEvent& );
void OnCellRightClick( wxGridEvent& );
void OnCellRightDClick( wxGridEvent& );
void OnColSize( wxGridSizeEvent& );
void OnEditorShown( wxGridEvent& );
void OnEditorHidden( wxGridEvent& );
void OnLabelLeftClick( wxGridEvent& );
void OnLabelLeftDClick( wxGridEvent& );
void OnLabelRightClick( wxGridEvent& );
void OnLabelRightDClick( wxGridEvent& );
void OnRangeSelected( wxGridRangeSelectEvent& );
void OnRowSize( wxGridSizeEvent& );
void OnSelectCell( wxGridEvent& );
//---------------------------------------------------------------------------------------
DECLARE_EVENT_TABLE()
};
//----------------------------------------------------------------------------------------
#define GRID_01_BEGIN 1200
#define GRID_BROWSE 1201
#define GRID_EDIT 1202
#define GRID_01_END 1203
//----------------------------------------------------------------------------------------