]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/grid.h
made wxPanel be auto layout aware
[wxWidgets.git] / include / wx / generic / grid.h
index 18fed34fbd4b5651b4b46d630ece59b6c2cf4676..76ee98da6558fe805bb7b524b533976c59d50b29 100644 (file)
@@ -195,46 +195,6 @@ class wxGridStringTable : public wxGridTableBase
 
 
 
-#if 0
-
-// ------ sketchy experimental code to create a grid table for a given type
-//
-//    This doesn't work at the moment !!
-//
-
-#define _WX_DECLARE_GRIDTABLE( T, name )                        \
-                                                                \
-                                                                \
-WX_DECLARE_ARRAY( T, T##Row )                                   \
-WX_DECLARE_OBJARRAY( T##Row, T##Array )                         \
-                                                                \
-class WXDLLEXPORT name : public wxGridTableBase                 \
-{                                                               \
-    T##Array m_data;                                            \
-    int m_numRows;                                              \
-    int m_numCols;                                              \
-                                                                \
-  public:                                                       \
-    name() { }                                                  \
-    name( int numRows, int numCols );                           \
-    ~name();                                                    \
-                                                                \
-    wxString GetValue( int row, int col );                      \
-    wxString SetValue( int row, int col, const wxString& s );   \
-                                                                \
-    DECLARE_DYNAMIC_CLASS( name )                               \
-}
-
-
-#define WX_DECLARE_GRIDTABLE(T, name)    \
-  typedef T name##var;                   \
-  _WX_DECLARE_GRIDTABLE(name##var, name)
-
-
-#endif  // if 0
-
-
-
 //////////////////////////////////////////////////////////////////////
 //
 //  Grid view classes
@@ -411,7 +371,6 @@ class wxGrid : public wxPanel
     bool       m_cellEditCtrlEnabled;
     wxWindow*  m_topEditCtrl;
     bool       m_topEditCtrlEnabled;
-
     
     // ------ internal init and update functions
     //
@@ -1048,6 +1007,8 @@ const wxEventType EVT_GRID_ROW_SIZE           = wxEVT_FIRST + 1588;
 const wxEventType EVT_GRID_COL_SIZE           = wxEVT_FIRST + 1589;
 const wxEventType EVT_GRID_RANGE_SELECT       = wxEVT_FIRST + 1590;
 const wxEventType EVT_GRID_CELL_CHANGE        = wxEVT_FIRST + 1591;
+const wxEventType EVT_GRID_SELECT_CELL        = wxEVT_FIRST + 1592;
+
 
 typedef void (wxEvtHandler::*wxGridEventFunction)(wxGridEvent&);
 typedef void (wxEvtHandler::*wxGridSizeEventFunction)(wxGridSizeEvent&);
@@ -1065,16 +1026,15 @@ typedef void (wxEvtHandler::*wxGridRangeSelectEventFunction)(wxGridRangeSelectEv
 #define EVT_GRID_COL_SIZE(fn)            { EVT_GRID_COL_SIZE,           -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridSizeEventFunction) &fn, NULL },
 #define EVT_GRID_RANGE_SELECT(fn)        { EVT_GRID_RANGE_SELECT,       -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridRangeSelectEventFunction) &fn, NULL },
 #define EVT_GRID_CELL_CHANGE(fn)         { EVT_GRID_CELL_CHANGE,        -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL }, 
+#define EVT_GRID_SELECT_CELL(fn)         { EVT_GRID_SELECT_CELL,        -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
 
 
 #if 0  // TODO: implement these ?  others ?
 
-const wxEventType EVT_GRID_SELECT_CELL      = wxEVT_FIRST + 1575;
 const wxEventType EVT_GRID_CREATE_CELL      = wxEVT_FIRST + 1576;
 const wxEventType EVT_GRID_CHANGE_LABELS    = wxEVT_FIRST + 1577;
 const wxEventType EVT_GRID_CHANGE_SEL_LABEL = wxEVT_FIRST + 1578;
 
-#define EVT_GRID_SELECT_CELL(fn)      { EVT_GRID_SELECT_CELL,      -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
 #define EVT_GRID_CREATE_CELL(fn)      { EVT_GRID_CREATE_CELL,      -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
 #define EVT_GRID_CHANGE_LABELS(fn)    { EVT_GRID_CHANGE_LABELS,    -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
 #define EVT_GRID_CHANGE_SEL_LABEL(fn) { EVT_GRID_CHANGE_SEL_LABEL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },