2000-02-12 09:11:17 -05:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 10:25:32 -05:00
|
|
|
// Name: DBGrid.h
|
2000-02-12 09:11:17 -05:00
|
|
|
// Purpose: shows seleted Table in a Grid
|
2000-01-28 10:25:32 -05:00
|
|
|
// Author: Mark Johnson
|
|
|
|
// Modified by: 20000126.mj10777
|
|
|
|
// Created:
|
|
|
|
// Copyright: (c) Mark Johnson
|
|
|
|
// Licence: wxWindows license
|
2000-01-31 08:20:36 -05:00
|
|
|
// RCS-ID: $Id$
|
2000-02-12 09:11:17 -05:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-31 13:26:16 -05:00
|
|
|
#if !defined(wxUSE_NEW_GRID) || !(wxUSE_NEW_GRID)
|
2000-02-12 09:11:17 -05:00
|
|
|
#error "DBGrid requires the new wxGrid class"
|
2000-01-31 13:26:16 -05:00
|
|
|
#endif
|
2000-02-12 09:11:17 -05:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-02-21 03:05:13 -05:00
|
|
|
class MainDoc;
|
2000-02-12 09:11:17 -05:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 10:25:32 -05:00
|
|
|
class DBGrid: public wxGrid
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
DBGrid(wxWindow *parent, const wxWindowID id,const wxPoint& pos,const wxSize& size, long style);
|
|
|
|
virtual ~DBGrid();
|
2000-02-12 09:11:17 -05:00
|
|
|
//---------------------------------------------------------------------------------------
|
2000-01-28 10:25:32 -05:00
|
|
|
int i_TabArt; // Tab = 0 ; Page = 1;
|
|
|
|
int i_ViewNr; // View Nummer in Tab / Page
|
|
|
|
int i_Which; // Which View, Database is this/using
|
2000-02-12 09:11:17 -05:00
|
|
|
//---------------------------------------------------------------------------------------
|
2000-02-21 03:05:13 -05:00
|
|
|
MainDoc* pDoc;
|
2000-01-28 10:25:32 -05:00
|
|
|
wxDbInf* ct_BrowserDB;
|
|
|
|
BrowserDB* db_Br;
|
|
|
|
wxMenu *popupMenu1; // OnDBClass
|
|
|
|
wxMenu *popupMenu2; // OnDBGrid & OnTableclass
|
|
|
|
bool b_EditModus;
|
2000-02-12 09:11:17 -05:00
|
|
|
//---------------------------------------------------------------------------------------
|
2000-01-28 10:25:32 -05:00
|
|
|
wxString logBuf,Temp0;
|
|
|
|
wxPoint MousePos;
|
2000-02-12 09:11:17 -05:00
|
|
|
//---------------------------------------------------------------------------------------
|
2000-03-15 13:52:23 -05:00
|
|
|
void OnModusEdit(wxCommandEvent& event);
|
|
|
|
void OnModusBrowse(wxCommandEvent& event);
|
2000-01-28 10:25:32 -05:00
|
|
|
void OnMouseMove(wxMouseEvent& event);
|
|
|
|
int OnTableView(wxString Table);
|
2000-02-25 07:01:38 -05:00
|
|
|
//-----
|
|
|
|
void OnCellChange( wxGridEvent& );
|
2000-01-28 10:25:32 -05:00
|
|
|
void OnCellLeftClick( wxGridEvent& );
|
|
|
|
void OnCellLeftDClick( wxGridEvent& );
|
2000-02-25 07:01:38 -05:00
|
|
|
void OnCellRightClick( wxGridEvent& );
|
2000-01-28 10:25:32 -05:00
|
|
|
void OnCellRightDClick( wxGridEvent& );
|
|
|
|
void OnColSize( wxGridSizeEvent& );
|
2000-02-25 07:01:38 -05:00
|
|
|
void OnEditorShown( wxGridEvent& );
|
|
|
|
void OnEditorHidden( wxGridEvent& );
|
|
|
|
void OnLabelLeftClick( wxGridEvent& );
|
|
|
|
void OnLabelLeftDClick( wxGridEvent& );
|
|
|
|
void OnLabelRightClick( wxGridEvent& );
|
|
|
|
void OnLabelRightDClick( wxGridEvent& );
|
2000-01-28 10:25:32 -05:00
|
|
|
void OnRangeSelected( wxGridRangeSelectEvent& );
|
2000-02-25 07:01:38 -05:00
|
|
|
void OnRowSize( wxGridSizeEvent& );
|
|
|
|
void OnSelectCell( wxGridEvent& );
|
2000-02-12 09:11:17 -05:00
|
|
|
//---------------------------------------------------------------------------------------
|
2000-01-28 10:25:32 -05:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
2000-02-12 09:11:17 -05:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 10:25:32 -05:00
|
|
|
#define GRID_01_BEGIN 1200
|
|
|
|
#define GRID_BROWSE 1201
|
|
|
|
#define GRID_EDIT 1202
|
|
|
|
#define GRID_01_END 1203
|
2000-02-12 09:11:17 -05:00
|
|
|
//----------------------------------------------------------------------------------------
|