X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/763163a80ae0d5a0684633e72f928302578c1214..9d33840bab4e10d701dd36f9b8660f6a13f05afe:/interface/wx/grid.h diff --git a/interface/wx/grid.h b/interface/wx/grid.h index 83aa1b25a1..1258d4cede 100644 --- a/interface/wx/grid.h +++ b/interface/wx/grid.h @@ -225,7 +225,7 @@ public: If the user-defined wxEVT_GRID_CELL_CHANGING event handler doesn't veto this change, ApplyEdit() will be called next. */ - virtual bool EndEdit(int row, int col, wxGrid* grid) = 0; + virtual bool EndEdit(const wxString& oldval, wxString* newval) = 0; /** Effectively save the changes in the grid. @@ -321,7 +321,7 @@ public: an empty string otherwise. */ static void UseStringValues(const wxString& valueTrue = "1", - const wxString& valueFalse = wxEmptyString) const; + const wxString& valueFalse = wxEmptyString); }; /** @@ -480,7 +480,7 @@ public: /** Default constructor. */ - wxGridCellAttr(); + wxGridCellAttr(wxGridCellAttr* attrDefault = NULL); /** Constructor specifying some of the often used attributes. */ @@ -1068,7 +1068,7 @@ public: - wxGridCellFloatEditor - wxGridCellNumberEditor - wxGridCellTextEditor - + Please see wxGridEvent, wxGridSizeEvent, wxGridRangeSelectEvent, and wxGridEditorCreatedEvent for the documentation of all event types you can use with wxGrid. @@ -1665,7 +1665,7 @@ public: See wxGridTableBase::CanGetValueAs() and the @ref overview_grid for more information. */ - const wxString GetCellValue(const wxGridCellCoords& coords) const; + wxString GetCellValue(const wxGridCellCoords& coords) const; /** Returns a pointer to the current default grid cell editor. @@ -2332,12 +2332,12 @@ public: This method takes an array containing the indices of the columns in their display order, i.e. uses the same convention as wxHeaderCtrl::SetColumnsOrder(). - */ + */ void SetColumnsOrder(const wxArrayInt& order); /** Resets the position of the columns to the default. - */ + */ void ResetColPos(); //@} @@ -2345,7 +2345,7 @@ public: /** @name Cursor Movement - */ + */ //@{ /** @@ -2770,7 +2770,7 @@ public: @see BlockToDeviceRect() */ - const wxRect CellToRect(const wxGridCellCoords& coords) const; + wxRect CellToRect(const wxGridCellCoords& coords) const; /** Returns the column at the given pixel position. @@ -3098,44 +3098,6 @@ public: //@} -protected: - /** - Returns @true if this grid has support for cell attributes. - - The grid supports attributes if it has the associated table which, in - turn, has attributes support, i.e. wxGridTableBase::CanHaveAttributes() - returns @true. - */ - bool CanHaveAttributes() const; - - /** - Get the minimal width of the given column/row. - - The value returned by this function may be different than that returned - by GetColMinimalAcceptableWidth() if SetColMinimalWidth() had been - called for this column. - */ - int GetColMinimalWidth(int col) const; - - /** - Returns the coordinate of the right border specified column. - */ - int GetColRight(int col) const; - - /** - Returns the coordinate of the left border specified column. - */ - int GetColLeft(int col) const; - - /** - Returns the minimal size for the given column. - - The value returned by this function may be different than that returned - by GetRowMinimalAcceptableHeight() if SetRowMinimalHeight() had been - called for this row. - */ - int GetRowMinimalHeight(int col) const; - /** @name Sorting support. @@ -3207,6 +3169,7 @@ protected: void UnsetSortingColumn(); //@} + /** @name Accessors for component windows. @@ -3251,7 +3214,7 @@ protected: GetGridColHeader() to access it if you need wxHeaderCtrl-specific functionality. */ - wxWindow *GetGridWindow() const; + wxWindow *GetGridColLabelWindow() const; /** Return the window in the top left grid corner. @@ -3271,6 +3234,44 @@ protected: wxHeaderCtrl *GetGridColHeader() const; //@} + +protected: + /** + Returns @true if this grid has support for cell attributes. + + The grid supports attributes if it has the associated table which, in + turn, has attributes support, i.e. wxGridTableBase::CanHaveAttributes() + returns @true. + */ + bool CanHaveAttributes() const; + + /** + Get the minimal width of the given column/row. + + The value returned by this function may be different than that returned + by GetColMinimalAcceptableWidth() if SetColMinimalWidth() had been + called for this column. + */ + int GetColMinimalWidth(int col) const; + + /** + Returns the coordinate of the right border specified column. + */ + int GetColRight(int col) const; + + /** + Returns the coordinate of the left border specified column. + */ + int GetColLeft(int col) const; + + /** + Returns the minimal size for the given column. + + The value returned by this function may be different than that returned + by GetRowMinimalAcceptableHeight() if SetRowMinimalHeight() had been + called for this row. + */ + int GetRowMinimalHeight(int col) const; }; @@ -3354,8 +3355,8 @@ public: @event{EVT_GRID_CELL_CHANGING(func)} The user is about to change the data in a cell. The new cell value as string is available from GetString() event object method. This event - can be vetoed if the change is not allowed. Processes a @c - wxEVT_GRID_CELL_CHANGING event type. + can be vetoed if the change is not allowed. + Processes a @c wxEVT_GRID_CELL_CHANGING event type. @event{EVT_GRID_CELL_CHANGED(func)} The user changed the data in a cell. The old cell value as string is available from GetString() event object method. Notice that vetoing @@ -3406,7 +3407,6 @@ public: proceed in which case wxGrid::SetColPos() is used to reorder the columns display order without affecting the use of the column indices otherwise. - This event macro corresponds to @c wxEVT_GRID_COL_MOVE event type. @event{EVT_GRID_COL_SORT(func)} This event is generated when a column is clicked by the user and its @@ -3417,12 +3417,11 @@ public: (and not vetoed) the grid supposes that the table was indeed resorted and updates the column to indicate the new sort order and refreshes itself. - This event macro corresponds to @c wxEVT_GRID_COL_SORT event type. @endEventTable @library{wxadv} - @category{grid} + @category{grid,events} */ class wxGridEvent : public wxNotifyEvent { @@ -3436,8 +3435,7 @@ public: */ wxGridEvent(int id, wxEventType type, wxObject* obj, int row = -1, int col = -1, int x = -1, int y = -1, - bool sel = true, bool control = false, bool shift = false, - bool alt = false, bool meta = false); + bool sel = true, const wxKeyboardState& kbd = wxKeyboardState()); /** Returns @true if the Alt key was down at the time of the event. @@ -3504,7 +3502,7 @@ public: @endEventTable @library{wxadv} - @category{grid} + @category{grid,events} */ class wxGridSizeEvent : public wxNotifyEvent { @@ -3518,8 +3516,7 @@ public: */ wxGridSizeEvent(int id, wxEventType type, wxObject* obj, int rowOrCol = -1, int x = -1, int y = -1, - bool control = false, bool shift = false, - bool alt = false, bool meta = false); + const wxKeyboardState& kbd = wxKeyboardState()); /** Returns @true if the Alt key was down at the time of the event. @@ -3567,7 +3564,7 @@ public: @endEventTable @library{wxadv} - @category{grid} + @category{grid,events} */ class wxGridRangeSelectEvent : public wxNotifyEvent { @@ -3583,9 +3580,7 @@ public: wxObject* obj, const wxGridCellCoords& topLeft, const wxGridCellCoords& bottomRight, - bool sel = true, bool control = false, - bool shift = false, bool alt = false, - bool meta = false); + bool sel = true, const wxKeyboardState& kbd = wxKeyboardState()); /** Returns @true if the Alt key was down at the time of the event. @@ -3658,7 +3653,7 @@ public: @endEventTable @library{wxadv} - @category{grid} + @category{grid,events} */ class wxGridEditorCreatedEvent : public wxCommandEvent {