X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c69031cd1d354fc4ed25462d3552a09d0feb003..d3e78bab3ea46183c22a5f0484b931a99b897636:/docs/latex/wx/grid.tex diff --git a/docs/latex/wx/grid.tex b/docs/latex/wx/grid.tex index c5528fc19d..4dcd0089f5 100644 --- a/docs/latex/wx/grid.tex +++ b/docs/latex/wx/grid.tex @@ -1,35 +1,30 @@ \section{\class{wxGrid}}\label{wxgrid} wxGrid and its related classes are used for displaying and editing tabular -data. They provide a rich set of features for display, editing, and +data. They provide a rich set of features for display, editing, and interacting with a variety of data sources. For simple applications, and to help you get started, wxGrid is the only class you need to refer to -directly. It will set up default instances of the other classes and manage -them for you. For more complex applications you can derive your own +directly. It will set up default instances of the other classes and manage +them for you. For more complex applications you can derive your own classes for custom grid views, grid data tables, cell editors and -renderers. The \helpref{wxGrid classes overview}{gridoverview} has +renderers. The \helpref{wxGrid classes overview}{gridoverview} has examples of simple and more complex applications, explains the relationship between the various grid classes and has a summary of the keyboard shortcuts and mouse functions provided by wxGrid. wxGrid has been greatly expanded and redesigned for wxWindows 2.2 onwards. If you have been using the old wxGrid class you will probably -want to have a look at the \helpref{wxGrid classes -overview}{gridoverview} to see how things have changed. The new grid -classes are reasonably backward-compatible but there are some -exceptions. There are also easier ways of doing many things compared to +want to have a look at the \helpref{wxGrid classes overview}{gridoverview} to see +how things have changed. The new grid classes are reasonably backward-compatible +but there are some exceptions. There are also easier ways of doing many things compared to the previous implementation. - \wxheading{Derived from} -% UNCOMMENT THIS BEFORE COMMITTING TO CVS -\begin{comment} \helpref{wxScrolledWindow}{wxscrolledwindow}\\ \helpref{wxWindow}{wxwindow}\\ \helpref{wxEvtHandler}{wxevthandler}\\ \helpref{wxObject}{wxobject} -\end{comment} \wxheading{Include files} @@ -41,6 +36,33 @@ There are presently no specific window styles for wxGrid. \wxheading{Event handling} +\input gridevt.inc + +The event handler for the following functions takes a + \helpref{wxGridSizeEvent}{wxgridsizeevent} parameter. + +\twocolwidtha{7cm} +\begin{twocollist}\itemsep=0pt +\twocolitem{{\bf EVT\_GRID\_COL\_SIZE(func)}}{The user resized a column by dragging it. Processes a wxEVT\_GRID\_COL\_SIZE.} +\twocolitem{{\bf EVT\_GRID\_ROW\_SIZE(func)}}{The user resized a row by dragging it. Processes a wxEVT\_GRID\_ROW\_SIZE.} +\end{twocollist}% + +The event handler for the following functions takes a + \helpref{wxGridRangeSelectEvent}{wxgridrangeselectevent} parameter. + +\twocolwidtha{7cm} +\begin{twocollist}\itemsep=0pt +\twocolitem{{\bf EVT\_GRID\_RANGE\_SELECT(func)}}{The user selected a group of contiguous cells. Processes a wxEVT\_GRID\_RANGE\_SELECT.} +\end{twocollist}% + +The event handler for the following functions takes a + \helpref{wxGridEditorCreatedEvent}{wxgrideditorcreatedevent} parameter. + +\twocolwidtha{7cm} +\begin{twocollist}\itemsep=0pt +\twocolitem{{\bf EVT\_GRID\_EDITOR\_CREATED(func)}}{The editor for a cell was created. Processes a wxEVT\_GRID\_EDITOR\_CREATED.} +\end{twocollist}% + \wxheading{See also} \helpref{wxGrid overview}{gridoverview} @@ -50,20 +72,20 @@ There are presently no specific window styles for wxGrid. \membersection{Constructors and initialization} -\helpref{wxGrid}{wxgridctor} \\ -\helpref{\destruct{wxGrid}}{wxgriddtor} \\ -\helpref{CreateGrid}{wxgridcreategrid} \\ +\helpref{wxGrid}{wxgridctor}\\ +\helpref{\destruct{wxGrid}}{wxgriddtor}\\ +\helpref{CreateGrid}{wxgridcreategrid}\\ \helpref{SetTable}{wxgridsettable} \membersection{Display format} \membersection{Selection functions} -\helpref{wxGrid::ClearSelection}{wxgridclearselection} \\ -\helpref{wxGrid::IsSelection}{wxgridisselection} \\ -\helpref{wxGrid::SelectAll}{wxgridselectall} \\ -\helpref{wxGrid::SelectBlock}{wxgridselectblock} \\ -\helpref{wxGrid::SelectCol}{wxgridselectcol} \\ +\helpref{wxGrid::ClearSelection}{wxgridclearselection}\\ +\helpref{wxGrid::IsSelection}{wxgridisselection}\\ +\helpref{wxGrid::SelectAll}{wxgridselectall}\\ +\helpref{wxGrid::SelectBlock}{wxgridselectblock}\\ +\helpref{wxGrid::SelectCol}{wxgridselectcol}\\ \helpref{wxGrid::SelectRow}{wxgridselectrow} %%%%%%%%% MEMBER FUNCTIONS %%%%%%%%%% @@ -95,9 +117,9 @@ table (see \helpref{wxGrid::SetTable}{wxgridsettable}). \membersection{wxGrid::AppendCols}\label{wxgridappendcols} -\func{bool}{AppendCols}{\param{int }{numCols = 1}, \param{bool }{updateLabels = TRUE}} +\func{bool}{AppendCols}{\param{int }{numCols = 1}, \param{bool }{updateLabels = true}} -Appends one or more new columns to the right of the grid and returns TRUE if +Appends one or more new columns to the right of the grid and returns true if successful. The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override @@ -106,9 +128,9 @@ If you are using a derived grid table class you will need to override \membersection{wxGrid::AppendRows}\label{wxgridappendrows} -\func{bool}{AppendRows}{\param{int }{numRows = 1}, \param{bool }{updateLabels = TRUE}} +\func{bool}{AppendRows}{\param{int }{numRows = 1}, \param{bool }{updateLabels = true}} -Appends one or more new rows to the bottom of the grid and returns TRUE if +Appends one or more new rows to the bottom of the grid and returns true if successful. The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override @@ -121,51 +143,51 @@ If you are using a derived grid table class you will need to override Automatically sets the height and width of all rows and columns to fit their contents. -\wxheading{Note} \\ +\wxheading{Note}\\ wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used. The memory requirements for this could become prohibitive if your grid is very large. \membersection{wxGrid::AutoSizeColumn}\label{wxgridautosizecolumn} -\func{void}{AutoSizeColumn}{\param{int }{col}, \param{bool }{setAsMin = TRUE}} +\func{void}{AutoSizeColumn}{\param{int }{col}, \param{bool }{setAsMin = true}} -Automatically sizes the column to fit its contents. If setAsMin is TRUE the calculated width will +Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will also be set as the minimal width for the column. -\wxheading{Note} \\ +\wxheading{Note}\\ wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used. The memory requirements for this could become prohibitive if your grid is very large. \membersection{wxGrid::AutoSizeColumns}\label{wxgridautosizecolumns} -\func{void}{AutoSizeColumns}{\param{bool }{setAsMin = TRUE}} +\func{void}{AutoSizeColumns}{\param{bool }{setAsMin = true}} -Automatically sizes all columns to fit their contents. If setAsMin is TRUE the calculated widths will +Automatically sizes all columns to fit their contents. If setAsMin is true the calculated widths will also be set as the minimal widths for the columns. -\wxheading{Note} \\ +\wxheading{Note}\\ wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used. The memory requirements for this could become prohibitive if your grid is very large. \membersection{wxGrid::AutoSizeRow}\label{wxgridautosizerow} -\func{void}{AutoSizeRow}{\param{int }{row}, \param{bool }{setAsMin = TRUE}} +\func{void}{AutoSizeRow}{\param{int }{row}, \param{bool }{setAsMin = true}} -Automatically sizes the row to fit its contents. If setAsMin is TRUE the calculated height will +Automatically sizes the row to fit its contents. If setAsMin is true the calculated height will also be set as the minimal height for the row. -\wxheading{Note} \\ +\wxheading{Note}\\ wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used. The memory requirements for this could become prohibitive if your grid is very large. \membersection{wxGrid::AutoSizeRows}\label{wxgridautosizerows} -\func{void}{AutoSizeRows}{\param{bool }{setAsMin = TRUE}} +\func{void}{AutoSizeRows}{\param{bool }{setAsMin = true}} -Automatically sizes all rows to fit their contents. If setAsMin is TRUE the calculated heights will +Automatically sizes all rows to fit their contents. If setAsMin is true the calculated heights will also be set as the minimal heights for the rows. -\wxheading{Note} \\ +\wxheading{Note}\\ wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used. The memory requirements for this could become prohibitive if your grid is very large. @@ -183,7 +205,7 @@ screen flicker. The final EndBatch will cause the grid to be repainted. \func{bool}{CanDragColSize}{\void} -Returns TRUE if columns can be resized by dragging with the mouse. Columns can be resized +Returns true if columns can be resized by dragging with the mouse. Columns can be resized by dragging the edges of their labels. If grid line dragging is enabled they can also be resized by dragging the right edge of the column in the grid cell area (see \helpref{wxGrid::EnableDragGridSize}{wxgridenabledraggridsize}). @@ -192,7 +214,7 @@ resized by dragging the right edge of the column in the grid cell area \func{bool}{CanDragRowSize}{\void} -Returns TRUE if rows can be resized by dragging with the mouse. Rows can be resized +Returns true if rows can be resized by dragging with the mouse. Rows can be resized by dragging the edges of their labels. If grid line dragging is enabled they can also be resized by dragging the lower edge of the row in the grid cell area (see \helpref{wxGrid::EnableDragGridSize}{wxgridenabledraggridsize}). @@ -201,14 +223,14 @@ resized by dragging the lower edge of the row in the grid cell area \func{bool}{CanDragGridSize}{\void} -Return TRUE if the dragging of grid lines to resize rows and columns is enabled or FALSE otherwise. +Return true if the dragging of grid lines to resize rows and columns is enabled or false otherwise. \membersection{wxGrid::CanEnableCellControl}\label{wxgridcanenablecellcontrol} \constfunc{bool}{CanEnableCellControl}{\void} -Returns TRUE if the in-place edit control for the current grid cell can be used and -FALSE otherwise (e.g. if the current cell is read-only). +Returns true if the in-place edit control for the current grid cell can be used and +false otherwise (e.g. if the current cell is read-only). \membersection{wxGrid::CellToRect}\label{wxgridcelltorect} @@ -248,10 +270,10 @@ class and pass a table object to the grid with \helpref{wxGrid::SetTable}{wxgrid \membersection{wxGrid::DeleteCols}\label{wxgriddeletecols} -\func{bool}{DeleteCols}{\param{int }{pos = 0}, \param{int }{numCols = 1}, \param{bool }{updateLabels = TRUE}} +\func{bool}{DeleteCols}{\param{int }{pos = 0}, \param{int }{numCols = 1}, \param{bool }{updateLabels = true}} Deletes one or more columns from a grid starting at the specified position and returns -TRUE if successful. The updateLabels argument is not used at present. +true if successful. The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override \helpref{wxGridTableBase::DeleteCols}{wxgridtablebasedeletecols}. See @@ -259,10 +281,10 @@ If you are using a derived grid table class you will need to override \membersection{wxGrid::DeleteRows}\label{wxgriddeleterows} -\func{bool}{DeleteRows}{\param{int }{pos = 0}, \param{int }{numRows = 1}, \param{bool }{updateLabels = TRUE}} +\func{bool}{DeleteRows}{\param{int }{pos = 0}, \param{int }{numRows = 1}, \param{bool }{updateLabels = true}} Deletes one or more rows from a grid starting at the specified position and returns -TRUE if successful. The updateLabels argument is not used at present. +true if successful. The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override \helpref{wxGridTableBase::DeleteRows}{wxgridtablebasedeleterows}. See @@ -273,13 +295,13 @@ If you are using a derived grid table class you will need to override \func{void}{DisableCellEditControl}{\void} Disables in-place editing of grid cells. -Equivalent to calling EnableCellEditControl(FALSE). +Equivalent to calling EnableCellEditControl(false). \membersection{wxGrid::DisableDragColSize}\label{wxgriddisabledragcolsize} \func{void}{DisableDragColSize}{\void} -Disables column sizing by dragging with the mouse. Equivalent to passing FALSE to +Disables column sizing by dragging with the mouse. Equivalent to passing false to \helpref{wxGrid::EnableDragColSize}{wxgridenabledragcolsize}. \membersection{wxGrid::DisableDragGridSize}\label{wxgriddisabledraggridsize} @@ -287,37 +309,37 @@ Disables column sizing by dragging with the mouse. Equivalent to passing FALSE t \func{void}{DisableDragGridSize}{\void} Disable mouse dragging of grid lines to resize rows and columns. Equivalent to passing -FALSE to \helpref{wxGrid::EnableDragGridSize}{wxgridenabledraggridsize} +false to \helpref{wxGrid::EnableDragGridSize}{wxgridenabledraggridsize} \membersection{wxGrid::DisableDragRowSize}\label{wxgriddisabledragrowsize} \func{void}{DisableDragRowSize}{\void} -Disables row sizing by dragging with the mouse. Equivalent to passing FALSE to +Disables row sizing by dragging with the mouse. Equivalent to passing false to \helpref{wxGrid::EnableDragRowSize}{wxgridenabledragrowsize}. \membersection{wxGrid::EnableCellEditControl}\label{wxgridenablecelleditcontrol} -\func{void}{EnableCellEditControl}{\param{bool }{enable = TRUE}} +\func{void}{EnableCellEditControl}{\param{bool }{enable = true}} Enables or disables in-place editing of grid cell data. The grid will issue either a -wxEVT_GRID_EDITOR_SHOWN or wxEVT_GRID_EDITOR_HIDDEN event. +wxEVT\_GRID\_EDITOR\_SHOWN or wxEVT\_GRID\_EDITOR\_HIDDEN event. \membersection{wxGrid::EnableDragColSize}\label{wxgridenabledragcolsize} -\func{void}{EnableDragColSize}{\param{bool }{enable = TRUE}} +\func{void}{EnableDragColSize}{\param{bool }{enable = true}} Enables or disables column sizing by dragging with the mouse. \membersection{wxGrid::EnableDragGridSize}\label{wxgridenabledraggridsize} -\func{void}{EnableDragGridSize}{\param{bool }{enable = TRUE}} +\func{void}{EnableDragGridSize}{\param{bool }{enable = true}} Enables or disables row and column resizing by dragging gridlines with the mouse. \membersection{wxGrid::EnableDragRowSize}\label{wxgridenabledragrowsize} -\func{void}{EnableDragRowSize}{\param{bool }{enable = TRUE}} +\func{void}{EnableDragRowSize}{\param{bool }{enable = true}} Enables or disables row sizing by dragging with the mouse. @@ -325,8 +347,8 @@ Enables or disables row sizing by dragging with the mouse. \func{void}{EnableEditing}{\param{bool }{edit}} -If the edit argument is FALSE this function sets the whole grid as read-only. If the -argument is TRUE the grid is set to the default state where cells may be editable. In the +If the edit argument is false this function sets the whole grid as read-only. If the +argument is true the grid is set to the default state where cells may be editable. In the default state you can set single grid cells and whole rows and columns to be editable or read-only via \helpref{wxGridCellAttribute::SetReadOnly}{wxgridcellattrsetreadonly}. For single @@ -339,7 +361,7 @@ For more information about controlling grid cell attributes see the \membersection{wxGrid::EnableGridLines}\label{wxgridenablegridlines} -\func{void}{EnableGridLines}{\param{bool }{enable = TRUE}} +\func{void}{EnableGridLines}{\param{bool }{enable = true}} Turns the drawing of grid lines on or off. @@ -375,8 +397,11 @@ the grid's batch count is greater than zero the display will not be updated. Sets the arguments to the horizontal and vertical text alignment values for the grid cell at the specified location. -Horizontal alignment will be one of wxALIGN_LEFT, wxALIGN_CENTRE or wxALIGN_RIGHT. \\ -Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM. +Horizontal alignment will be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT. \\ +Vertical alignment will be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM. + +\perlnote{This method only takes the parameters {\tt row} and {\tt col} and +returns a 2-element list {\tt ( horiz, vert )}.} \membersection{wxGrid::GetCellBackgroundColour}\label{wxgridgetcellbackgroundcolour} @@ -440,6 +465,9 @@ Sets the arguments to the current column label alignment values. Horizontal alignment will be one of wxLEFT, wxCENTRE or wxRIGHT. \\ Vertical alignment will be one of wxTOP, wxCENTRE or wxBOTTOM. +\perlnote{This method takes no parameters and +returns a 2-element list {\tt ( horiz, vert )}.} + \membersection{wxGrid::GetColLabelSize}\label{wxgridgetcollabelsize} \func{int}{GetColLabelSize}{\void} @@ -450,8 +478,8 @@ Returns the current height of the column labels. \func{wxString}{GetColLabelValue}{\param{int }{col}} -Returns the specifed column label. The default grid table class provides column labels of -the form A,B...Z,AA,AB...ZZ,AAA... If you are using a custom grid table you can override +Returns the specified column label. The default grid table class provides column labels of +the form A,B...Z,AA,AB...ZZ,AAA... If you are using a custom grid table you can override \helpref{wxGridTableBase::GetColLabelValue}{wxgridtablebasegetcollabelvalue} to provide your own labels. @@ -468,8 +496,8 @@ Returns the width of the specified column. Sets the arguments to the current default horizontal and vertical text alignment values. -Horizontal alignment will be one of wxALIGN_LEFT, wxALIGN_CENTRE or wxALIGN_RIGHT. \\ -Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM. +Horizontal alignment will be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT. \\ +Vertical alignment will be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM. \membersection{wxGrid::GetDefaultCellBackgroundColour}\label{wxgridgetdefaultcellbackgroundcolour} @@ -553,7 +581,7 @@ Returns the colour used for grid lines. \func{bool}{GridLinesEnabled}{\void} -Returnes TRUE if drawing of grid lines is turned on, FALSE otherwise. +Returns true if drawing of grid lines is turned on, false otherwise. \membersection{wxGrid::GetLabelBackgroundColour}\label{wxgridgetlabelbackgroundcolour} @@ -595,6 +623,9 @@ Sets the arguments to the current row label alignment values. Horizontal alignment will be one of wxLEFT, wxCENTRE or wxRIGHT. \\ Vertical alignment will be one of wxTOP, wxCENTRE or wxBOTTOM. +\perlnote{This method takes no parameters and +returns a 2-element list {\tt ( horiz, vert )}.} + \membersection{wxGrid::GetRowLabelSize}\label{wxgridgetrowlabelsize} \func{int}{GetRowLabelSize}{\void} @@ -605,7 +636,7 @@ Returns the current width of the row labels. \func{wxString}{GetRowLabelValue}{\param{int }{row}} -Returns the specifed row label. The default grid table class provides numeric row labels. +Returns the specified row label. The default grid table class provides numeric row labels. If you are using a custom grid table you can override \helpref{wxGridTableBase::GetRowLabelValue}{wxgridtablebasegetcollabelvalue} to provide your own labels. @@ -616,6 +647,44 @@ your own labels. Returns the height of the specified row. +\membersection{wxGrid::GetSelectionMode}\label{wxgridgetselectionmode} + +\constfunc{wxGrid::wxGridSelectionModes}{GetSelectionMode}{\void} + +Returns the current selection mode, see \helpref{wxGrid::SetSelectionMode}{wxgridsetselectionmode}. + +\membersection{wxGrid::GetSelectedCells}\label{wxgridgetselectedcells} + +\constfunc{wxGridCellCoordsArray}{GetSelectedCells}{\void} + +Returns an array of singly selected cells. + +\membersection{wxGrid::GetSelectedCols}\label{wxgridgetselectedcols} + +\constfunc{wxArrayInt}{GetSelectedCols}{\void} + +Returns an array of selected cols. + +\membersection{wxGrid::GetSelectedRows}\label{wxgridgetselectedrows} + +\constfunc{wxArrayInt}{GetSelectedRows}{\void} + +Returns an array of selected rows. + +\membersection{wxGrid::GetSelectionBlockTopLeft}\label{wxgridgetselectionblocktopleft} + +\constfunc{wxGridCellCoordsArray}{GetSelectionBlockTopLeft}{\void} + +Returns an array of the top left corners of blocks of selected cells, +see \helpref{wxGrid::GetSelectionBlockBottomRight}{wxgridgetselectionblockbottomright}. + +\membersection{wxGrid::GetSelectionBlockBottomRight}\label{wxgridgetselectionblockbottomright} + +\constfunc{wxGridCellCoordsArray}{GetSelectionBlockBottomRight}{\void} + +Returns an array of the bottom right corners of blocks of selected cells, +see \helpref{wxGrid::GetSelectionBlockTopLeft}{wxgridgetselectionblocktopleft}. + \membersection{wxGrid::GetTable}\label{wxgridgettable} \constfunc{wxGridTableBase *}{GetTable}{\void} @@ -630,10 +699,10 @@ Hides the in-place cell edit control. \membersection{wxGrid::InsertCols}\label{wxgridinsertcols} -\func{bool}{InsertCols}{\param{int }{pos = 0}, \param{int }{numCols = 1}, \param{bool }{updateLabels = TRUE}} +\func{bool}{InsertCols}{\param{int }{pos = 0}, \param{int }{numCols = 1}, \param{bool }{updateLabels = true}} Inserts one or more new columns into a grid with the first new column at the -specified position and returns TRUE if successful. The updateLabels argument is not +specified position and returns true if successful. The updateLabels argument is not used at present. The sequence of actions begins with the grid object requesting the underlying grid @@ -647,10 +716,10 @@ table class. \membersection{wxGrid::InsertRows}\label{wxgridinsertrows} -\func{bool}{InsertRows}{\param{int }{pos = 0}, \param{int }{numRows = 1}, \param{bool }{updateLabels = TRUE}} +\func{bool}{InsertRows}{\param{int }{pos = 0}, \param{int }{numRows = 1}, \param{bool }{updateLabels = true}} Inserts one or more new rows into a grid with the first new row at the specified -position and returns TRUE if successful. The updateLabels argument is not used at +position and returns true if successful. The updateLabels argument is not used at present. The sequence of actions begins with the grid object requesting the underlying grid @@ -666,45 +735,51 @@ table class. \constfunc{bool}{IsCellEditControlEnabled}{\void} -Returns TRUE if the in-place edit control is currently enabled. +Returns true if the in-place edit control is currently enabled. \membersection{wxGrid::IsCurrentCellReadOnly}\label{wxgridiscurrentcellreadonly} \constfunc{bool}{IsCurrentCellReadOnly}{\void} -Returns TRUE if the current cell has been set to read-only +Returns true if the current cell has been set to read-only (see \helpref{wxGrid::SetReadOnly}{wxgridsetreadonly}). \membersection{wxGrid::IsEditable}\label{wxgridiseditable} \func{bool}{IsEditable}{\void} -Returns FALSE if the whole grid has been set as read-only or TRUE otherwise. +Returns false if the whole grid has been set as read-only or true otherwise. See \helpref{wxGrid::EnableEditing}{wxgridenableediting} for more information about controlling the editing status of grid cells. +\membersection{wxGrid::IsInSelection}\label{wxgridisinselection} + +\constfunc{bool}{IsInSelection}{\param{int }{row}, \param{int }{col}} + +\constfunc{bool}{IsInSelection}{\param{const wxGridCellCoords\& }{coords}} + +Is this cell currently selected. + \membersection{wxGrid::IsReadOnly}\label{wxgridisreadonly} \constfunc{bool}{IsReadOnly}{\param{int }{row}, \param{int }{col}} -Returns TRUE if the cell at the specified location can't be edited. +Returns true if the cell at the specified location can't be edited. See also \helpref{wxGrid::IsReadOnly}{wxgridisreadonly}. \membersection{wxGrid::IsSelection}\label{wxgridisselection} \func{bool}{IsSelection}{\void} -Returns TRUE if there are currently rows, columns or blocks of cells selected. +Returns true if there are currently rows, columns or blocks of cells selected. \membersection{wxGrid::IsVisible}\label{wxgridisvisible} -\func{bool}{IsVisible}{\param{int }{row}, \param{int }{col}, -\param{bool }{wholeCellVisible = TRUE} +\func{bool}{IsVisible}{\param{int }{row}, \param{int }{col}, \param{bool }{wholeCellVisible = true}} -\func{bool}{IsVisible}{\param{const wxGridCellCoords\& }{coords}, -\param{bool }{wholeCellVisible = TRUE}} +\func{bool}{IsVisible}{\param{const wxGridCellCoords\& }{coords}, \param{bool }{wholeCellVisible = true}} -Returns TRUE if a cell is either wholly visible (the default) or at least partially +Returns true if a cell is either wholly visible (the default) or at least partially visible in the grid window. \membersection{wxGrid::MakeCellVisible}\label{wxgridmakecellvisible} @@ -720,8 +795,8 @@ nothing if the cell is already visible. \func{bool}{MoveCursorDown}{\param{bool }{expandSelection}} -Moves the grid cursor down by one row. If a block of cells was previously selected it -will expand if the argument is TRUE or be cleared if the argument is FALSE. +Moves the grid cursor down by one row. If a block of cells was previously selected it +will expand if the argument is true or be cleared if the argument is false. \wxheading{Keyboard}\\ This function is called for Down cursor key presses or Shift+Down to expand a selection. @@ -731,7 +806,7 @@ This function is called for Down cursor key presses or Shift+Down to expand a se \func{bool}{MoveCursorLeft}{\param{bool }{expandSelection}} Moves the grid cursor left by one column. If a block of cells was previously selected it -will expand if the argument is TRUE or be cleared if the argument is FALSE. +will expand if the argument is true or be cleared if the argument is false. \wxheading{Keyboard}\\ This function is called for Left cursor key presses or Shift+Left to expand a selection. @@ -741,7 +816,7 @@ This function is called for Left cursor key presses or Shift+Left to expand a se \func{bool}{MoveCursorRight}{\param{bool }{expandSelection}} Moves the grid cursor right by one column. If a block of cells was previously selected it -will expand if the argument is TRUE or be cleared if the argument is FALSE. +will expand if the argument is true or be cleared if the argument is false. \wxheading{Keyboard}\\ This function is called for Right cursor key presses or Shift+Right to expand a selection. @@ -751,7 +826,7 @@ This function is called for Right cursor key presses or Shift+Right to expand a \func{bool}{MoveCursorUp}{\param{bool }{expandSelection}} Moves the grid cursor up by one row. If a block of cells was previously selected it -will expand if the argument is TRUE or be cleared if the argument is FALSE. +will expand if the argument is true or be cleared if the argument is false. \wxheading{Keyboard}\\ This function is called for Up cursor key presses or Shift+Up to expand a selection. @@ -762,7 +837,7 @@ This function is called for Up cursor key presses or Shift+Up to expand a select Moves the grid cursor down in the current column such that it skips to the beginning or end of a block of non-empty cells. If a block of cells was previously selected it -will expand if the argument is TRUE or be cleared if the argument is FALSE. +will expand if the argument is true or be cleared if the argument is false. \wxheading{Keyboard}\\ This function is called for the Ctrl+Down key combination. Shift+Ctrl+Down expands a selection. @@ -773,7 +848,7 @@ This function is called for the Ctrl+Down key combination. Shift+Ctrl+Down expan Moves the grid cursor left in the current row such that it skips to the beginning or end of a block of non-empty cells. If a block of cells was previously selected it -will expand if the argument is TRUE or be cleared if the argument is FALSE. +will expand if the argument is true or be cleared if the argument is false. \wxheading{Keyboard}\\ This function is called for the Ctrl+Left key combination. Shift+Ctrl+left expands a selection. @@ -784,7 +859,7 @@ This function is called for the Ctrl+Left key combination. Shift+Ctrl+left expan Moves the grid cursor right in the current row such that it skips to the beginning or end of a block of non-empty cells. If a block of cells was previously selected it -will expand if the argument is TRUE or be cleared if the argument is FALSE. +will expand if the argument is true or be cleared if the argument is false. \wxheading{Keyboard}\\ This function is called for the Ctrl+Right key combination. Shift+Ctrl+Right expands a selection. @@ -795,7 +870,7 @@ This function is called for the Ctrl+Right key combination. Shift+Ctrl+Right exp Moves the grid cursor up in the current column such that it skips to the beginning or end of a block of non-empty cells. If a block of cells was previously selected it -will expand if the argument is TRUE or be cleared if the argument is FALSE. +will expand if the argument is true or be cleared if the argument is false. \wxheading{Keyboard}\\ This function is called for the Ctrl+Up key combination. Shift+Ctrl+Up expands a selection. @@ -837,41 +912,41 @@ Selects all cells in the grid. \membersection{wxGrid::SelectBlock}\label{wxgridselectblock} -\func{void}{SelectBlock}{\param{int }{topRow}, \param{int }{leftCol}, \param{int }{bottomRow}, \param{int }{rightCol}} - -\func{void}{SelectBlock}{\param{const wxGridCellCoords\& }{topLeft}, \param{const wxGridCellCoords\& }{bottomRight}} +\func{void}{SelectBlock}{\param{int }{topRow}, \param{int }{leftCol}, +\param{int }{bottomRow}, \param{int }{rightCol}, \param{bool }{addToSelected = false}} -Highlights a rectangular block of cells but does not select it ! +\func{void}{SelectBlock}{\param{const wxGridCellCoords\& }{topLeft}, +\param{const wxGridCellCoords\& }{bottomRight}, \param{bool }{addToSelected = false}} -\wxheading{Note} \\ This is obviously inconsistent with the other wxGrid::SelectXXX functions, each -of which call the corresponding wxGridSelection function whereas wxGrid::SelectBlock is only -responsible for highlighting a block of cells. There is presently no way to add a block to the -selection programmatically. This will probably be changed soon so that the existing SelectBlock -function is renamed to HighlightBlock and a new SelectBlock function introduced to call -wxGridSelection::SelectBlock. +Selects a rectangular block of cells. If addToSelected is false then any existing selection will be +deselected; if true the column will be added to the existing selection. \membersection{wxGrid::SelectCol}\label{wxgridselectcol} -\func{void}{SelectCol}{\param{int }{col}, \param{bool }{addToSelected = FALSE}} +\func{void}{SelectCol}{\param{int }{col}, \param{bool }{addToSelected = false}} -Selects the specified column. If addToSelected is FALSE then any existing selection will be -deselected; if TRUE the column will be added to the existing selection. +Selects the specified column. If addToSelected is false then any existing selection will be +deselected; if true the column will be added to the existing selection. \membersection{wxGrid::SelectRow}\label{wxgridselectrow} -\func{void}{SelectRow}{\param{int }{row}, \param{bool }{addToSelected = FALSE}} +\func{void}{SelectRow}{\param{int }{row}, \param{bool }{addToSelected = false}} -Selects the specified row. If addToSelected is FALSE then any existing selection will be -deselected; if TRUE the row will be added to the existing selection. +Selects the specified row. If addToSelected is false then any existing selection will be +deselected; if true the row will be added to the existing selection. \membersection{wxGrid::SetCellAlignment}\label{wxgridsetcellalignment} \func{void}{SetCellAlignment}{\param{int }{row}, \param{int }{col}, \param{int }{horiz}, \param{int }{vert}} -Sets the horizontal and vertial alignment for grid cell text at the specified location. +\func{void}{SetCellAlignment}{\param{int }{align}, \param{int }{row}, \param{int }{col}} + +\func{void}{SetCellAlignment}{\param{int }{align}} + +Sets the horizontal and vertical alignment for grid cell text at the specified location. -Horizontal alignment should be one of wxALIGN_LEFT, wxALIGN_CENTRE or wxALIGN_RIGHT. \\ -Vertical alignment should be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM. +Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT. \\ +Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM. \membersection{wxGrid::SetCellEditor}\label{wxgridsetcelleditor} @@ -885,7 +960,7 @@ the \helpref{wxGrid overview}{gridoverview} for more information about cell edit \membersection{wxGrid::SetCellFont}\label{wxgridsetcellfont} -\func{void}{SetCellFont}{\param{int }{row}, \param{int }{col}, \param{const }{wxFont\&}} +\func{void}{SetCellFont}{\param{int }{row}, \param{int }{col}, \param{const wxFont\&}{ font}} Sets the font for text in the grid cell at the specified location. @@ -901,7 +976,11 @@ the \helpref{wxGrid overview}{gridoverview} for more information about cell edit \membersection{wxGrid::SetCellTextColour}\label{wxgridsetcelltextcolour} -\func{void}{SetCellTextColour}{\param{int }{row}, \param{int }{col}, \param{const }{wxColour\&}} +\func{void}{SetCellTextColour}{\param{int }{row}, \param{int }{col}, \param{const wxColour\&}{ colour}} + +\func{void}{SetCellTextColour}{\param{const wxColour\& }{val}, \param{int }{row}, \param{int }{col}} + +\func{void}{SetCellTextColour}{\param{const wxColour\& }{colour}} Sets the text colour for the grid cell at the specified location. @@ -911,13 +990,17 @@ Sets the text colour for the grid cell at the specified location. \func{void}{SetCellValue}{\param{const wxGridCellCoords\& }{coords}, \param{const wxString\& }{s}} +\func{void}{SetCellValue}{\param{const wxString\& }{val}, \param{int }{row}, \param{int }{col}} + Sets the string value for the cell at the specified location. For simple applications where a grid object automatically uses a default grid table of string values you use this function together with \helpref{wxGrid::GetCellValue}{wxgridgetcellvalue} to access cell values. For more complex applications where you have derived your own grid table class that contains various data types (e.g. numeric, boolean or user-defined custom types) then you only use this -function for those cells that contain string values. +function for those cells that contain string values. + +The last form is for backward compatibility only. See \helpref{wxGridTableBase::CanSetValueAs}{wxgridtablebasecangetvalueas} and the \helpref{wxGrid overview}{gridoverview} for more information. @@ -964,8 +1047,9 @@ with custom data types. Sets the horizontal and vertical alignment of column label text. -Horizontal alignment should be one of wxALIGN_LEFT, wxALIGN_CENTRE or wxALIGN_RIGHT. \\ -Vertical alignment should be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM. +Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT. + +Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM. \membersection{wxGrid::SetColLabelSize}\label{wxgridsetcollabelsize} @@ -975,7 +1059,7 @@ Sets the height of the column labels. \membersection{wxGrid::SetColLabelValue}\label{wxgridsetcollabelvalue} -\func{void}{SetColLabelValue}{\param{int }{col}, \param{const }{wxString\&}} +\func{void}{SetColLabelValue}{\param{int }{col}, \param{const wxString\&}{ value}} Set the value for the given column label. If you are using a derived grid table you must override \helpref{wxGridTableBase::SetColLabelValue}{wxgridtablebasesetcollabelvalue} @@ -987,6 +1071,26 @@ for this to have any effect. Sets the minimal width for the specified column. This should normally be called when creating the grid because it will not resize a column that is already narrower than the minimal width. +The width argument must be higher than the minimimal acceptable column width, see +\helpref{wxGrid::GetColMinimalAcceptableWidth}{wxgridgetcolminimalacceptablewidth}. + +\membersection{wxGrid::SetColMinimalAcceptableWidth}\label{wxgridsetcolminimalacceptablewidth} + +\func{void}{SetColMinimalAcceptableWidth}{\param{int }{width}} + +This modifies the minimum column width that can be handled correctly. Specifying a low value here +allows smaller grid cells to be dealt with correctly. Specifying a value here which is much smaller +than the actual minimum size will incur a performance penalty in the functions which perform +grid cell index lookup on the basis of screen coordinates. +This should normally be called when creating the grid because it will not resize existing columns +with sizes smaller than the value specified here. + +\membersection{wxGrid::GetColMinimalAcceptableWidth}\label{wxgridgetcolminimalacceptablewidth} + +\func{int}{GetColMinimalAcceptableWidth}{} + +This returns the value of the lowest column width that can be handled correctly. See +member \helpref{SetColMinimalAcceptableWidth}{wxgridsetcolminimalacceptablewidth} for details. \membersection{wxGrid::SetColSize}\label{wxgridsetcolsize} @@ -997,10 +1101,10 @@ Sets the width of the specified column. This function does not refresh the grid. If you are calling it outside of a BeginBatch / EndBatch block you can use \helpref{wxGrid::ForceRefresh}{wxgridforcerefresh} to see the changes. -Automatically sizes the column to fit its contents. If setAsMin is TRUE the calculated width will +Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will also be set as the minimal width for the column. -\wxheading{Note} \\ +\wxheading{Note}\\ wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used. The memory requirements for this could become prohibitive if your grid is very large. @@ -1008,20 +1112,21 @@ The memory requirements for this could become prohibitive if your grid is very l \func{void}{SetDefaultCellAlignment}{\param{int }{horiz}, \param{int }{vert}} -Sets the default horizontal and vertial alignment for grid cell text. +Sets the default horizontal and vertical alignment for grid cell text. -Horizontal alignment should be one of wxALIGN_LEFT, wxALIGN_CENTRE or wxALIGN_RIGHT. \\ -Vertical alignment should be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM. +Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT. + +Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM. \membersection{wxGrid::SetDefaultCellBackgroundColour}\label{wxgridsetdefaultcellbackgroundcolour} -\func{void}{SetDefaultCellBackgroundColour}{\param{const }{wxColour\&}} +\func{void}{SetDefaultCellBackgroundColour}{\param{const wxColour\&}{ colour}} Sets the default background colour for grid cells. \membersection{wxGrid::SetDefaultCellFont}\label{wxgridsetdefaultcellfont} -\func{void}{SetDefaultCellFont}{\param{const }{wxFont\&}} +\func{void}{SetDefaultCellFont}{\param{const wxFont\&}{ font}} Sets the default font to be used for grid cell text. @@ -1045,17 +1150,17 @@ the \helpref{wxGrid overview}{gridoverview} for more information about cell edit \membersection{wxGrid::SetDefaultColSize}\label{wxgridsetdefaultcolsize} -\func{void}{SetDefaultColSize}{\param{int }{width}, \param{bool }{resizeExistingCols = FALSE}} +\func{void}{SetDefaultColSize}{\param{int }{width}, \param{bool }{resizeExistingCols = false}} Sets the default width for columns in the grid. This will only affect columns subsequently added to -the grid unless resizeExistingCols is TRUE. +the grid unless resizeExistingCols is true. \membersection{wxGrid::SetDefaultRowSize}\label{wxgridsetdefaultrowsize} -\func{void}{SetDefaultRowSize}{\param{int }{height}, \param{bool }{resizeExistingRows = FALSE}} +\func{void}{SetDefaultRowSize}{\param{int }{height}, \param{bool }{resizeExistingRows = false}} Sets the default height for rows in the grid. This will only affect rows subsequently added -to the grid unless resizeExistingRows is TRUE. +to the grid unless resizeExistingRows is true. \membersection{wxGrid::SetGridCursor}\label{wxgridsetgridcursor} @@ -1066,31 +1171,31 @@ This function calls \helpref{wxGrid::MakeCellVisible}{wxgridmakecellvisible}. \membersection{wxGrid::SetGridLineColour}\label{wxgridsetgridlinecolour} -\func{void}{SetGridLineColour}{\param{const }{wxColour\&}} +\func{void}{SetGridLineColour}{\param{const wxColour\&}{colour}} Sets the colour used to draw grid lines. \membersection{wxGrid::SetLabelBackgroundColour}\label{wxgridsetlabelbackgroundcolour} -\func{void}{SetLabelBackgroundColour}{\param{const }{wxColour\&}} +\func{void}{SetLabelBackgroundColour}{\param{const wxColour\&}{ colour}} Sets the background colour for row and column labels. \membersection{wxGrid::SetLabelFont}\label{wxgridsetlabelfont} -\func{void}{SetLabelFont}{\param{const }{wxFont\&}} +\func{void}{SetLabelFont}{\param{const wxFont\&}{ font}} Sets the font for row and column labels. \membersection{wxGrid::SetLabelTextColour}\label{wxgridsetlabeltextcolour} -\func{void}{SetLabelTextColour}{\param{const }{wxColour\&}} +\func{void}{SetLabelTextColour}{\param{const wxColour\&}{ colour}} Sets the colour for row and column label text. \membersection{wxGrid::SetReadOnly}\label{wxgridsetreadonly} -\func{void}{SetReadOnly}{\param{int }{row}, \param{int }{col}, \param{bool }{isReadOnly = TRUE}} +\func{void}{SetReadOnly}{\param{int }{row}, \param{int }{col}, \param{bool }{isReadOnly = true}} Makes the cell at the specified location read-only or editable. See also \helpref{wxGrid::IsReadOnly}{wxgridisreadonly}. @@ -1109,8 +1214,9 @@ about controlling cell attributes. Sets the horizontal and vertical alignment of row label text. -Horizontal alignment should be one of wxALIGN_LEFT, wxALIGN_CENTRE or wxALIGN_RIGHT. \\ -Vertical alignment should be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM. +Horizontal alignment should be one of wxALIGN\_LEFT, wxALIGN\_CENTRE or wxALIGN\_RIGHT. + +Vertical alignment should be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTTOM. \membersection{wxGrid::SetRowLabelSize}\label{wxgridsetrowlabelsize} @@ -1120,18 +1226,38 @@ Sets the width of the row labels. \membersection{wxGrid::SetRowLabelValue}\label{wxgridsetrowlabelvalue} -\func{void}{SetRowLabelValue}{\param{int }{row}, \param{const }{wxString\&}} +\func{void}{SetRowLabelValue}{\param{int }{row}, \param{const wxString\&}{ value}} Set the value for the given row label. If you are using a derived grid table you must -override \helpref{wxGridTableBase::SetRowLabelValue}{wxgridtablebasesetrowlabelvalue} +override \helpref{wxGridTableBase::SetRowLabelValue}{wxgridtablebasesetrowlabelvalue} for this to have any effect. \membersection{wxGrid::SetRowMinimalHeight}\label{wxgridsetrowminimalheight} -\func{void}{SetRowMinimalHeight}{\param{int }{row}, \param{int }{width}} +\func{void}{SetRowMinimalHeight}{\param{int }{row}, \param{int }{height}} Sets the minimal height for the specified row. This should normally be called when creating the grid because it will not resize a row that is already shorter than the minimal height. +The height argument must be higher than the minimimal acceptable row height, see +\helpref{wxGrid::GetRowMinimalAcceptableHeight}{wxgridgetrowminimalacceptableheight}. + +\membersection{wxGrid::SetRowMinimalAcceptableHeight}\label{wxgridsetrowminimalacceptableheight} + +\func{void}{SetRowMinimalAcceptableHeight}{\param{int }{height}} + +This modifies the minimum row width that can be handled correctly. Specifying a low value here +allows smaller grid cells to be dealt with correctly. Specifying a value here which is much smaller +than the actual minimum size will incur a performance penalty in the functions which perform +grid cell index lookup on the basis of screen coordinates. +This should normally be called when creating the grid because it will not resize existing rows +with sizes smaller than the value specified here. + +\membersection{wxGrid::GetRowMinimalAcceptableHeight}\label{wxgridgetrowminimalacceptableheight} + +\func{int}{GetRowMinimalAcceptableHeight}{} + +This returns the value of the lowest row width that can be handled correctly. See +member \helpref{SetRowMinimalAcceptableHeight}{wxgridsetrowminimalacceptableheight} for details. \membersection{wxGrid::SetRowSize}\label{wxgridsetrowsize} @@ -1142,16 +1268,17 @@ Sets the height of the specified row. This function does not refresh the grid. If you are calling it outside of a BeginBatch / EndBatch block you can use \helpref{wxGrid::ForceRefresh}{wxgridforcerefresh} to see the changes. -Automatically sizes the column to fit its contents. If setAsMin is TRUE the calculated width will +Automatically sizes the column to fit its contents. If setAsMin is true the calculated width will also be set as the minimal width for the column. -\wxheading{Note} \\ +\wxheading{Note} + wxGrid sets up arrays to store individual row and column sizes when non-default sizes are used. The memory requirements for this could become prohibitive if your grid is very large. \membersection{wxGrid::SetSelectionMode}\label{wxgridsetselectionmode} -\func{void}{SetSelectionMode}{\param{wxGrid::wxGridSelectionModes}{selmode}} +\func{void}{SetSelectionMode}{\param{wxGrid::wxGridSelectionModes}{ selmode}} Set the selection behaviour of the grid. @@ -1159,17 +1286,17 @@ Set the selection behaviour of the grid. \docparam{wxGrid::wxGridSelectCells}{The default mode where individual cells are selected.} -\docparam(wxGrid::wxGridSelectRows}{Selections will consist of whole rows.} +\docparam{wxGrid::wxGridSelectRows}{Selections will consist of whole rows.} \docparam{wxGrid::wxGridSelectionColumns}{Selections will consist of whole columns.} \membersection{wxGrid::SetTable}\label{wxgridsettable} -\func{bool}{SetTable}{\param{wxGridTableBase* }{table}, \param{bool }{takeOwnership = FALSE}, \param{wxGrid::wxGridSelectionModes }{selmode = wxGrid::wxGridSelectCells}} +\func{bool}{SetTable}{\param{wxGridTableBase* }{table}, \param{bool }{takeOwnership = false}, \param{wxGrid::wxGridSelectionModes }{selmode = wxGrid::wxGridSelectCells}} -Passes a pointer to a custom grid table to be used by the grid. This should be called +Passes a pointer to a custom grid table to be used by the grid. This should be called after the grid constructor and before using the grid object. If takeOwnership is set to -TRUE then the table will be deleted by the wxGrid destructor. +true then the table will be deleted by the wxGrid destructor. Use this function instead of \helpref{wxGrid::CreateGrid}{wxgridcreategrid} when your application involves complex or non-string data or data sets that are too large to fit @@ -1186,36 +1313,28 @@ Displays the in-place cell edit control for the current cell. \func{int}{XToCol}{\param{int }{x}} Returns the grid column that corresponds to the logical x coordinate. Returns -wxNOT_FOUND if there is no column at the x position. +wxNOT\_FOUND if there is no column at the x position. \membersection{wxGrid::XToEdgeOfCol}\label{wxgridxtoedgeofcol} \func{int}{XToEdgeOfCol}{\param{int }{x}} Returns the column whose right hand edge is close to the given logical x position. -If no column edge is near to this position wxNOT_FOUND is returned. +If no column edge is near to this position wxNOT\_FOUND is returned. \membersection{wxGrid::YToEdgeOfRow}\label{wxgridytoedgeofrow} \func{int}{YToEdgeOfRow}{\param{int }{y}} Returns the row whose bottom edge is close to the given logical y position. -If no row edge is near to this position wxNOT_FOUND is returned. +If no row edge is near to this position wxNOT\_FOUND is returned. \membersection{wxGrid::YToRow}\label{wxgridytorow} \func{int}{YToRow}{\param{int }{y}} Returns the grid row that corresponds to the logical y coordinate. Returns -wxNOT_FOUND if there is no row at the y position. - - - -\membersection{wxGrid::IsInSelection}\label{wxgridisinselection} - -\func{bool}{IsInSelection}{\param{int }{row}, \param{int }{col}} - -\func{bool}{IsInSelection}{\param{const wxGridCellCoords\& }{coords}} +wxNOT\_FOUND if there is no row at the y position. \membersection{wxGrid::BlockToDeviceRect}\label{wxgridblocktodevicerect} @@ -1263,7 +1382,6 @@ Access or update the selection fore/back colours Methods for a registry for mapping data types to Renderers/Editors - \membersection{wxGrid::GetDefaultEditorForCell}\label{wxgridgetdefaulteditorforcell} \constfunc{wxGridCellEditor*}{GetDefaultEditorForCell}{\param{int }{row}, \param{int }{col}} @@ -1290,101 +1408,98 @@ Methods for a registry for mapping data types to Renderers/Editors \func{void}{SetMargins}{\param{int }{extraWidth}, \param{int }{extraHeight}} -grid may occupy more space than needed for its rows/columns, this +A grid may occupy more space than needed for its rows/columns. This function allows to set how big this extra space is - \membersection{wxGrid::wxGrid}\label{wxgridwxgrid} \func{}{wxGrid}{\param{wxWindow* }{parent}, \param{int }{x}, \param{int }{y}, \param{int }{w = -1}, \param{int }{h = -1}, \param{long }{style = wxWANTS\_CHARS}, \param{const wxString\& }{name = wxPanelNameStr}} ------- For compatibility with previous wxGrid only... - -** Don't use these in new code because they ** -** are liable to disappear in a future ** -** revision ** - - - -\membersection{wxGrid::SetCellValue}\label{wxgridsetcellvalue} - -\func{void}{SetCellValue}{\param{const wxString\& }{val}, \param{int }{row}, \param{int }{col}} - +Backward compatibility. \membersection{wxGrid::UpdateDimensions}\label{wxgridupdatedimensions} \func{void}{UpdateDimensions}{\void} +Backward compatibility. \membersection{wxGrid::GetRows}\label{wxgridgetrows} \func{int}{GetRows}{\void} +Backward compatibility. \membersection{wxGrid::GetCols}\label{wxgridgetcols} \func{int}{GetCols}{\void} +Backward compatibility. \membersection{wxGrid::GetCursorRow}\label{wxgridgetcursorrow} \func{int}{GetCursorRow}{\void} +Backward compatibility. \membersection{wxGrid::GetCursorColumn}\label{wxgridgetcursorcolumn} \func{int}{GetCursorColumn}{\void} +Backward compatibility. \membersection{wxGrid::GetScrollPosX}\label{wxgridgetscrollposx} \func{int}{GetScrollPosX}{\void} +Backward compatibility. \membersection{wxGrid::GetScrollPosY}\label{wxgridgetscrollposy} \func{int}{GetScrollPosY}{\void} +Backward compatibility. \membersection{wxGrid::SetScrollX}\label{wxgridsetscrollx} -\func{void}{SetScrollX}{\param{int }{WXUNUSED(x)}} +\func{void}{SetScrollX}{\param{int }{x}} +Backward compatibility. \membersection{wxGrid::SetScrollY}\label{wxgridsetscrolly} -\func{void}{SetScrollY}{\param{int }{WXUNUSED(y)}} +\func{void}{SetScrollY}{\param{int }{y}} +Backward compatibility. \membersection{wxGrid::SetColumnWidth}\label{wxgridsetcolumnwidth} \func{void}{SetColumnWidth}{\param{int }{col}, \param{int }{width}} +Backward compatibility. \membersection{wxGrid::GetColumnWidth}\label{wxgridgetcolumnwidth} \func{int}{GetColumnWidth}{\param{int }{col}} +Backward compatibility. \membersection{wxGrid::SetRowHeight}\label{wxgridsetrowheight} \func{void}{SetRowHeight}{\param{int }{row}, \param{int }{height}} +Backward compatibility. \membersection{wxGrid::GetViewHeight}\label{wxgridgetviewheight} \func{int}{GetViewHeight}{\void} -GetRowHeight() is below -returned num whole rows visible - +Backward compatibility. \membersection{wxGrid::GetViewWidth}\label{wxgridgetviewwidth} \func{int}{GetViewWidth}{\void} -returned num whole cols visible - +Returned number of whole cols visible. \membersection{wxGrid::SetLabelSize}\label{wxgridsetlabelsize} @@ -1403,7 +1518,7 @@ returned num whole cols visible \membersection{wxGrid::GetLabelAlignment}\label{wxgridgetlabelalignment} -\func{int}{GetLabelAlignment}{\param{int }{orientation}, \param{int }{WXUNUSED(align)}} +\func{int}{GetLabelAlignment}{\param{int }{orientation}, \param{int }{align}} \membersection{wxGrid::SetLabelValue}\label{wxgridsetlabelvalue} @@ -1420,37 +1535,21 @@ returned num whole cols visible \constfunc{wxFont}{GetCellTextFont}{\void} - -\membersection{wxGrid::GetCellTextFont}\label{wxgridgetcelltextfont} - -\constfunc{wxFont}{GetCellTextFont}{\param{int }{WXUNUSED(row)}, \param{int }{WXUNUSED(col)}} +\constfunc{wxFont}{GetCellTextFont}{\param{int }{row}, \param{int }{col}} \membersection{wxGrid::SetCellTextFont}\label{wxgridsetcelltextfont} \func{void}{SetCellTextFont}{\param{const wxFont\& }{fnt}} - -\membersection{wxGrid::SetCellTextFont}\label{wxgridsetcelltextfont} - \func{void}{SetCellTextFont}{\param{const wxFont\& }{fnt}, \param{int }{row}, \param{int }{col}} -\membersection{wxGrid::SetCellTextColour}\label{wxgridsetcelltextcolour} - -\func{void}{SetCellTextColour}{\param{const wxColour\& }{val}, \param{int }{row}, \param{int }{col}} - - -\membersection{wxGrid::SetCellTextColour}\label{wxgridsetcelltextcolour} - -\func{void}{SetCellTextColour}{\param{const wxColour\& }{col}} - - \membersection{wxGrid::SetCellBackgroundColour}\label{wxgridsetcellbackgroundcolour} \func{void}{SetCellBackgroundColour}{\param{const wxColour\& }{col}} -\func{void}{SetCellBackgroundColour}{\param{int }{row}, \param{int }{col}, \param{const }{wxColour\&}} +\func{void}{SetCellBackgroundColour}{\param{int }{row}, \param{int }{col}, \param{const wxColour\&}{ colour}} \func{void}{SetCellBackgroundColour}{\param{const wxColour\& }{colour}, \param{int }{row}, \param{int }{col}} @@ -1462,7 +1561,7 @@ returned num whole cols visible \membersection{wxGrid::SetEditable}\label{wxgridseteditable} -\func{void}{SetEditable}{\param{bool }{edit = TRUE}} +\func{void}{SetEditable}{\param{bool }{edit = true}} \membersection{wxGrid::GetEditInPlace}\label{wxgridgeteditinplace} @@ -1472,27 +1571,17 @@ returned num whole cols visible \membersection{wxGrid::SetEditInPlace}\label{wxgridseteditinplace} -\func{void}{SetEditInPlace}{\param{bool }{WXUNUSED(edit) = TRUE}} - - -\membersection{wxGrid::SetCellAlignment}\label{wxgridsetcellalignment} - -\func{void}{SetCellAlignment}{\param{int }{align}, \param{int }{row}, \param{int }{col}} - - -\membersection{wxGrid::SetCellAlignment}\label{wxgridsetcellalignment} - -\func{void}{SetCellAlignment}{\param{int }{WXUNUSED(align)}} +\func{void}{SetEditInPlace}{\param{bool }{edit = true}} \membersection{wxGrid::SetCellBitmap}\label{wxgridsetcellbitmap} -\func{void}{SetCellBitmap}{\param{wxBitmap* }{WXUNUSED(bitmap)}, \param{int }{WXUNUSED(row)}, \param{int }{WXUNUSED(col)}} +\func{void}{SetCellBitmap}{\param{wxBitmap* }{bitmap}, \param{int }{row}, \param{int }{col}} \membersection{wxGrid::SetDividerPen}\label{wxgridsetdividerpen} -\func{void}{SetDividerPen}{\param{const wxPen\& }{WXUNUSED(pen)}} +\func{void}{SetDividerPen}{\param{const wxPen\& }{pen}} \membersection{wxGrid::GetDividerPen}\label{wxgridgetdividerpen} @@ -1502,42 +1591,39 @@ returned num whole cols visible \membersection{wxGrid::OnActivate}\label{wxgridonactivate} -\func{void}{OnActivate}{\param{bool }{WXUNUSED(active)}} - +\func{void}{OnActivate}{\param{bool }{active}} \membersection{wxGrid::Fit}\label{wxgridfit} \func{void}{Fit}{\void} -overridden wxWindow methods - +Overridden wxWindow methods \membersection{wxGrid::DoGetBestSize}\label{wxgriddogetbestsize} \constfunc{wxSize}{DoGetBestSize}{\void} - \membersection{wxGrid::InitRowHeights}\label{wxgridinitrowheights} \func{void}{InitRowHeights}{\void} -NB: *never* access m\_row/col arrays directly because they are created -on demand, *always* use accessor functions instead! -init the m\_rowHeights/Bottoms arrays with default values +NB: {\it never} access m\_row/col arrays directly because they are created +on demand, {\it always} use accessor functions instead! +Init the m\_rowHeights/Bottoms arrays with default values. \membersection{wxGrid::InitColWidths}\label{wxgridinitcolwidths} \func{void}{InitColWidths}{\void} -init the m\_colWidths/Rights arrays +Init the m\_colWidths/Rights arrays \membersection{wxGrid::GetColWidth}\label{wxgridgetcolwidth} \constfunc{int}{GetColWidth}{\param{int }{col}} -get the col/row coords +Get the col/row coords \membersection{wxGrid::GetColLeft}\label{wxgridgetcolleft} @@ -1554,8 +1640,7 @@ get the col/row coords \constfunc{int}{GetRowHeight}{\param{int }{row}} -this function must be public for compatibility... - +This function must be public for compatibility. \membersection{wxGrid::GetRowTop}\label{wxgridgetrowtop} @@ -1569,22 +1654,19 @@ this function must be public for compatibility... \membersection{wxGrid::SetOrCalcColumnSizes}\label{wxgridsetorcalccolumnsizes} -\func{int}{SetOrCalcColumnSizes}{\param{bool }{calcOnly}, \param{bool }{setAsMin = TRUE}} - -common part of AutoSizeColumn/Row() and GetBestSize() +\func{int}{SetOrCalcColumnSizes}{\param{bool }{calcOnly}, \param{bool }{setAsMin = true}} +Common part of AutoSizeColumn/Row() and GetBestSize() \membersection{wxGrid::SetOrCalcRowSizes}\label{wxgridsetorcalcrowsizes} -\func{int}{SetOrCalcRowSizes}{\param{bool }{calcOnly}, \param{bool }{setAsMin = TRUE}} - +\func{int}{SetOrCalcRowSizes}{\param{bool }{calcOnly}, \param{bool }{setAsMin = true}} \membersection{wxGrid::AutoSizeColOrRow}\label{wxgridautosizecolorrow} \func{void}{AutoSizeColOrRow}{\param{int }{n}, \param{bool }{setAsMin}, \param{bool }{column}} -common part of AutoSizeColumn/Row() -or row? +Common part of AutoSizeColumn/Row() or row? \membersection{wxGrid::GetColMinimalWidth}\label{wxgridgetcolminimalwidth} @@ -1592,19 +1674,17 @@ or row? get the minimal width of the given column/row - \membersection{wxGrid::GetRowMinimalHeight}\label{wxgridgetrowminimalheight} \constfunc{int}{GetRowMinimalHeight}{\param{int }{col}} - \membersection{wxGrid::CanHaveAttributes}\label{wxgridcanhaveattributes} \func{bool}{CanHaveAttributes}{\void} -do we have some place to store attributes in? - +Do we have some place to store attributes in? \membersection{wxGrid::GetOrCreateCellAttr}\label{wxgridgetorcreatecellattr} -\constfunc{wxGridCellAttr*}{GetOrCreateCellAttr}{\param{int }{row}, \param{int }{col} \ No newline at end of file +\constfunc{wxGridCellAttr*}{GetOrCreateCellAttr}{\param{int }{row}, \param{int }{col}} +