]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/grid.h
changed copyright to SciTech one
[wxWidgets.git] / include / wx / generic / grid.h
index 13a06d6f55a10d645c745e5fa01a20d7f9e13896..786a823fb897cae853528331df3d455bfa30d3c7 100644 (file)
@@ -12,7 +12,7 @@
 #include "wx/defs.h"
 
 #if !defined(wxUSE_NEW_GRID) || !(wxUSE_NEW_GRID)
-#include "gridg.h"
+#include "wx/generic/gridg.h"
 #else
 
 #ifndef __WXGRID_H__
@@ -649,7 +649,7 @@ private:
         Unset = -1,
         ReadWrite,
         ReadOnly
-    }; 
+    };
 
     // the common part of all ctors
     void Init()
@@ -689,7 +689,7 @@ private:
     wxAttrKind m_attrkind;
 
     // use Clone() instead
-    DECLARE_NO_COPY_CLASS(wxGridCellAttr);
+    DECLARE_NO_COPY_CLASS(wxGridCellAttr)
 
     // suppress the stupid gcc warning about the class having private dtor and
     // no friends
@@ -1080,7 +1080,7 @@ public:
     void DrawTextRectangle( wxDC& dc, const wxString&, const wxRect&,
                             int horizontalAlignment = wxALIGN_LEFT,
                             int verticalAlignment = wxALIGN_TOP );
+
     void DrawTextRectangle( wxDC& dc, const wxArrayString& lines, const wxRect&,
                             int horizontalAlignment = wxALIGN_LEFT,
                             int verticalAlignment = wxALIGN_TOP );
@@ -1920,6 +1920,36 @@ protected:
     DECLARE_DYNAMIC_CLASS(wxGridRangeSelectEvent)
 };
 
+
+class WXDLLEXPORT wxGridEditorCreatedEvent : public wxCommandEvent {
+public:
+    wxGridEditorCreatedEvent()
+        : wxCommandEvent()
+        {
+            m_row  = 0;
+            m_col  = 0;
+            m_ctrl = NULL;
+        }
+
+    wxGridEditorCreatedEvent(int id, wxEventType type, wxObject* obj,
+                             int row, int col, wxControl* ctrl);
+
+    int GetRow()                        { return m_row; }
+    int GetCol()                        { return m_col; }
+    wxControl* GetControl()             { return m_ctrl; }
+    void SetRow(int row)                { m_row = row; }
+    void SetCol(int col)                { m_col = col; }
+    void SetControl(wxControl* ctrl)    { m_ctrl = ctrl; }
+
+private:
+    int m_row;
+    int m_col;
+    wxControl* m_ctrl;
+
+    DECLARE_DYNAMIC_CLASS(wxGridEditorCreatedEvent)
+};
+
+
 BEGIN_DECLARE_EVENT_TYPES()
     DECLARE_EVENT_TYPE(wxEVT_GRID_CELL_LEFT_CLICK, 1580)
     DECLARE_EVENT_TYPE(wxEVT_GRID_CELL_RIGHT_CLICK, 1581)
@@ -1936,12 +1966,14 @@ BEGIN_DECLARE_EVENT_TYPES()
     DECLARE_EVENT_TYPE(wxEVT_GRID_SELECT_CELL, 1592)
     DECLARE_EVENT_TYPE(wxEVT_GRID_EDITOR_SHOWN, 1593)
     DECLARE_EVENT_TYPE(wxEVT_GRID_EDITOR_HIDDEN, 1594)
+    DECLARE_EVENT_TYPE(wxEVT_GRID_EDITOR_CREATED, 1595)
 END_DECLARE_EVENT_TYPES()
 
 
 typedef void (wxEvtHandler::*wxGridEventFunction)(wxGridEvent&);
 typedef void (wxEvtHandler::*wxGridSizeEventFunction)(wxGridSizeEvent&);
 typedef void (wxEvtHandler::*wxGridRangeSelectEventFunction)(wxGridRangeSelectEvent&);
+typedef void (wxEvtHandler::*wxGridEditorCreatedEventFunction)(wxGridEditorCreatedEvent&);
 
 #define EVT_GRID_CELL_LEFT_CLICK(fn)     DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CELL_LEFT_CLICK,    -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
 #define EVT_GRID_CELL_RIGHT_CLICK(fn)    DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CELL_RIGHT_CLICK,   -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
@@ -1958,6 +1990,7 @@ typedef void (wxEvtHandler::*wxGridRangeSelectEventFunction)(wxGridRangeSelectEv
 #define EVT_GRID_SELECT_CELL(fn)         DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_SELECT_CELL,        -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
 #define EVT_GRID_EDITOR_SHOWN(fn)        DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_EDITOR_SHOWN,       -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
 #define EVT_GRID_EDITOR_HIDDEN(fn)       DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_EDITOR_HIDDEN,      -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL ),
+#define EVT_GRID_EDITOR_CREATED(fn)      DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_EDITOR_CREATED,     -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEditorCreatedEventFunction) &fn, NULL ),
 
 
 #if 0  // TODO: implement these ?  others ?