Removed old grid code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
41aebd5d79
commit
f7556ff05f
63
Makefile.in
63
Makefile.in
@ -51,13 +51,12 @@ VP7 = @top_srcdir@/src/jpeg
|
||||
VP8 = @top_srcdir@/src/tiff
|
||||
VP9 = @top_srcdir@/src/zlib
|
||||
VPA = @top_srcdir@/src/regex
|
||||
VP10 = @top_srcdir@/src/iodbc
|
||||
VP11 = @top_srcdir@/src/msw/ole
|
||||
VP10 = @top_srcdir@/src/msw/ole
|
||||
|
||||
# the comment at the end of the next line is needed because otherwise autoconf
|
||||
# would remove this line completely - it contains a built-in hack to remove
|
||||
# any VPATH assignment not containing ':'
|
||||
VPATH = $(VP1)@PATH_IFS@$(VP2)@PATH_IFS@$(VP3)@PATH_IFS@$(VP4)@PATH_IFS@$(VP5)@PATH_IFS@$(VP6)@PATH_IFS@$(VP7)@PATH_IFS@$(VP8)@PATH_IFS@$(VP9)@PATH_IFS@$(VPA)@PATH_IFS@$(VP10)@PATH_IFS@$(VP11) # ':' for autoconf
|
||||
VPATH = $(VP1)@PATH_IFS@$(VP2)@PATH_IFS@$(VP3)@PATH_IFS@$(VP4)@PATH_IFS@$(VP5)@PATH_IFS@$(VP6)@PATH_IFS@$(VP7)@PATH_IFS@$(VP8)@PATH_IFS@$(VP9)@PATH_IFS@$(VPA)@PATH_IFS@$(VP10) # ':' for autoconf
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
@ -113,7 +112,7 @@ MSWDIR = $(WXDIR)/src/msw
|
||||
PMDIR = $(WXDIR)/src/os2
|
||||
MACDIR = $(WXDIR)/src/mac
|
||||
COCOADIR = $(WXDIR)/src/cocoa
|
||||
ODBCDIR = $(WXDIR)/src/iodbc
|
||||
# ODBCDIR = $(WXDIR)/src/iodbc
|
||||
FTDIR = $(WXDIR)/src/freetype
|
||||
INCDIR = $(WXDIR)/include
|
||||
SAMPDIR = $(WXDIR)/samples
|
||||
@ -286,22 +285,22 @@ TIFFOBJS = \
|
||||
tif_write.o \
|
||||
tif_zip.o
|
||||
|
||||
IODBCOBJS = \
|
||||
catalog.o \
|
||||
connect.o \
|
||||
dlf.o \
|
||||
dlproc.o \
|
||||
execute.o \
|
||||
fetch.o \
|
||||
hdbc.o \
|
||||
henv.o \
|
||||
herr.o \
|
||||
hstmt.o \
|
||||
info.o \
|
||||
itrace.o \
|
||||
misc.o \
|
||||
prepare.o \
|
||||
result.o
|
||||
# IODBCOBJS = \
|
||||
# catalog.o \
|
||||
# connect.o \
|
||||
# dlf.o \
|
||||
# dlproc.o \
|
||||
# execute.o \
|
||||
# fetch.o \
|
||||
# hdbc.o \
|
||||
# henv.o \
|
||||
# herr.o \
|
||||
# hstmt.o \
|
||||
# info.o \
|
||||
# itrace.o \
|
||||
# misc.o \
|
||||
# prepare.o \
|
||||
# result.o
|
||||
|
||||
|
||||
############################## Rules ##################################
|
||||
@ -631,7 +630,6 @@ ALL_GUI_DIST: ALL_DIST
|
||||
mkdir $(DISTDIR)/src/png
|
||||
mkdir $(DISTDIR)/src/jpeg
|
||||
mkdir $(DISTDIR)/src/tiff
|
||||
mkdir $(DISTDIR)/src/iodbc
|
||||
mkdir $(DISTDIR)/src/unix
|
||||
cp $(SRCDIR)/*.in $(DISTDIR)/src
|
||||
cp $(COMMDIR)/*.cpp $(DISTDIR)/src/common
|
||||
@ -656,13 +654,14 @@ ALL_GUI_DIST: ALL_DIST
|
||||
cp $(TIFFDIR)/*.h $(DISTDIR)/src/tiff
|
||||
cp $(TIFFDIR)/*.c $(DISTDIR)/src/tiff
|
||||
cp $(TIFFDIR)/README $(DISTDIR)/src/tiff
|
||||
cp $(ODBCDIR)/*.h $(DISTDIR)/src/iodbc
|
||||
cp $(ODBCDIR)/*.c $(DISTDIR)/src/iodbc
|
||||
cp $(ODBCDIR)/*.ci $(DISTDIR)/src/iodbc
|
||||
cp $(ODBCDIR)/*.exp $(DISTDIR)/src/iodbc
|
||||
cp $(ODBCDIR)/README $(DISTDIR)/src/iodbc
|
||||
cp $(ODBCDIR)/NEWS $(DISTDIR)/src/iodbc
|
||||
cp $(ODBCDIR)/Changes.log $(DISTDIR)/src/iodbc
|
||||
#mkdir $(DISTDIR)/src/iodbc
|
||||
#cp $(ODBCDIR)/*.h $(DISTDIR)/src/iodbc
|
||||
#cp $(ODBCDIR)/*.c $(DISTDIR)/src/iodbc
|
||||
#cp $(ODBCDIR)/*.ci $(DISTDIR)/src/iodbc
|
||||
#cp $(ODBCDIR)/*.exp $(DISTDIR)/src/iodbc
|
||||
#cp $(ODBCDIR)/README $(DISTDIR)/src/iodbc
|
||||
#cp $(ODBCDIR)/NEWS $(DISTDIR)/src/iodbc
|
||||
#cp $(ODBCDIR)/Changes.log $(DISTDIR)/src/iodbc
|
||||
|
||||
BASE_DIST: ALL_DIST
|
||||
# make --disable-gui the default
|
||||
@ -1022,7 +1021,7 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
mkdir $(DISTDIR)/samples/grid
|
||||
cp $(SAMPDIR)/grid/Makefile.in $(DISTDIR)/samples/grid
|
||||
cp $(SAMPDIR)/grid/makefile.unx $(DISTDIR)/samples/grid
|
||||
cp $(SAMPDIR)/grid/*.cpp $(DISTDIR)/samples/grid
|
||||
cp $(SAMPDIR)/grid/*.cpp $(SAMPDIR)/grid/*.h $(DISTDIR)/samples/grid
|
||||
|
||||
mkdir $(DISTDIR)/samples/help
|
||||
mkdir $(DISTDIR)/samples/help/doc
|
||||
@ -1189,12 +1188,6 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
cp $(SAMPDIR)/dialup/makefile.unx $(DISTDIR)/samples/dialup
|
||||
cp $(SAMPDIR)/dialup/*.cpp $(DISTDIR)/samples/dialup
|
||||
|
||||
mkdir $(DISTDIR)/samples/newgrid
|
||||
cp $(SAMPDIR)/newgrid/Makefile.in $(DISTDIR)/samples/newgrid
|
||||
cp $(SAMPDIR)/newgrid/makefile.unx $(DISTDIR)/samples/newgrid
|
||||
cp $(SAMPDIR)/newgrid/*.cpp $(DISTDIR)/samples/newgrid
|
||||
cp $(SAMPDIR)/newgrid/*.h $(DISTDIR)/samples/newgrid
|
||||
|
||||
mkdir $(DISTDIR)/samples/notebook
|
||||
cp $(SAMPDIR)/notebook/Makefile.in $(DISTDIR)/samples/notebook
|
||||
cp $(SAMPDIR)/notebook/makefile.unx $(DISTDIR)/samples/notebook
|
||||
|
13
configure.in
13
configure.in
@ -434,7 +434,6 @@ if test $DEBUG_CONFIGURE = 1; then
|
||||
DEFAULT_wxUSE_DISPLAY=no
|
||||
DEFAULT_wxUSE_GAUGE=no
|
||||
DEFAULT_wxUSE_GRID=no
|
||||
DEFAULT_wxUSE_NEW_GRID=no
|
||||
DEFAULT_wxUSE_IMAGLIST=no
|
||||
DEFAULT_wxUSE_LISTBOX=no
|
||||
DEFAULT_wxUSE_LISTCTRL=no
|
||||
@ -609,7 +608,6 @@ else
|
||||
DEFAULT_wxUSE_DISPLAY=no
|
||||
DEFAULT_wxUSE_GAUGE=yes
|
||||
DEFAULT_wxUSE_GRID=yes
|
||||
DEFAULT_wxUSE_NEW_GRID=yes
|
||||
DEFAULT_wxUSE_IMAGLIST=yes
|
||||
DEFAULT_wxUSE_LISTBOX=yes
|
||||
DEFAULT_wxUSE_LISTCTRL=yes
|
||||
@ -884,7 +882,6 @@ if test "$wxUSE_CONTROLS" = "yes"; then
|
||||
DEFAULT_wxUSE_CHOICE=yes
|
||||
DEFAULT_wxUSE_GAUGE=yes
|
||||
DEFAULT_wxUSE_GRID=yes
|
||||
DEFAULT_wxUSE_NEW_GRID=yes
|
||||
DEFAULT_wxUSE_IMAGLIST=yes
|
||||
DEFAULT_wxUSE_LISTBOX=yes
|
||||
DEFAULT_wxUSE_LISTCTRL=yes
|
||||
@ -923,7 +920,6 @@ elif test "$wxUSE_CONTROLS" = "no"; then
|
||||
DEFAULT_wxUSE_CHOICE=no
|
||||
DEFAULT_wxUSE_GAUGE=no
|
||||
DEFAULT_wxUSE_GRID=no
|
||||
DEFAULT_wxUSE_NEW_GRID=no
|
||||
DEFAULT_wxUSE_IMAGLIST=no
|
||||
DEFAULT_wxUSE_LISTBOX=no
|
||||
DEFAULT_wxUSE_LISTCTRL=no
|
||||
@ -975,7 +971,6 @@ if test "x$wxUSE_COCOA" != "x" -a "$wxUSE_COCOA" != "0" ; then
|
||||
DEFAULT_wxUSE_FINDREPLDLG=no
|
||||
DEFAULT_wxUSE_FONTDLG=no
|
||||
DEFAULT_wxUSE_GRID=no
|
||||
DEFAULT_wxUSE_NEW_GRID=no
|
||||
DEFAULT_wxUSE_NUMBERDLG=no
|
||||
DEFAULT_wxUSE_PROGRESSDLG=no
|
||||
DEFAULT_wxUSE_PROPSHEET=no
|
||||
@ -999,7 +994,6 @@ WX_ARG_ENABLE(combobox, [ --enable-combobox use wxComboBox class], wxU
|
||||
WX_ARG_ENABLE(display, [ --enable-display use wxDisplay class], wxUSE_DISPLAY)
|
||||
WX_ARG_ENABLE(gauge, [ --enable-gauge use wxGauge class], wxUSE_GAUGE)
|
||||
WX_ARG_ENABLE(grid, [ --enable-grid use wxGrid class], wxUSE_GRID)
|
||||
WX_ARG_ENABLE(newgrid, [ --enable-newgrid use new wxGrid class], wxUSE_NEW_GRID)
|
||||
WX_ARG_ENABLE(imaglist, [ --enable-imaglist use wxImageList class], wxUSE_IMAGLIST)
|
||||
WX_ARG_ENABLE(listbox, [ --enable-listbox use wxListBox class], wxUSE_LISTBOX)
|
||||
WX_ARG_ENABLE(listctrl, [ --enable-listctrl use wxListCtrl class], wxUSE_LISTCTRL)
|
||||
@ -4863,13 +4857,6 @@ if test "$wxUSE_GAUGE" = "yes"; then
|
||||
USES_CONTROLS=1
|
||||
fi
|
||||
|
||||
if test "$wxUSE_NEW_GRID" = "yes"; then
|
||||
wxUSE_GRID="yes"
|
||||
AC_DEFINE(wxUSE_NEW_GRID)
|
||||
USES_CONTROLS=1
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS newgrid"
|
||||
fi
|
||||
|
||||
if test "$wxUSE_GRID" = "yes"; then
|
||||
AC_DEFINE(wxUSE_GRID)
|
||||
USES_CONTROLS=1
|
||||
|
@ -57,7 +57,6 @@ samples/minimal/*W7.xml
|
||||
samples/mobile/*W7.xml
|
||||
samples/multimon/*W7.xml
|
||||
samples/nativdlg/*W7.xml
|
||||
samples/newgrid/*W7.xml
|
||||
samples/notebook/*W7.xml
|
||||
samples/oleauto/*W7.xml
|
||||
samples/opengl/*W7.xml
|
||||
|
@ -101,8 +101,6 @@ samples/multimon/*M?.xml
|
||||
samples/multimon/*.mcp
|
||||
samples/nativdlg/*M?.xml
|
||||
samples/nativdlg/*.mcp
|
||||
samples/newgrid/*M?.xml
|
||||
samples/newgrid/*.mcp
|
||||
samples/notebook/*M?.xml
|
||||
samples/notebook/*.mcp
|
||||
samples/oleauto/*M?.xml
|
||||
|
@ -819,18 +819,6 @@ samples/multimon/*.ico
|
||||
samples/multimon/*.bmp
|
||||
samples/multimon/*.pro
|
||||
|
||||
samples/newgrid/*.cpp
|
||||
samples/newgrid/*.h
|
||||
samples/newgrid/*.def
|
||||
samples/newgrid/*.rc
|
||||
samples/newgrid/*.txt
|
||||
samples/newgrid/makefile*
|
||||
samples/newgrid/*.xbm
|
||||
samples/newgrid/*.xpm
|
||||
samples/newgrid/*.ico
|
||||
samples/newgrid/*.bmp
|
||||
samples/newgrid/*.pro
|
||||
|
||||
samples/notebook/*.cpp
|
||||
samples/notebook/*.h
|
||||
samples/notebook/makefile*
|
||||
|
@ -15,18 +15,6 @@ src/gtk/*.cpp
|
||||
src/gtk/*.c
|
||||
src/gtk/*.xbm
|
||||
|
||||
src/iodbc/*.c
|
||||
src/iodbc/*.ci
|
||||
src/iodbc/*.h
|
||||
src/iodbc/IAFA-PACKAGE
|
||||
src/iodbc/README
|
||||
src/iodbc/*.exp
|
||||
src/iodbc/*.mk
|
||||
src/iodbc/autoconfig
|
||||
src/iodbc/build
|
||||
src/iodbc/Changes.log
|
||||
src/iodbc/postgres/*.h
|
||||
|
||||
misc/afm/*.afm
|
||||
misc/gs_afm/*.afm
|
||||
|
||||
|
@ -23,7 +23,6 @@ samples/exec/Makefile.in
|
||||
samples/event/Makefile.in
|
||||
samples/grid/Makefile.in
|
||||
samples/keyboard/Makefile.in
|
||||
samples/newgrid/Makefile.in
|
||||
samples/help/Makefile.in
|
||||
samples/internat/Makefile.in
|
||||
samples/ipc/Makefile.in
|
||||
|
@ -18,18 +18,6 @@ src/x11/makefile*
|
||||
src/x11/*.inc
|
||||
src/x11/*.xbm
|
||||
|
||||
src/iodbc/*.c
|
||||
src/iodbc/*.ci
|
||||
src/iodbc/*.h
|
||||
src/iodbc/IAFA-PACKAGE
|
||||
src/iodbc/README
|
||||
src/iodbc/*.exp
|
||||
src/iodbc/*.mk
|
||||
src/iodbc/autoconfig
|
||||
src/iodbc/build
|
||||
src/iodbc/Changes.log
|
||||
src/iodbc/postgres/*.h
|
||||
|
||||
include/wx/motif/*.h
|
||||
include/wx/x11/*.h
|
||||
|
||||
|
@ -93,8 +93,8 @@ samples/exec/exec.dsw
|
||||
samples/font/font.dsp
|
||||
samples/font/font.dsw
|
||||
|
||||
samples/grid/grid.dsp
|
||||
samples/grid/grid.dsw
|
||||
samples/grid/griddemo.dsp
|
||||
samples/grid/griddemo.dsw
|
||||
|
||||
samples/help/help.dsp
|
||||
samples/help/help.dsw
|
||||
@ -170,9 +170,6 @@ samples/multimon/multimon_test.dsw
|
||||
samples/nativdlg/nativdlg.dsp
|
||||
samples/nativdlg/nativdlg.dsw
|
||||
|
||||
samples/newgrid/newgrid.dsp
|
||||
samples/newgrid/newgrid.dsw
|
||||
|
||||
samples/notebook/notebook.dsp
|
||||
samples/notebook/notebook.dsw
|
||||
|
||||
|
@ -6,18 +6,6 @@ src/x11/makefile*
|
||||
src/x11/*.inc
|
||||
src/x11/*.xbm
|
||||
|
||||
src/iodbc/*.c
|
||||
src/iodbc/*.ci
|
||||
src/iodbc/*.h
|
||||
src/iodbc/IAFA-PACKAGE
|
||||
src/iodbc/README
|
||||
src/iodbc/*.exp
|
||||
src/iodbc/*.mk
|
||||
src/iodbc/autoconfig
|
||||
src/iodbc/build
|
||||
src/iodbc/Changes.log
|
||||
src/iodbc/postgres/*.h
|
||||
|
||||
include/wx/x11/*.h
|
||||
include/wx/x11/nanox/X11/*.h
|
||||
|
||||
|
@ -76,16 +76,11 @@
|
||||
#include "sql.h"
|
||||
#include "sqlext.h"
|
||||
#include "odbcinst.h"
|
||||
#elif defined( __VMS )
|
||||
// For OpenVMS use the ones from the library
|
||||
#else
|
||||
// Use the ones from the library
|
||||
extern "C" {
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
}
|
||||
#else // !__VISUALC__, !__VMS
|
||||
extern "C" {
|
||||
#include "wx/isql.h"
|
||||
#include "wx/isqlext.h"
|
||||
#include <sql.h>
|
||||
#include <sqlext.h>
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -11,10 +11,6 @@
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if !defined(wxUSE_NEW_GRID) || !(wxUSE_NEW_GRID)
|
||||
#include "wx/generic/gridg.h"
|
||||
#else
|
||||
|
||||
#ifndef __WXGRID_H__
|
||||
#define __WXGRID_H__
|
||||
|
||||
@ -2079,6 +2075,5 @@ extern const int wxEVT_GRID_CHANGE_SEL_LABEL;
|
||||
|
||||
#endif
|
||||
|
||||
#endif // #ifndef __WXGRID_H__
|
||||
#endif // ifndef wxUSE_GRID
|
||||
|
||||
#endif // ifndef wxUSE_NEW_GRID
|
||||
|
@ -16,7 +16,7 @@
|
||||
#pragma interface "gridctrl.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_GRID || wxUSE_NEW_GRID
|
||||
#if wxUSE_GRID
|
||||
|
||||
#include "wx/grid.h"
|
||||
#include "wx/string.h"
|
||||
@ -154,7 +154,7 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif // #if wxUSE_GRID || wxUSE_NEW_GRID
|
||||
#endif // #if wxUSE_GRID
|
||||
|
||||
#endif //_WX_GENERIC_GRIDCTRL_H_
|
||||
|
||||
|
@ -1,429 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: gridg.h
|
||||
// Purpose: wxGenericGrid
|
||||
// Author: Julian Smart
|
||||
// Modified by: Michael Bedward
|
||||
// Added edit in place facility, 20 April 1999
|
||||
// Added cursor key control, 29 Jun 1999
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GRIDH_G__
|
||||
#define __GRIDH_G__
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "gridg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_GRID
|
||||
|
||||
#include "wx/panel.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/scrolbar.h"
|
||||
#include "wx/event.h"
|
||||
|
||||
#define wxGRID_DEFAULT_EDIT_WIDTH 300
|
||||
#define wxGRID_DEFAULT_EDIT_HEIGHT 27
|
||||
#define wxGRID_DEFAULT_EDIT_X 2
|
||||
#define wxGRID_DEFAULT_EDIT_Y 1
|
||||
#define wxGRID_DEFAULT_SHEET_TOP 31
|
||||
#define wxGRID_DEFAULT_SHEET_LEFT 0
|
||||
#define wxGRID_DEFAULT_CELL_HEIGHT 20
|
||||
#define wxGRID_DEFAULT_CELL_WIDTH 80
|
||||
#define wxGRID_DEFAULT_VERTICAL_LABEL_WIDTH 40
|
||||
#define wxGRID_DEFAULT_HORIZONAL_LABEL_HEIGHT 20
|
||||
|
||||
#define WXGENERIC_GRID_VERSION 0.5
|
||||
|
||||
class WXDLLEXPORT wxGridEvent;
|
||||
class WXDLLEXPORT wxGridCell;
|
||||
|
||||
class WXDLLEXPORT wxGenericGrid : public wxPanel
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGenericGrid)
|
||||
|
||||
public:
|
||||
wxGenericGrid();
|
||||
|
||||
wxGenericGrid(wxWindow *parent, int x, int y, int width, int height, long style = 0, char *name = "grid")
|
||||
{
|
||||
Create(parent, -1, wxPoint(x, y), wxSize(width, height), style, name);
|
||||
}
|
||||
wxGenericGrid(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style = 0, const wxString& name = "grid")
|
||||
{
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
~wxGenericGrid();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID, const wxPoint& pos, const wxSize& size, long style = 0, const wxString& name = "grid");
|
||||
|
||||
bool CreateGrid(int nRows, int nCols, wxString **cellValues = (wxString **) NULL, short *widths = (short *) NULL,
|
||||
short defaultWidth = wxGRID_DEFAULT_CELL_WIDTH, short defaultHeight = wxGRID_DEFAULT_CELL_HEIGHT);
|
||||
void PaintGrid(wxDC& dc);
|
||||
void ClearGrid();
|
||||
virtual wxGridCell *GetCell(int row, int col) const;
|
||||
wxGridCell ***GetCells() const { return m_gridCells; }
|
||||
bool InsertCols(int pos = 0, int n = 1, bool updateLabels = TRUE);
|
||||
bool InsertRows(int pos = 0, int n = 1, bool updateLabels = TRUE);
|
||||
bool AppendCols(int n = 1, bool updateLabels = TRUE);
|
||||
bool AppendRows(int n = 1, bool updateLabels = TRUE);
|
||||
bool DeleteCols(int pos = 0, int n = 1, bool updateLabels = TRUE);
|
||||
bool DeleteRows(int pos = 0, int n = 1, bool updateLabels = TRUE);
|
||||
|
||||
// Cell accessors
|
||||
void SetCellValue(const wxString& val, int row, int col);
|
||||
wxString& GetCellValue(int row, int col) const;
|
||||
void SetCellAlignment(int flag, int row, int col);
|
||||
void SetCellAlignment(int flag);
|
||||
int GetCellAlignment(int row, int col) const;
|
||||
int GetCellAlignment() const;
|
||||
void SetCellTextColour(const wxColour& val, int row, int col);
|
||||
void SetCellTextColour(const wxColour& col);
|
||||
wxColour& GetCellTextColour(int row, int col) const;
|
||||
wxColour& GetCellTextColour() const { return (wxColour&) m_cellTextColour; }
|
||||
void SetCellBackgroundColour(const wxColour& col);
|
||||
void SetCellBackgroundColour(const wxColour& colour, int row, int col);
|
||||
wxColour& GetCellBackgroundColour() const { return (wxColour&) m_cellBackgroundColour; }
|
||||
wxColour& GetCellBackgroundColour(int row, int col) const;
|
||||
wxFont& GetCellTextFont() const { return (wxFont&) m_cellTextFont; }
|
||||
wxFont& GetCellTextFont(int row, int col) const;
|
||||
void SetCellTextFont(const wxFont& fnt);
|
||||
void SetCellTextFont(const wxFont& fnt, int row, int col);
|
||||
wxBitmap *GetCellBitmap(int row, int col) const;
|
||||
void SetCellBitmap(wxBitmap *bitmap, int row, int col);
|
||||
void *SetCellData(void *data, int row, int col);
|
||||
void *GetCellData(int row, int col);
|
||||
|
||||
// Size accessors
|
||||
void SetColumnWidth(int col, int width);
|
||||
int GetColumnWidth(int col) const;
|
||||
void SetRowHeight(int row, int height);
|
||||
int GetRowHeight(int row) const;
|
||||
int GetViewHeight() const { return m_viewHeight; }
|
||||
int GetViewWidth() const { return m_viewWidth; }
|
||||
|
||||
// Label accessors
|
||||
void SetLabelSize(int orientation, int sz);
|
||||
int GetLabelSize(int orientation) const;
|
||||
void SetLabelAlignment(int orientation, int alignment);
|
||||
int GetLabelAlignment(int orientation) const;
|
||||
wxGridCell *GetLabelCell(int orientation, int pos) const;
|
||||
void SetLabelValue(int orientation, const wxString& val, int pos);
|
||||
wxString& GetLabelValue(int orientation, int pos) const;
|
||||
void SetLabelTextColour(const wxColour& colour);
|
||||
void SetLabelBackgroundColour(const wxColour& colour);
|
||||
wxColour& GetLabelTextColour() const { return (wxColour&) m_labelTextColour; }
|
||||
wxColour& GetLabelBackgroundColour() { return (wxColour&) m_labelBackgroundColour; }
|
||||
wxFont& GetLabelTextFont() { return (wxFont&) m_labelTextFont; }
|
||||
void SetLabelTextFont(const wxFont& fnt) { m_labelTextFont = fnt; }
|
||||
|
||||
// Miscellaneous accessors
|
||||
int GetCursorRow() const { return m_wCursorRow; }
|
||||
int GetCursorColumn() const { return m_wCursorColumn; }
|
||||
void SetGridCursor(int row, int col);
|
||||
int GetRows() const { return m_totalRows; }
|
||||
int GetCols() const { return m_totalCols; }
|
||||
int GetScrollPosX() const { return m_scrollPosX; }
|
||||
int GetScrollPosY() const { return m_scrollPosY; }
|
||||
void SetScrollPosX(int pos) { m_scrollPosX = pos; }
|
||||
void SetScrollPosY(int pos) { m_scrollPosY = pos; }
|
||||
wxTextCtrl *GetTextItem() const { return m_textItem; }
|
||||
wxScrollBar *GetHorizScrollBar() const { return m_hScrollBar; }
|
||||
wxScrollBar *GetVertScrollBar() const { return m_vScrollBar; }
|
||||
bool GetEditable() const { return m_editable; }
|
||||
void SetEditable(bool edit);
|
||||
|
||||
bool GetEditInPlace() const { return m_editInPlace; }
|
||||
void SetEditInPlace(bool edit = TRUE);
|
||||
|
||||
wxRect& GetCurrentRect() const { return (wxRect&) m_currentRect; }
|
||||
bool CurrentCellVisible() const { return m_currentRectVisible; }
|
||||
void SetDividerPen(const wxPen& pen) { m_divisionPen = pen; }
|
||||
wxPen& GetDividerPen() const { return (wxPen&) m_divisionPen; }
|
||||
|
||||
// High-level event handling
|
||||
// Override e.g. to check value of current cell; but call
|
||||
// base member for default processing.
|
||||
virtual void OnSelectCellImplementation(wxDC *dc, int row, int col);
|
||||
|
||||
virtual void OnSelectCell(int WXUNUSED(row), int WXUNUSED(col)) {};
|
||||
void _OnSelectCell(wxGridEvent& event);
|
||||
|
||||
// Override to create your own class of grid cell
|
||||
virtual wxGridCell *OnCreateCell();
|
||||
void _OnCreateCell(wxGridEvent& event);
|
||||
|
||||
// Override to change labels e.g. creation of grid, inserting/deleting a row/col.
|
||||
// By default, auto-labels the grid.
|
||||
virtual void OnChangeLabels();
|
||||
void _OnChangeLabels(wxGridEvent& event);
|
||||
|
||||
// Override to change the label of the edit field when selecting a cell
|
||||
// By default, sets it to e.g. A12
|
||||
virtual void OnChangeSelectionLabel();
|
||||
void _OnChangeSelectionLabel(wxGridEvent& event);
|
||||
|
||||
// Override for event processing
|
||||
virtual void OnCellChange(int WXUNUSED(row), int WXUNUSED(col)) {};
|
||||
virtual void OnCellLeftClick(int WXUNUSED(row), int WXUNUSED(col), int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(control), bool WXUNUSED(shift)) {};
|
||||
virtual void OnCellRightClick(int WXUNUSED(row), int WXUNUSED(col), int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(control), bool WXUNUSED(shift)) {};
|
||||
virtual void OnLabelLeftClick(int WXUNUSED(row), int WXUNUSED(col), int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(control), bool WXUNUSED(shift)) {};
|
||||
virtual void OnLabelRightClick(int WXUNUSED(row), int WXUNUSED(col), int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(control), bool WXUNUSED(shift)) {};
|
||||
|
||||
void _OnCellChange(wxGridEvent& event);
|
||||
void _OnCellLeftClick(wxGridEvent& event);
|
||||
void _OnCellRightClick(wxGridEvent& event);
|
||||
void _OnLabelLeftClick(wxGridEvent& event);
|
||||
void _OnLabelRightClick(wxGridEvent& event);
|
||||
|
||||
// Activation: call from wxFrame::OnActivate
|
||||
void OnActivate(bool active);
|
||||
|
||||
// Miscellaneous
|
||||
void AdjustScrollbars();
|
||||
void UpdateDimensions();
|
||||
|
||||
void SetCurrentRect (int Row, int Column, int canvasW = -1, int canvasH = -1);
|
||||
void HighlightCell(wxDC *dc, bool doHighlight);
|
||||
void DrawCellText();
|
||||
void SetGridClippingRegion(wxDC *dc);
|
||||
|
||||
virtual bool CellHitTest(int x, int y, int *row, int *col);
|
||||
virtual bool LabelSashHitTest(int x, int y, int *orientation, int *rowOrCol, int *startPos);
|
||||
virtual bool LabelHitTest(int x, int y, int *row, int *col);
|
||||
|
||||
// Painting
|
||||
virtual void DrawLabelAreas(wxDC *dc);
|
||||
virtual void DrawEditableArea(wxDC *dc);
|
||||
virtual void DrawGridLines(wxDC *dc);
|
||||
virtual void DrawColumnLabels(wxDC *dc);
|
||||
virtual void DrawColumnLabel(wxDC *dc, wxRect *rect, int col);
|
||||
virtual void DrawRowLabels(wxDC *dc);
|
||||
virtual void DrawRowLabel(wxDC *dc, wxRect *rect, int row);
|
||||
virtual void DrawCells(wxDC *dc);
|
||||
virtual void DrawCellValue(wxDC *dc, wxRect *rect, int row, int col);
|
||||
virtual void DrawCellBackground(wxDC *dc, wxRect *rect, int row, int col);
|
||||
virtual void DrawTextRect(wxDC *dc, const wxString& text, wxRect *rect, int flag);
|
||||
virtual void DrawBitmapRect(wxDC *dc, wxBitmap *bitmap, wxRect *rect, int flag);
|
||||
|
||||
// Refresh cell and optionally set the text field
|
||||
void RefreshCell(int row, int col, bool setText = FALSE);
|
||||
|
||||
// Don't refresh within the outer pair of these.
|
||||
void BeginBatch() { m_batchCount ++; }
|
||||
void EndBatch() { m_batchCount --; }
|
||||
int GetBatchCount() { return m_batchCount; }
|
||||
|
||||
// implementation from now on
|
||||
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnEraseBackground(wxEraseEvent& event);
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnText(wxCommandEvent& ev);
|
||||
void OnTextEnter(wxCommandEvent& ev);
|
||||
void OnTextInPlace(wxCommandEvent& ev);
|
||||
void OnTextInPlaceEnter(wxCommandEvent& ev);
|
||||
void OnGridScroll(wxScrollEvent& ev);
|
||||
|
||||
protected:
|
||||
wxPanel* m_editingPanel; // Contains the text control
|
||||
wxTextCtrl* m_textItem;
|
||||
wxTextCtrl* m_inPlaceTextItem;
|
||||
|
||||
wxScrollBar* m_hScrollBar;
|
||||
wxScrollBar* m_vScrollBar;
|
||||
int m_wCursorRow;
|
||||
int m_wCursorColumn;
|
||||
wxRect m_currentRect;
|
||||
bool m_currentRectVisible;
|
||||
wxGridCell*** m_gridCells;
|
||||
wxGridCell** m_rowLabelCells;
|
||||
wxGridCell** m_colLabelCells;
|
||||
|
||||
bool m_editCreated;
|
||||
bool m_editable;
|
||||
bool m_editInPlace;
|
||||
bool m_inOnTextInPlace;
|
||||
bool m_inScroll;
|
||||
|
||||
int m_totalRows;
|
||||
int m_totalCols;
|
||||
|
||||
// Row and column we're currently looking at
|
||||
int m_scrollPosX;
|
||||
int m_scrollPosY;
|
||||
|
||||
// Dimensions
|
||||
int m_leftOfSheet;
|
||||
int m_topOfSheet;
|
||||
int m_rightOfSheet; // Calculated from m_colWidths
|
||||
int m_bottomOfSheet; // Calculated from m_rowHeights
|
||||
int m_totalGridWidth; // Total 'virtual' size
|
||||
int m_totalGridHeight;
|
||||
int m_viewHeight; // Number of rows displayed
|
||||
int m_viewWidth; // Number of columns displayed
|
||||
int m_cellHeight; // For now, a default
|
||||
int m_verticalLabelWidth;
|
||||
int m_horizontalLabelHeight;
|
||||
int m_verticalLabelAlignment;
|
||||
int m_horizontalLabelAlignment;
|
||||
int m_cellAlignment;
|
||||
short* m_colWidths; // Dynamically allocated
|
||||
short* m_rowHeights; // Dynamically allocated
|
||||
int m_scrollWidth; // Vert. scroll width, horiz. scroll height
|
||||
|
||||
// Colours
|
||||
wxColour m_cellTextColour;
|
||||
wxColour m_cellBackgroundColour;
|
||||
wxFont m_cellTextFont;
|
||||
wxColour m_labelTextColour;
|
||||
wxColour m_labelBackgroundColour;
|
||||
wxBrush m_labelBackgroundBrush;
|
||||
wxFont m_labelTextFont;
|
||||
wxPen m_divisionPen;
|
||||
wxPen m_highlightPen;
|
||||
wxBitmap* m_doubleBufferingBitmap;
|
||||
|
||||
// Position of Edit control
|
||||
wxRect m_editControlPosition;
|
||||
|
||||
// Drag status
|
||||
int m_dragStatus;
|
||||
int m_dragRowOrCol;
|
||||
int m_dragStartPosition;
|
||||
int m_dragLastPosition;
|
||||
wxCursor m_horizontalSashCursor;
|
||||
wxCursor m_verticalSashCursor;
|
||||
|
||||
// To avoid multiple refreshes, use Begin/EndBatch
|
||||
int m_batchCount;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#define wxGRID_TEXT_CTRL 2000
|
||||
#define wxGRID_HSCROLL 2001
|
||||
#define wxGRID_VSCROLL 2002
|
||||
#define wxGRID_EDIT_IN_PLACE_TEXT_CTRL 2003
|
||||
|
||||
class WXDLLEXPORT wxGridCell : public wxObject
|
||||
{
|
||||
public:
|
||||
wxString textValue;
|
||||
wxFont font;
|
||||
wxColour textColour;
|
||||
wxColour backgroundColour;
|
||||
wxBrush backgroundBrush;
|
||||
wxBitmap* cellBitmap;
|
||||
void* cellData; // intended for additional data associated with a cell
|
||||
int alignment;
|
||||
|
||||
wxGridCell(wxGenericGrid *window = (wxGenericGrid *) NULL);
|
||||
~wxGridCell();
|
||||
|
||||
virtual wxString& GetTextValue() const { return (wxString&) textValue; }
|
||||
virtual void SetTextValue(const wxString& str) { textValue = str; }
|
||||
wxFont& GetFont() const { return (wxFont&) font; }
|
||||
void SetFont(const wxFont& f) { font = f; }
|
||||
wxColour& GetTextColour() const { return (wxColour&) textColour; }
|
||||
void SetTextColour(const wxColour& colour) { textColour = colour; }
|
||||
wxColour& GetBackgroundColour() const { return (wxColour&) backgroundColour; }
|
||||
void SetBackgroundColour(const wxColour& colour);
|
||||
wxBrush& GetBackgroundBrush() const { return (wxBrush&) backgroundBrush; }
|
||||
void SetBackgroundBrush(const wxBrush& brush) { backgroundBrush = brush; }
|
||||
int GetAlignment() const { return alignment; }
|
||||
void SetAlignment(int align) { alignment = align; }
|
||||
wxBitmap *GetCellBitmap() const { return cellBitmap; }
|
||||
void SetCellBitmap(wxBitmap *bitmap) { cellBitmap = bitmap; }
|
||||
|
||||
void *SetCellData(void *data) { void *rc = cellData; cellData = data; return rc; }
|
||||
void *GetCellData() const { return cellData; }
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxGrid : public wxGenericGrid
|
||||
{
|
||||
public:
|
||||
wxGrid() : wxGenericGrid() { }
|
||||
wxGrid(wxWindow *parent, int x=-1, int y=-1, int width=-1, int height=-1,
|
||||
long style=0, char *name = "gridWindow")
|
||||
: wxGenericGrid(parent, x, y, width, height, style, name)
|
||||
{
|
||||
}
|
||||
wxGrid(wxWindow *parent, wxWindowID id, const wxPoint& pos,
|
||||
const wxSize& size, long style = 0, const wxString& name = "grid")
|
||||
: wxGenericGrid(parent, id, pos, size, style, name)
|
||||
{
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxGridEvent : public wxCommandEvent
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGridEvent)
|
||||
|
||||
public:
|
||||
wxGridEvent()
|
||||
: wxCommandEvent(), m_row(-1), m_col(-1), m_x(-1), m_y(-1),
|
||||
m_control(0), m_shift(0), m_cell(0)
|
||||
{
|
||||
}
|
||||
|
||||
wxGridEvent(int id, wxEventType type, wxObject* obj,
|
||||
int row=-1, int col=-1, int x=-1, int y=-1,
|
||||
bool control=FALSE, bool shift=FALSE)
|
||||
: wxCommandEvent(type, id), m_row(row), m_col(col), m_x(x), m_y(y),
|
||||
m_control(control), m_shift(shift), m_cell(0)
|
||||
{
|
||||
SetEventObject(obj);
|
||||
}
|
||||
|
||||
//private:
|
||||
int m_row;
|
||||
int m_col;
|
||||
int m_x;
|
||||
int m_y;
|
||||
bool m_control;
|
||||
bool m_shift;
|
||||
wxGridCell* m_cell;
|
||||
|
||||
int GetRow() const { return m_row; }
|
||||
int GetCol() const { return m_col; }
|
||||
wxPoint GetPosition() const { return wxPoint( m_x, m_y ); }
|
||||
wxGridCell* GetCell() const { return m_cell; }
|
||||
bool ControlDown() const { return m_control; }
|
||||
bool ShiftDown() const { return m_shift; }
|
||||
};
|
||||
|
||||
const wxEventType wxEVT_GRID_SELECT_CELL = wxEVT_FIRST + 1575;
|
||||
const wxEventType wxEVT_GRID_CREATE_CELL = wxEVT_FIRST + 1576;
|
||||
const wxEventType wxEVT_GRID_CHANGE_LABELS = wxEVT_FIRST + 1577;
|
||||
const wxEventType wxEVT_GRID_CHANGE_SEL_LABEL = wxEVT_FIRST + 1578;
|
||||
const wxEventType wxEVT_GRID_CELL_CHANGE = wxEVT_FIRST + 1579;
|
||||
const wxEventType wxEVT_GRID_CELL_LCLICK = wxEVT_FIRST + 1580;
|
||||
const wxEventType wxEVT_GRID_CELL_RCLICK = wxEVT_FIRST + 1581;
|
||||
const wxEventType wxEVT_GRID_LABEL_LCLICK = wxEVT_FIRST + 1582;
|
||||
const wxEventType wxEVT_GRID_LABEL_RCLICK = wxEVT_FIRST + 1583;
|
||||
|
||||
|
||||
typedef void (wxEvtHandler::*wxGridEventFunction)(wxGridEvent&);
|
||||
|
||||
#define EVT_GRID_SELECT_CELL(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_SELECT_CELL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
|
||||
#define EVT_GRID_CREATE_CELL(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_CREATE_CELL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
|
||||
#define EVT_GRID_CHANGE_LABELS(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_CHANGE_LABELS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
|
||||
#define EVT_GRID_CHANGE_SEL_LABEL(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_CHANGE_SEL_LABEL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
|
||||
#define EVT_GRID_CELL_CHANGE(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_CELL_CHANGE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
|
||||
#define EVT_GRID_CELL_LCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_CELL_LCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
|
||||
#define EVT_GRID_CELL_RCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_CELL_RCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
|
||||
#define EVT_GRID_LABEL_LCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_LABEL_LCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
|
||||
#define EVT_GRID_LABEL_RCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_GRID_LABEL_RCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL),
|
||||
|
||||
#endif // wxUSE_GRID
|
||||
|
||||
#endif // __GRIDH_G__
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if defined(wxUSE_NEW_GRID) && (wxUSE_NEW_GRID)
|
||||
#if wxUSE_NEW_GRID
|
||||
|
||||
#ifndef __WXGRIDSEL_H__
|
||||
#define __WXGRIDSEL_H__
|
||||
@ -88,4 +88,5 @@ private:
|
||||
};
|
||||
|
||||
#endif // #ifdef __WXGRIDSEL_H__
|
||||
#endif // #ifndef wxUSE_NEW_GRID
|
||||
#endif // #ifndef wxUSE_GRID
|
||||
|
||||
|
@ -65,7 +65,6 @@ AC_OUTPUT([
|
||||
mobile/styles/Makefile
|
||||
multimon/Makefile
|
||||
nativedlg/Makefile
|
||||
newgrid/Makefile
|
||||
notebook/Makefile
|
||||
oleauto/Makefile
|
||||
ownerdrw/Makefile
|
||||
|
@ -1,11 +1,21 @@
|
||||
# Purpose: makefile for grid example (UNIX).
|
||||
# Created: 2000-03-15
|
||||
#
|
||||
# File: makefile.unx
|
||||
# Author: Julian Smart
|
||||
# Created: 1998
|
||||
# Updated:
|
||||
# Copyright: (c) 1998 Julian Smart
|
||||
#
|
||||
# "%W% %G%"
|
||||
#
|
||||
# Makefile for wxGrid example (UNIX).
|
||||
|
||||
top_srcdir = @top_srcdir@/..
|
||||
top_builddir = ../..
|
||||
program_dir = samples/grid
|
||||
|
||||
PROGRAM=grid
|
||||
DATAFILES =
|
||||
|
||||
PROGRAM=griddemo
|
||||
|
||||
OBJECTS =$(PROGRAM).o
|
||||
DEPFILES=$(PROGRAM).d
|
||||
@ -13,4 +23,3 @@ DEPFILES=$(PROGRAM).d
|
||||
include ../../src/makeprog.env
|
||||
|
||||
@IF_GNU_MAKE@-include $(DEPFILES)
|
||||
|
||||
|
@ -1,350 +0,0 @@
|
||||
/*
|
||||
* File: grid.cpp
|
||||
* Purpose: wxGrid test
|
||||
|
||||
PLEASE NOTE: this sample is deprecated. See
|
||||
newgrid for a sample based on the newer wxGrid API.
|
||||
|
||||
* Author: Julian Smart
|
||||
* Created: 1995
|
||||
* Updated:
|
||||
* Copyright: (c) 1995, AIAI, University of Edinburgh
|
||||
*/
|
||||
|
||||
static const char sccsid[] = "%W% %G%";
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/grid.h"
|
||||
#include "wx/colordlg.h"
|
||||
|
||||
// Define a new application type
|
||||
class MyApp: public wxApp
|
||||
{
|
||||
public:
|
||||
virtual bool OnInit(void);
|
||||
virtual int OnExit();
|
||||
};
|
||||
|
||||
|
||||
// Define a new frame type
|
||||
class MyFrame: public wxFrame
|
||||
{ public:
|
||||
wxGrid *grid;
|
||||
MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||
|
||||
void ToggleEditable(wxCommandEvent& event);
|
||||
void ToggleEditInPlace(wxCommandEvent& event);
|
||||
void ToggleRowLabel(wxCommandEvent& event);
|
||||
void ToggleColLabel(wxCommandEvent& event);
|
||||
void ToggleDividers(wxCommandEvent& event);
|
||||
void LeftCell(wxCommandEvent& event);
|
||||
void CentreCell(wxCommandEvent& event);
|
||||
void RightCell(wxCommandEvent& event);
|
||||
void ColourLabelBackground(wxCommandEvent& event);
|
||||
void ColourLabelText(wxCommandEvent& event);
|
||||
void NormalLabelColouring(wxCommandEvent& event);
|
||||
void ColourCellBackground(wxCommandEvent& event);
|
||||
void ColourCellText(wxCommandEvent& event);
|
||||
void NormalCellColouring(wxCommandEvent& event);
|
||||
void Quit(wxCommandEvent& event);
|
||||
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
wxBitmap *cellBitmap1 = (wxBitmap *) NULL;
|
||||
wxBitmap *cellBitmap2 = (wxBitmap *) NULL;
|
||||
|
||||
// ID for the menu quit command
|
||||
#define GRID_QUIT 1
|
||||
#define GRID_TOGGLE_EDITABLE 2
|
||||
#define GRID_TOGGLE_EDITINPLACE 22
|
||||
#define GRID_LEFT_CELL 3
|
||||
#define GRID_CENTRE_CELL 4
|
||||
#define GRID_RIGHT_CELL 5
|
||||
#define GRID_TOGGLE_ROW_LABEL 6
|
||||
#define GRID_TOGGLE_COL_LABEL 7
|
||||
#define GRID_COLOUR_LABEL_BACKGROUND 8
|
||||
#define GRID_COLOUR_LABEL_TEXT 9
|
||||
#define GRID_NORMAL_LABEL_COLOURING 10
|
||||
#define GRID_COLOUR_CELL_BACKGROUND 11
|
||||
#define GRID_COLOUR_CELL_TEXT 12
|
||||
#define GRID_NORMAL_CELL_COLOURING 13
|
||||
#define GRID_TOGGLE_DIVIDERS 14
|
||||
|
||||
// Main proc
|
||||
|
||||
IMPLEMENT_APP(MyApp)
|
||||
|
||||
// `Main program' equivalent, creating windows and returning main app frame
|
||||
bool MyApp::OnInit(void)
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
cellBitmap1 = new wxBitmap(_T("bitmap1"));
|
||||
cellBitmap2 = new wxBitmap(_T("bitmap2"));
|
||||
#endif
|
||||
|
||||
// Create the main frame window
|
||||
MyFrame *frame = new MyFrame(NULL, _T("wxGrid Sample"), wxPoint(50, 50), wxSize(450, 300));
|
||||
|
||||
// Give it an icon
|
||||
#ifdef __WXMSW__
|
||||
frame->SetIcon(wxIcon(_T("mondrian")));
|
||||
#endif
|
||||
|
||||
// Make a menubar
|
||||
wxMenu *file_menu = new wxMenu;
|
||||
file_menu->Append(GRID_QUIT, _T("E&xit"));
|
||||
|
||||
wxMenu *settings_menu = new wxMenu;
|
||||
settings_menu->Append(GRID_TOGGLE_EDITABLE, _T("&Toggle editable"));
|
||||
settings_menu->Append(GRID_TOGGLE_EDITINPLACE, _T("&Toggle edit in place"));
|
||||
settings_menu->Append(GRID_TOGGLE_ROW_LABEL, _T("Toggle ro&w label"));
|
||||
settings_menu->Append(GRID_TOGGLE_COL_LABEL, _T("Toggle co&l label"));
|
||||
settings_menu->Append(GRID_TOGGLE_DIVIDERS, _T("Toggle ÷rs"));
|
||||
settings_menu->AppendSeparator();
|
||||
settings_menu->Append(GRID_LEFT_CELL, _T("&Left cell alignment "));
|
||||
settings_menu->Append(GRID_CENTRE_CELL, _T("&Centre cell alignment "));
|
||||
settings_menu->Append(GRID_RIGHT_CELL, _T("&Right cell alignment "));
|
||||
settings_menu->AppendSeparator();
|
||||
settings_menu->Append(GRID_COLOUR_LABEL_BACKGROUND, _T("Choose a label &background colour"));
|
||||
settings_menu->Append(GRID_COLOUR_LABEL_TEXT, _T("Choose a label fore&ground colour"));
|
||||
settings_menu->Append(GRID_NORMAL_LABEL_COLOURING, _T("&Normal label colouring"));
|
||||
settings_menu->AppendSeparator();
|
||||
settings_menu->Append(GRID_COLOUR_CELL_BACKGROUND, _T("Choo&se a cell &background colour"));
|
||||
settings_menu->Append(GRID_COLOUR_CELL_TEXT, _T("Choose &a cell foreground colour"));
|
||||
settings_menu->Append(GRID_NORMAL_CELL_COLOURING, _T("N&ormal cell colouring"));
|
||||
|
||||
wxMenuBar *menu_bar = new wxMenuBar;
|
||||
menu_bar->Append(file_menu, _T("&File"));
|
||||
menu_bar->Append(settings_menu, _T("&Settings"));
|
||||
frame->SetMenuBar(menu_bar);
|
||||
|
||||
// Make a grid
|
||||
frame->grid = new wxGrid(frame, 0, 0, 400, 400);
|
||||
|
||||
frame->grid->CreateGrid(10, 8);
|
||||
frame->grid->SetColumnWidth(3, 200);
|
||||
frame->grid->SetRowHeight(4, 45);
|
||||
frame->grid->SetCellValue(_T("First cell"), 0, 0);
|
||||
frame->grid->SetCellValue(_T("Another cell"), 1, 1);
|
||||
frame->grid->SetCellValue(_T("Yet another cell"), 2, 2);
|
||||
frame->grid->SetCellTextFont(wxFont(10, wxROMAN, wxITALIC, wxNORMAL), 0, 0);
|
||||
frame->grid->SetCellTextColour(*wxRED, 1, 1);
|
||||
frame->grid->SetCellBackgroundColour(*wxCYAN, 2, 2);
|
||||
if (cellBitmap1 && cellBitmap2)
|
||||
{
|
||||
frame->grid->SetCellAlignment(wxCENTRE, 5, 0);
|
||||
frame->grid->SetCellAlignment(wxCENTRE, 6, 0);
|
||||
frame->grid->SetCellBitmap(cellBitmap1, 5, 0);
|
||||
frame->grid->SetCellBitmap(cellBitmap2, 6, 0);
|
||||
}
|
||||
|
||||
frame->grid->UpdateDimensions();
|
||||
|
||||
// Show the frame
|
||||
frame->Show(TRUE);
|
||||
|
||||
wxMessageBox(wxT("Please note: this is an obsolete sample using the old wxGrid API.\nPlease compile newgrid instead."), wxT("wxGrid"), wxICON_INFORMATION|wxOK, frame);
|
||||
|
||||
SetTopWindow(frame);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int MyApp::OnExit()
|
||||
{
|
||||
if (cellBitmap1)
|
||||
{
|
||||
delete cellBitmap1;
|
||||
cellBitmap1 = (wxBitmap *) NULL;
|
||||
}
|
||||
|
||||
if (cellBitmap2)
|
||||
{
|
||||
delete cellBitmap2;
|
||||
cellBitmap1 = (wxBitmap *) NULL;
|
||||
}
|
||||
|
||||
// exit code is 0, everything is ok
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// My frame constructor
|
||||
MyFrame::MyFrame(wxFrame *frame, const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size):
|
||||
wxFrame(frame, -1, title, pos, size)
|
||||
{
|
||||
grid = (wxGrid*) NULL;
|
||||
}
|
||||
|
||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU(GRID_TOGGLE_EDITABLE, MyFrame::ToggleEditable)
|
||||
EVT_MENU(GRID_TOGGLE_EDITINPLACE, MyFrame::ToggleEditInPlace)
|
||||
EVT_MENU(GRID_TOGGLE_ROW_LABEL, MyFrame::ToggleRowLabel)
|
||||
EVT_MENU(GRID_TOGGLE_COL_LABEL, MyFrame::ToggleColLabel)
|
||||
EVT_MENU(GRID_TOGGLE_DIVIDERS, MyFrame::ToggleDividers)
|
||||
EVT_MENU(GRID_LEFT_CELL, MyFrame::LeftCell)
|
||||
EVT_MENU(GRID_CENTRE_CELL, MyFrame::CentreCell)
|
||||
EVT_MENU(GRID_RIGHT_CELL, MyFrame::RightCell)
|
||||
EVT_MENU(GRID_COLOUR_LABEL_BACKGROUND, MyFrame::ColourLabelBackground)
|
||||
EVT_MENU(GRID_COLOUR_LABEL_TEXT, MyFrame::ColourLabelText)
|
||||
EVT_MENU(GRID_NORMAL_LABEL_COLOURING, MyFrame::NormalLabelColouring)
|
||||
EVT_MENU(GRID_COLOUR_CELL_BACKGROUND, MyFrame::ColourCellBackground)
|
||||
EVT_MENU(GRID_COLOUR_CELL_TEXT, MyFrame::ColourCellText)
|
||||
EVT_MENU(GRID_NORMAL_CELL_COLOURING, MyFrame::NormalCellColouring)
|
||||
EVT_MENU(GRID_QUIT, MyFrame::Quit)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
void MyFrame::ToggleEditable(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
grid->SetEditable(!grid->GetEditable());
|
||||
grid->Refresh();
|
||||
}
|
||||
|
||||
void MyFrame::ToggleEditInPlace(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
grid->SetEditInPlace(!grid->GetEditInPlace());
|
||||
grid->Refresh();
|
||||
}
|
||||
|
||||
void MyFrame::ToggleRowLabel(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
if (grid->GetLabelSize(wxVERTICAL) > 0)
|
||||
grid->SetLabelSize(wxVERTICAL, 0);
|
||||
else
|
||||
grid->SetLabelSize(wxVERTICAL, 40);
|
||||
|
||||
grid->Refresh();
|
||||
}
|
||||
|
||||
void MyFrame::ToggleColLabel(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
if (grid->GetLabelSize(wxHORIZONTAL) > 0)
|
||||
grid->SetLabelSize(wxHORIZONTAL, 0);
|
||||
else
|
||||
grid->SetLabelSize(wxHORIZONTAL, 20);
|
||||
|
||||
grid->Refresh();
|
||||
}
|
||||
|
||||
void MyFrame::ToggleDividers(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
if (!grid->GetDividerPen().Ok())
|
||||
grid->SetDividerPen(wxPen(wxT("LIGHT GREY"), 1, wxSOLID));
|
||||
else
|
||||
grid->SetDividerPen(wxNullPen);
|
||||
|
||||
grid->Refresh();
|
||||
}
|
||||
|
||||
void MyFrame::LeftCell(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
grid->SetCellAlignment(wxLEFT);
|
||||
grid->Refresh();
|
||||
}
|
||||
|
||||
void MyFrame::CentreCell(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
grid->SetCellAlignment(wxCENTRE);
|
||||
grid->Refresh();
|
||||
}
|
||||
|
||||
void MyFrame::RightCell(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
grid->SetCellAlignment(wxRIGHT);
|
||||
grid->Refresh();
|
||||
}
|
||||
|
||||
void MyFrame::ColourLabelBackground(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxColourData data;
|
||||
data.SetChooseFull(TRUE);
|
||||
wxColourDialog dialog(this, &data);
|
||||
if (dialog.ShowModal() != wxID_CANCEL)
|
||||
{
|
||||
wxColourData retData = dialog.GetColourData();
|
||||
wxColour col = retData.GetColour();
|
||||
grid->SetLabelBackgroundColour(col);
|
||||
grid->Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
void MyFrame::ColourLabelText(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxColourData data;
|
||||
data.SetChooseFull(TRUE);
|
||||
wxColourDialog dialog(this, &data);
|
||||
if (dialog.ShowModal() != wxID_CANCEL)
|
||||
{
|
||||
wxColourData retData = dialog.GetColourData();
|
||||
wxColour col = retData.GetColour();
|
||||
grid->SetLabelTextColour(col);
|
||||
grid->Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
void MyFrame::NormalLabelColouring(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
grid->SetLabelBackgroundColour(*wxLIGHT_GREY);
|
||||
grid->SetLabelTextColour(*wxBLACK);
|
||||
grid->Refresh();
|
||||
}
|
||||
|
||||
void MyFrame::ColourCellBackground(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxColourData data;
|
||||
data.SetChooseFull(TRUE);
|
||||
wxColourDialog dialog(this, &data);
|
||||
if (dialog.ShowModal() != wxID_CANCEL)
|
||||
{
|
||||
wxColourData retData = dialog.GetColourData();
|
||||
wxColour col = retData.GetColour();
|
||||
grid->SetCellBackgroundColour(col);
|
||||
grid->Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
void MyFrame::ColourCellText(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxColourData data;
|
||||
data.SetChooseFull(TRUE);
|
||||
wxColourDialog dialog(this, &data);
|
||||
if (dialog.ShowModal() != wxID_CANCEL)
|
||||
{
|
||||
wxColourData retData = dialog.GetColourData();
|
||||
wxColour col = retData.GetColour();
|
||||
grid->SetCellTextColour(col);
|
||||
grid->Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
void MyFrame::NormalCellColouring(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
grid->SetCellBackgroundColour(*wxWHITE);
|
||||
grid->SetCellTextColour(*wxBLACK);
|
||||
grid->Refresh();
|
||||
}
|
||||
|
||||
void MyFrame::Quit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
this->Close(TRUE);
|
||||
}
|
||||
|
||||
// Ensure that the grid's edit control always has the focus.
|
||||
void MyFrame::OnActivate(wxActivateEvent& event)
|
||||
{
|
||||
if (grid) grid->OnActivate(event.GetActive());
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
NAME Grid
|
||||
DESCRIPTION 'wxTableWindow Test'
|
||||
EXETYPE WINDOWS
|
||||
STUB 'WINSTUB.EXE'
|
||||
CODE PRELOAD MOVEABLE DISCARDABLE
|
||||
DATA PRELOAD MOVEABLE MULTIPLE
|
||||
HEAPSIZE 1024
|
||||
STACKSIZE 16192
|
@ -1,5 +0,0 @@
|
||||
#include "wx/msw/wx.rc"
|
||||
|
||||
bitmap1 BITMAP "bitmap1.bmp"
|
||||
bitmap2 BITMAP "bitmap2.bmp"
|
||||
|
1361
samples/grid/griddemo.cpp
Normal file
1361
samples/grid/griddemo.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,26 +1,26 @@
|
||||
# Microsoft Developer Studio Project File - Name="grid" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Project File - Name="griddemo" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=grid - Win32 Debug
|
||||
CFG=griddemo - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "grid.mak".
|
||||
!MESSAGE NMAKE /f "griddemo.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "grid.mak" CFG="grid - Win32 Debug"
|
||||
!MESSAGE NMAKE /f "griddemo.mak" CFG="griddemo - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "grid - Win32 Release DLL" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "grid - Win32 Debug DLL" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "grid - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "grid - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "griddemo - Win32 Release DLL" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "griddemo - Win32 Debug DLL" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "griddemo - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "griddemo - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
@ -30,7 +30,7 @@ CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!ELSEIF "$(CFG)" == "grid - Win32 Release DLL"
|
||||
!ELSEIF "$(CFG)" == "griddemo - Win32 Release DLL"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
@ -44,11 +44,11 @@ RSC=rc.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c
|
||||
# ADD CPP /nologo /W4 /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MD /D WXUSINGDLL /I..\..\lib\mswdll
|
||||
# ADD CPP /nologo /W4 /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MD /D WXUSINGDLL /I..\..\lib\mswdll
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG" /I "../../include"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG" /I "../../include"
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG" /I "..\..\include"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG" /I "..\..\include"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
@ -56,7 +56,7 @@ LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 ..\..\lib\wxmsw250.lib
|
||||
|
||||
!ELSEIF "$(CFG)" == "grid - Win32 Debug DLL"
|
||||
!ELSEIF "$(CFG)" == "griddemo - Win32 Debug DLL"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
@ -70,11 +70,11 @@ LINK32=link.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c
|
||||
# ADD CPP /nologo /W4 /Zi /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MDd /D "__WXDEBUG__" /D "WXDEBUG=1" /D WXUSINGDLL /I..\..\lib\mswdlld
|
||||
# ADD CPP /nologo /W4 /Zi /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MDd /D "__WXDEBUG__" /D "WXDEBUG=1" /D WXUSINGDLL /I..\..\lib\mswdlld
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG" /I "../../include"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /I "../../include"
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG" /I "..\..\include"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /I "..\..\include"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
@ -82,7 +82,7 @@ LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept ..\..\lib\wxmsw250d.lib
|
||||
|
||||
!ELSEIF "$(CFG)" == "grid - Win32 Release"
|
||||
!ELSEIF "$(CFG)" == "griddemo - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
@ -96,11 +96,11 @@ LINK32=link.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c
|
||||
# ADD CPP /nologo /W4 /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MD /I..\..\lib\msw
|
||||
# ADD CPP /nologo /W4 /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MD /I..\..\lib\msw
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG" /I "../../include"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG" /I "../../include"
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG" /I "..\..\include"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG" /I "..\..\include"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
@ -108,7 +108,7 @@ LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 ..\..\lib\zlib.lib ..\..\lib\regex.lib ..\..\lib\png.lib ..\..\lib\jpeg.lib ..\..\lib\tiff.lib ..\..\lib\wxmsw.lib
|
||||
|
||||
!ELSEIF "$(CFG)" == "grid - Win32 Debug"
|
||||
!ELSEIF "$(CFG)" == "griddemo - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
@ -122,11 +122,11 @@ LINK32=link.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c
|
||||
# ADD CPP /nologo /W4 /Zi /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MDd /D "__WXDEBUG__" /D "WXDEBUG=1" /I..\..\lib\mswd
|
||||
# ADD CPP /nologo /W4 /Zi /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MDd /D "__WXDEBUG__" /D "WXDEBUG=1" /I..\..\lib\mswd
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG" /I "../../include"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /I "../../include"
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG" /I "..\..\include"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /I "..\..\include"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
@ -138,17 +138,17 @@ LINK32=link.exe
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "grid - Win32 Release DLL"
|
||||
# Name "grid - Win32 Debug DLL"
|
||||
# Name "grid - Win32 Release"
|
||||
# Name "grid - Win32 Debug"
|
||||
# Name "griddemo - Win32 Release DLL"
|
||||
# Name "griddemo - Win32 Debug DLL"
|
||||
# Name "griddemo - Win32 Release"
|
||||
# Name "griddemo - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\grid.cpp
|
||||
SOURCE=.\griddemo.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\grid.rc
|
||||
SOURCE=.\griddemo.rc
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
261
samples/grid/griddemo.h
Normal file
261
samples/grid/griddemo.h
Normal file
@ -0,0 +1,261 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: griddemo.h
|
||||
// Purpose: Grid control wxWindows sample
|
||||
// Author: Michael Bedward
|
||||
// Modified by:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Michael Bedward, Julian Smart
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef griddemo_h
|
||||
#define griddemo_h
|
||||
|
||||
#if !defined(wxUSE_NEW_GRID) || !(wxUSE_NEW_GRID)
|
||||
#error "This sample requires the new wxGrid class."
|
||||
#endif
|
||||
|
||||
class wxGrid;
|
||||
|
||||
class GridApp : public wxApp
|
||||
{
|
||||
public:
|
||||
bool OnInit();
|
||||
};
|
||||
|
||||
|
||||
class GridFrame : public wxFrame
|
||||
{
|
||||
wxGrid *grid;
|
||||
wxTextCtrl *logWin;
|
||||
wxLogTextCtrl *logger;
|
||||
wxString logBuf;
|
||||
|
||||
void SetDefaults();
|
||||
|
||||
void ToggleRowLabels( wxCommandEvent& );
|
||||
void ToggleColLabels( wxCommandEvent& );
|
||||
void ToggleEditing( wxCommandEvent& );
|
||||
void ToggleRowSizing( wxCommandEvent& );
|
||||
void ToggleColSizing( wxCommandEvent& );
|
||||
void ToggleGridSizing( wxCommandEvent& );
|
||||
void ToggleGridLines( wxCommandEvent& );
|
||||
void AutoSizeCols( wxCommandEvent& );
|
||||
void CellOverflow( wxCommandEvent& );
|
||||
void ResizeCell( wxCommandEvent& );
|
||||
void SetLabelColour( wxCommandEvent& );
|
||||
void SetLabelTextColour( wxCommandEvent& );
|
||||
void SetLabelFont(wxCommandEvent &);
|
||||
void SetRowLabelHorizAlignment( wxCommandEvent& );
|
||||
void SetRowLabelVertAlignment( wxCommandEvent& );
|
||||
void SetColLabelHorizAlignment( wxCommandEvent& );
|
||||
void SetColLabelVertAlignment( wxCommandEvent& );
|
||||
void SetGridLineColour( wxCommandEvent& );
|
||||
|
||||
void SetCellFgColour(wxCommandEvent &);
|
||||
void SetCellBgColour(wxCommandEvent &);
|
||||
|
||||
void InsertRow( wxCommandEvent& );
|
||||
void InsertCol( wxCommandEvent& );
|
||||
void DeleteSelectedRows( wxCommandEvent& );
|
||||
void DeleteSelectedCols( wxCommandEvent& );
|
||||
void ClearGrid( wxCommandEvent& );
|
||||
void SelectCells( wxCommandEvent& );
|
||||
void SelectRows( wxCommandEvent& );
|
||||
void SelectCols( wxCommandEvent& );
|
||||
|
||||
void DeselectCell(wxCommandEvent& event);
|
||||
void DeselectCol(wxCommandEvent& event);
|
||||
void DeselectRow(wxCommandEvent& event);
|
||||
void DeselectAll(wxCommandEvent& event);
|
||||
void SelectCell(wxCommandEvent& event);
|
||||
void SelectCol(wxCommandEvent& event);
|
||||
void SelectRow(wxCommandEvent& event);
|
||||
void SelectAll(wxCommandEvent& event);
|
||||
void OnAddToSelectToggle(wxCommandEvent& event);
|
||||
|
||||
void OnLabelLeftClick( wxGridEvent& );
|
||||
void OnCellLeftClick( wxGridEvent& );
|
||||
void OnRowSize( wxGridSizeEvent& );
|
||||
void OnColSize( wxGridSizeEvent& );
|
||||
void OnSelectCell( wxGridEvent& );
|
||||
void OnRangeSelected( wxGridRangeSelectEvent& );
|
||||
void OnCellValueChanged( wxGridEvent& );
|
||||
|
||||
void OnEditorShown(wxGridEvent&);
|
||||
void OnEditorHidden(wxGridEvent&);
|
||||
|
||||
void OnSetHighlightWidth(wxCommandEvent&);
|
||||
void OnSetROHighlightWidth(wxCommandEvent&);
|
||||
|
||||
public:
|
||||
GridFrame();
|
||||
~GridFrame();
|
||||
|
||||
void OnQuit( wxCommandEvent& );
|
||||
void About( wxCommandEvent& );
|
||||
void OnVTable( wxCommandEvent& );
|
||||
void OnBugsTable( wxCommandEvent& );
|
||||
void OnSmallGrid( wxCommandEvent& );
|
||||
|
||||
enum
|
||||
{
|
||||
ID_TOGGLEROWLABELS = 100,
|
||||
ID_TOGGLECOLLABELS,
|
||||
ID_TOGGLEEDIT,
|
||||
ID_TOGGLEROWSIZING,
|
||||
ID_TOGGLECOLSIZING,
|
||||
ID_TOGGLEGRIDSIZING,
|
||||
ID_TOGGLEGRIDLINES,
|
||||
ID_AUTOSIZECOLS,
|
||||
ID_CELLOVERFLOW,
|
||||
ID_RESIZECELL,
|
||||
ID_SETLABELCOLOUR,
|
||||
ID_SETLABELTEXTCOLOUR,
|
||||
ID_SETLABEL_FONT,
|
||||
ID_ROWLABELALIGN,
|
||||
ID_ROWLABELHORIZALIGN,
|
||||
ID_ROWLABELVERTALIGN,
|
||||
ID_COLLABELALIGN,
|
||||
ID_COLLABELHORIZALIGN,
|
||||
ID_COLLABELVERTALIGN,
|
||||
ID_GRIDLINECOLOUR,
|
||||
ID_INSERTROW,
|
||||
ID_INSERTCOL,
|
||||
ID_DELETEROW,
|
||||
ID_DELETECOL,
|
||||
ID_CLEARGRID,
|
||||
ID_CHANGESEL,
|
||||
ID_SELCELLS,
|
||||
ID_SELROWS,
|
||||
ID_SELCOLS,
|
||||
ID_SET_CELL_FG_COLOUR,
|
||||
ID_SET_CELL_BG_COLOUR,
|
||||
ID_ABOUT,
|
||||
ID_VTABLE,
|
||||
ID_BUGS_TABLE,
|
||||
ID_SMALL_GRID,
|
||||
ID_SELECT_UNSELECT,
|
||||
ID_SELECT_ALL,
|
||||
ID_SELECT_ROW,
|
||||
ID_SELECT_COL,
|
||||
ID_SELECT_CELL,
|
||||
ID_DESELECT_ALL,
|
||||
ID_DESELECT_ROW,
|
||||
ID_DESELECT_COL,
|
||||
ID_DESELECT_CELL,
|
||||
|
||||
ID_SET_HIGHLIGHT_WIDTH,
|
||||
ID_SET_RO_HIGHLIGHT_WIDTH,
|
||||
|
||||
ID_TESTFUNC
|
||||
};
|
||||
|
||||
wxLog *m_logOld;
|
||||
|
||||
// add the cells to selection when using commands from select menu?
|
||||
bool m_addToSel;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
class MyGridCellRenderer : public wxGridCellStringRenderer
|
||||
{
|
||||
public:
|
||||
virtual void Draw(wxGrid& grid,
|
||||
wxGridCellAttr& attr,
|
||||
wxDC& dc,
|
||||
const wxRect& rect,
|
||||
int row, int col,
|
||||
bool isSelected);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// demonstration of virtual table which doesn't store all of its data in
|
||||
// memory
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class BigGridTable : public wxGridTableBase
|
||||
{
|
||||
public:
|
||||
BigGridTable(long sizeGrid) { m_sizeGrid = sizeGrid; }
|
||||
|
||||
int GetNumberRows() { return m_sizeGrid; }
|
||||
int GetNumberCols() { return m_sizeGrid; }
|
||||
wxString GetValue( int row, int col )
|
||||
{
|
||||
return wxString::Format(wxT("(%d, %d)"), row, col);
|
||||
}
|
||||
|
||||
void SetValue( int , int , const wxString& ) { /* ignore */ }
|
||||
bool IsEmptyCell( int , int ) { return FALSE; }
|
||||
|
||||
private:
|
||||
long m_sizeGrid;
|
||||
};
|
||||
|
||||
class BigGridFrame : public wxFrame
|
||||
{
|
||||
public:
|
||||
BigGridFrame(long sizeGrid);
|
||||
|
||||
private:
|
||||
wxGrid* m_grid;
|
||||
BigGridTable* m_table;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// an example of custom attr provider: this one makes all odd rows appear grey
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class MyGridCellAttrProvider : public wxGridCellAttrProvider
|
||||
{
|
||||
public:
|
||||
MyGridCellAttrProvider();
|
||||
virtual ~MyGridCellAttrProvider();
|
||||
|
||||
virtual wxGridCellAttr *GetAttr(int row, int col,
|
||||
wxGridCellAttr::wxAttrKind kind) const;
|
||||
|
||||
private:
|
||||
wxGridCellAttr *m_attrForOddRows;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// another, more realistic, grid example: shows typed columns and more
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class BugsGridTable : public wxGridTableBase
|
||||
{
|
||||
public:
|
||||
BugsGridTable();
|
||||
|
||||
virtual int GetNumberRows();
|
||||
virtual int GetNumberCols();
|
||||
virtual bool IsEmptyCell( int row, int col );
|
||||
virtual wxString GetValue( int row, int col );
|
||||
virtual void SetValue( int row, int col, const wxString& value );
|
||||
|
||||
virtual wxString GetColLabelValue( int col );
|
||||
|
||||
virtual wxString GetTypeName( int row, int col );
|
||||
virtual bool CanGetValueAs( int row, int col, const wxString& typeName );
|
||||
virtual bool CanSetValueAs( int row, int col, const wxString& typeName );
|
||||
|
||||
virtual long GetValueAsLong( int row, int col );
|
||||
virtual bool GetValueAsBool( int row, int col );
|
||||
|
||||
virtual void SetValueAsLong( int row, int col, long value );
|
||||
virtual void SetValueAsBool( int row, int col, bool value );
|
||||
};
|
||||
|
||||
class BugsGridFrame : public wxFrame
|
||||
{
|
||||
public:
|
||||
BugsGridFrame();
|
||||
};
|
||||
|
||||
|
||||
#endif // griddemo_h
|
||||
|
@ -12,6 +12,6 @@ CONFIG = wx
|
||||
#WXCONFIGS = Debug Release DebugDll ReleaseDll
|
||||
|
||||
# project files
|
||||
SOURCES = grid.cpp
|
||||
RC_FILE = grid.rc
|
||||
TARGET = grid
|
||||
SOURCES = griddemo.cpp
|
||||
RC_FILE = griddemo.rc
|
||||
TARGET = griddemo
|
2
samples/grid/griddemo.rc
Normal file
2
samples/grid/griddemo.rc
Normal file
@ -0,0 +1,2 @@
|
||||
#include "wx/msw/wx.rc"
|
||||
|
@ -480,7 +480,7 @@
|
||||
<SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>
|
||||
<SETTING><NAME>MWMerge_MacOS_skipResources</NAME>
|
||||
<SETTING><VALUE></VALUE></SETTING>
|
||||
<SETTING><VALUE>”¹à</VALUE></SETTING>
|
||||
<SETTING><VALUE>”Ý<EFBFBD></VALUE></SETTING>
|
||||
<SETTING><VALUE> =ÃH</VALUE></SETTING>
|
||||
<SETTING><VALUE> =Ø:</VALUE></SETTING>
|
||||
</SETTING>
|
||||
@ -556,7 +556,7 @@
|
||||
|
||||
<!-- Settings for "PPC Project" panel -->
|
||||
<SETTING><NAME>MWProject_PPC_type</NAME><VALUE>Application</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>grid Classic Release</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>griddemo Classic Release</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1095782476</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_size</NAME><VALUE>3840</VALUE></SETTING>
|
||||
@ -664,7 +664,7 @@
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>grid.cpp</PATH>
|
||||
<PATH>griddemo.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
@ -891,7 +891,7 @@
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>grid.cpp</PATH>
|
||||
<PATH>griddemo.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
@ -1456,7 +1456,7 @@
|
||||
<SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>
|
||||
<SETTING><NAME>MWMerge_MacOS_skipResources</NAME>
|
||||
<SETTING><VALUE></VALUE></SETTING>
|
||||
<SETTING><VALUE>”¹à</VALUE></SETTING>
|
||||
<SETTING><VALUE>”Ý<EFBFBD></VALUE></SETTING>
|
||||
<SETTING><VALUE> =ÃH</VALUE></SETTING>
|
||||
<SETTING><VALUE> =Ø:</VALUE></SETTING>
|
||||
</SETTING>
|
||||
@ -1532,7 +1532,7 @@
|
||||
|
||||
<!-- Settings for "PPC Project" panel -->
|
||||
<SETTING><NAME>MWProject_PPC_type</NAME><VALUE>Application</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>grid Classic Debug</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>griddemo Classic Debug</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1095782476</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_size</NAME><VALUE>3840</VALUE></SETTING>
|
||||
@ -1640,7 +1640,7 @@
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>grid.cpp</PATH>
|
||||
<PATH>griddemo.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
@ -1867,7 +1867,7 @@
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>grid.cpp</PATH>
|
||||
<PATH>griddemo.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
@ -2424,7 +2424,7 @@
|
||||
<SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>
|
||||
<SETTING><NAME>MWMerge_MacOS_skipResources</NAME>
|
||||
<SETTING><VALUE></VALUE></SETTING>
|
||||
<SETTING><VALUE>”¹à</VALUE></SETTING>
|
||||
<SETTING><VALUE>”Ý<EFBFBD></VALUE></SETTING>
|
||||
<SETTING><VALUE> =ÃH</VALUE></SETTING>
|
||||
<SETTING><VALUE> =Ø:</VALUE></SETTING>
|
||||
</SETTING>
|
||||
@ -2500,7 +2500,7 @@
|
||||
|
||||
<!-- Settings for "PPC Project" panel -->
|
||||
<SETTING><NAME>MWProject_PPC_type</NAME><VALUE>Application</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>grid Carbon Debug</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>griddemo Carbon Debug</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1095782476</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_size</NAME><VALUE>3840</VALUE></SETTING>
|
||||
@ -2608,7 +2608,7 @@
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>grid.cpp</PATH>
|
||||
<PATH>griddemo.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
@ -2681,7 +2681,7 @@
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>grid.cpp</PATH>
|
||||
<PATH>griddemo.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
@ -3128,7 +3128,7 @@
|
||||
<SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>
|
||||
<SETTING><NAME>MWMerge_MacOS_skipResources</NAME>
|
||||
<SETTING><VALUE></VALUE></SETTING>
|
||||
<SETTING><VALUE>”¹à</VALUE></SETTING>
|
||||
<SETTING><VALUE>”Ý<EFBFBD></VALUE></SETTING>
|
||||
<SETTING><VALUE> =ÃH</VALUE></SETTING>
|
||||
<SETTING><VALUE> =Ø:</VALUE></SETTING>
|
||||
</SETTING>
|
||||
@ -3204,7 +3204,7 @@
|
||||
|
||||
<!-- Settings for "PPC Project" panel -->
|
||||
<SETTING><NAME>MWProject_PPC_type</NAME><VALUE>Application</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>grid Carbon Release</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>griddemo Carbon Release</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1095782476</VALUE></SETTING>
|
||||
<SETTING><NAME>MWProject_PPC_size</NAME><VALUE>3840</VALUE></SETTING>
|
||||
@ -3298,21 +3298,21 @@
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>grid.cpp</PATH>
|
||||
<PATH>griddemo.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>png.lib</PATH>
|
||||
<PATH>zlib.lib</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Library</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>zlib.lib</PATH>
|
||||
<PATH>png.lib</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Library</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
@ -3375,12 +3375,7 @@
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>grid.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>png.lib</PATH>
|
||||
<PATH>griddemo.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
@ -3388,6 +3383,11 @@
|
||||
<PATH>zlib.lib</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>png.lib</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>CarbonLib</PATH>
|
||||
@ -3413,7 +3413,7 @@
|
||||
<FILEREF>
|
||||
<TARGETNAME>Classic Release</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>grid.cpp</PATH>
|
||||
<PATH>griddemo.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<GROUP><NAME>wx</NAME>
|
@ -1,10 +1,17 @@
|
||||
# Purpose: makefile for grid example (BC++ 32bit)
|
||||
# Created: 2000-03-15
|
||||
#
|
||||
# File: makefile.b32
|
||||
# Author: Michael Bedward
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright:
|
||||
#
|
||||
# Makefile : Builds sample for 32-bit BC++
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
TARGET=grid
|
||||
OBJECTS = $(TARGET).obj
|
||||
TARGET=griddemo
|
||||
|
||||
OBJECTS = griddemo.obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.b32
|
||||
|
||||
|
@ -1,5 +1,10 @@
|
||||
# Purpose: makefile for grid example (BC++ 16bit)
|
||||
# Created: 2000-03-15
|
||||
#
|
||||
# File: makefile.bcc
|
||||
# Author: Michael Bedward
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
#
|
||||
# Builds a BC++ 16-bit sample
|
||||
|
||||
!if "$(WXWIN)" == ""
|
||||
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
|
||||
@ -7,7 +12,7 @@
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
TARGET=grid
|
||||
TARGET=griddemo
|
||||
OBJECTS=$(TARGET).obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.bcc
|
||||
|
@ -1,9 +1,16 @@
|
||||
# Purpose: makefile for grid example (VC++ 1.5x)
|
||||
# Created: 2000-03-15
|
||||
#
|
||||
# File: makefile.dos
|
||||
# Author: Michael Bedward
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
#
|
||||
# Makefile : Builds 16-bit sample, VC++ 1.5
|
||||
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||
# info
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
TARGET=grid
|
||||
TARGET=griddemo
|
||||
OBJECTS=$(TARGET).obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.msc
|
||||
|
@ -1,9 +1,14 @@
|
||||
# Purpose: makefile for grid example (Cygwin/Mingw32)
|
||||
# Created: #03.01.00
|
||||
#
|
||||
# File: makefile.g95
|
||||
# Author: Michael Bedward
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
#
|
||||
# Makefile for wxWindows sample (Cygwin/Mingw32).
|
||||
|
||||
WXDIR = ../..
|
||||
|
||||
TARGET=grid
|
||||
TARGET=griddemo
|
||||
OBJECTS = $(TARGET).o
|
||||
|
||||
include $(WXDIR)/src/makeprog.g95
|
||||
|
@ -1,17 +1,16 @@
|
||||
# Purpose: makefile for grid example (Symantec C++)
|
||||
# Created: 2000-03-15
|
||||
# Symantec C++ makefile
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
WXLIB = $(WXDIR)\lib\wx.lib
|
||||
INCDIR = $(WXDIR)\include
|
||||
INCLUDE=$(INCDIR)
|
||||
TARGET=grid
|
||||
TARGET=griddemo
|
||||
|
||||
include $(WXDIR)\src\makesc.env
|
||||
|
||||
grid.exe: grid.obj $(DEFFILE) grid.res
|
||||
griddemo.exe: griddemo.obj $(DEFFILE) griddemo.res
|
||||
*$(CC) $(LDFLAGS) -o$@ $** $(LIBS)
|
||||
*$(RC) -k grid.res
|
||||
*$(RC) -k griddemo.res
|
||||
|
||||
sc32.def:
|
||||
echo EXETYPE NT > sc32.def
|
||||
|
@ -7,29 +7,29 @@ WXDIR = ../..
|
||||
# this central makefile.
|
||||
include $(WXDIR)/src/maketwin.env
|
||||
|
||||
OBJECTS = $(OBJDIR)/grid.$(OBJSUFF) $(OBJDIR)/grid.$(OBJSUFF)
|
||||
OBJECTS = $(OBJDIR)/griddemo.$(OBJSUFF) $(OBJDIR)/griddemo.$(OBJSUFF)
|
||||
|
||||
all: $(OBJDIR) grid$(GUISUFFIX)$(EXESUFF)
|
||||
all: $(OBJDIR) griddemo$(GUISUFFIX)$(EXESUFF)
|
||||
|
||||
wx:
|
||||
|
||||
$(OBJDIR):
|
||||
mkdir $(OBJDIR)
|
||||
|
||||
grid$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
|
||||
$(CC) $(LDFLAGS) -o grid$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
|
||||
griddemo$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
|
||||
$(CC) $(LDFLAGS) -o griddemo$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
|
||||
|
||||
$(OBJDIR)/grid.$(OBJSUFF): grid.$(SRCSUFF)
|
||||
$(CC) -c $(CPPFLAGS) -o $@ grid.$(SRCSUFF)
|
||||
$(OBJDIR)/griddemo.$(OBJSUFF): griddemo.$(SRCSUFF)
|
||||
$(CC) -c $(CPPFLAGS) -o $@ griddemo.$(SRCSUFF)
|
||||
|
||||
grid.c: grid.rc
|
||||
$(RESCOMP) $(RCINPUTSWITCH) grid.rc $(RCOUTPUTSWITCH) grid.c $(RESFLAGS)
|
||||
griddemo.c: griddemo.rc
|
||||
$(RESCOMP) $(RCINPUTSWITCH) griddemo.rc $(RCOUTPUTSWITCH) griddemo.c $(RESFLAGS)
|
||||
|
||||
$(OBJDIR)/grid.$(OBJSUFF): grid.c
|
||||
$(CC) -c $(CPPFLAGS) -o $@ grid.c
|
||||
$(OBJDIR)/griddemo.$(OBJSUFF): griddemo.c
|
||||
$(CC) -c $(CPPFLAGS) -o $@ griddemo.c
|
||||
|
||||
#$(OBJDIR)/grid.o: grid.rc
|
||||
# $(RESCOMP) $(RCINPUTSWITCH) grid.rc $(RCOUTPUTSWITCH) $(OBJDIR)/grid.o $(RESFLAGS)
|
||||
#$(OBJDIR)/griddemo.o: griddemo.rc
|
||||
# $(RESCOMP) $(RCINPUTSWITCH) griddemo.rc $(RCOUTPUTSWITCH) $(OBJDIR)/griddemo.o $(RESFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) grid$(GUISUFFIX).exe core *.rsc *.res
|
||||
rm -f $(OBJECTS) griddemo$(GUISUFFIX).exe core *.rsc *.res
|
||||
|
@ -1,10 +1,16 @@
|
||||
# Purpose: makefile for grid example (VC++ 32bit)
|
||||
# Created: 2000-03-15
|
||||
#
|
||||
# File: makefile.vc
|
||||
# Author: Michael Bedward
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
#
|
||||
# Makefile : Builds sample (VC++, WIN32)
|
||||
# Use FINAL=1 argument to nmake to build final version with no debug info.
|
||||
|
||||
# Set WXDIR for your system
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
PROGRAM=grid
|
||||
PROGRAM=griddemo
|
||||
OBJECTS = $(PROGRAM).obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.vc
|
||||
|
@ -1,9 +1,11 @@
|
||||
# Purpose: makefile for grid example (Watcom)
|
||||
# Created: 2000-03-15
|
||||
#
|
||||
# Makefile for WATCOM
|
||||
#
|
||||
#
|
||||
|
||||
WXDIR = $(%WXWIN)
|
||||
|
||||
PROGRAM = grid
|
||||
PROGRAM = griddemo
|
||||
OBJECTS = $(PROGRAM).obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.wat
|
||||
|
@ -69,8 +69,6 @@ all:
|
||||
make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
|
||||
cd $(WXDIR)\samples\grid
|
||||
make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
|
||||
cd $(WXDIR)\samples\newgrid
|
||||
make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
|
||||
|
||||
cd $(WXDIR)\samples\help
|
||||
make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
|
||||
@ -213,8 +211,6 @@ clean:
|
||||
make -f makefile.b32 clean
|
||||
cd $(WXDIR)\samples\grid
|
||||
make -f makefile.b32 clean
|
||||
cd $(WXDIR)\samples\newgrid
|
||||
make -f makefile.b32 clean
|
||||
cd $(WXDIR)\samples\help
|
||||
make -f makefile.b32 clean
|
||||
cd $(WXDIR)\samples\html
|
||||
|
@ -68,8 +68,6 @@ all:
|
||||
nmake -f makefile.vc $(MAKEFLAGS)
|
||||
cd $(WXDIR)\samples\grid
|
||||
nmake -f makefile.vc $(MAKEFLAGS)
|
||||
cd $(WXDIR)\samples\newgrid
|
||||
nmake -f makefile.vc $(MAKEFLAGS)
|
||||
cd $(WXDIR)\samples\help
|
||||
nmake -f makefile.vc $(MAKEFLAGS)
|
||||
!if "$(PNGSETUP)"==""
|
||||
@ -188,8 +186,6 @@ clean:
|
||||
nmake -f makefile.vc clean
|
||||
cd $(WXDIR)\samples\grid
|
||||
nmake -f makefile.vc clean
|
||||
cd $(WXDIR)\samples\newgrid
|
||||
nmake -f makefile.vc clean
|
||||
cd $(WXDIR)\samples\help
|
||||
nmake -f makefile.vc clean
|
||||
cd $(WXDIR)\samples\html
|
||||
|
@ -32,10 +32,6 @@
|
||||
|
||||
#if wxUSE_GRID
|
||||
|
||||
#if !defined(wxUSE_NEW_GRID) || !(wxUSE_NEW_GRID)
|
||||
#include "gridg.cpp"
|
||||
#else // wxUSE_NEW_GRID
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/utils.h"
|
||||
#include "wx/dcclient.h"
|
||||
@ -10031,7 +10027,5 @@ wxGridEditorCreatedEvent::wxGridEditorCreatedEvent(int id, wxEventType type,
|
||||
m_ctrl = ctrl;
|
||||
}
|
||||
|
||||
|
||||
#endif // !wxUSE_NEW_GRID/wxUSE_NEW_GRID
|
||||
|
||||
#endif // wxUSE_GRID
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_GRID || wxUSE_NEW_GRID
|
||||
#if wxUSE_GRID
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/textctrl.h"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -30,7 +30,7 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if defined(wxUSE_NEW_GRID) && (wxUSE_NEW_GRID)
|
||||
#if wxUSE_GRID
|
||||
|
||||
#include "wx/generic/gridsel.h"
|
||||
|
||||
@ -1083,3 +1083,4 @@ int wxGridSelection::BlockContain( int topRow1, int leftCol1,
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user