made (many) more wxGrid methods const
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44367 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -257,7 +257,7 @@ screen flicker. The final EndBatch will cause the grid to be repainted.
|
|||||||
|
|
||||||
\membersection{wxGrid::BlockToDeviceRect}\label{wxgridblocktodevicerect}
|
\membersection{wxGrid::BlockToDeviceRect}\label{wxgridblocktodevicerect}
|
||||||
|
|
||||||
\func{wxRect}{BlockToDeviceRect}{\param{const wxGridCellCoords \& }{topLeft}, \param{const wxGridCellCoords \& }{bottomRight}}
|
\constfunc{wxRect}{BlockToDeviceRect}{\param{const wxGridCellCoords \& }{topLeft}, \param{const wxGridCellCoords \& }{bottomRight}}
|
||||||
|
|
||||||
This function returns the rectangle that encloses the block of cells
|
This function returns the rectangle that encloses the block of cells
|
||||||
limited by TopLeft and BottomRight cell in device coords and clipped
|
limited by TopLeft and BottomRight cell in device coords and clipped
|
||||||
@@ -267,7 +267,7 @@ to the client size of the grid window.
|
|||||||
|
|
||||||
\membersection{wxGrid::CanDragColMove}\label{wxgridcandragcolmove}
|
\membersection{wxGrid::CanDragColMove}\label{wxgridcandragcolmove}
|
||||||
|
|
||||||
\func{bool}{CanDragColMove}{\void}
|
\constfunc{bool}{CanDragColMove}{\void}
|
||||||
|
|
||||||
Returns true if columns can be moved by dragging with the mouse. Columns can be moved
|
Returns true if columns can be moved by dragging with the mouse. Columns can be moved
|
||||||
by dragging on their labels.
|
by dragging on their labels.
|
||||||
@@ -276,7 +276,7 @@ by dragging on their labels.
|
|||||||
|
|
||||||
\membersection{wxGrid::CanDragColSize}\label{wxgridcandragcolsize}
|
\membersection{wxGrid::CanDragColSize}\label{wxgridcandragcolsize}
|
||||||
|
|
||||||
\func{bool}{CanDragColSize}{\void}
|
\constfunc{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
|
by dragging the edges of their labels. If grid line dragging is enabled they can also be
|
||||||
@@ -287,7 +287,7 @@ resized by dragging the right edge of the column in the grid cell area
|
|||||||
|
|
||||||
\membersection{wxGrid::CanDragRowSize}\label{wxgridcandragrowsize}
|
\membersection{wxGrid::CanDragRowSize}\label{wxgridcandragrowsize}
|
||||||
|
|
||||||
\func{bool}{CanDragRowSize}{\void}
|
\constfunc{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
|
by dragging the edges of their labels. If grid line dragging is enabled they can also be
|
||||||
@@ -298,7 +298,7 @@ resized by dragging the lower edge of the row in the grid cell area
|
|||||||
|
|
||||||
\membersection{wxGrid::CanDragGridSize}\label{wxgridcandraggridsize}
|
\membersection{wxGrid::CanDragGridSize}\label{wxgridcandraggridsize}
|
||||||
|
|
||||||
\func{bool}{CanDragGridSize}{\void}
|
\constfunc{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.
|
||||||
|
|
||||||
@@ -315,7 +315,7 @@ false otherwise (e.g. if the current cell is read-only).
|
|||||||
|
|
||||||
\membersection{wxGrid::CanHaveAttributes}\label{wxgridcanhaveattributes}
|
\membersection{wxGrid::CanHaveAttributes}\label{wxgridcanhaveattributes}
|
||||||
|
|
||||||
\func{bool}{CanHaveAttributes}{\void}
|
\constfunc{bool}{CanHaveAttributes}{\void}
|
||||||
|
|
||||||
Do we have some place to store attributes in?
|
Do we have some place to store attributes in?
|
||||||
|
|
||||||
@@ -323,9 +323,9 @@ Do we have some place to store attributes in?
|
|||||||
|
|
||||||
\membersection{wxGrid::CellToRect}\label{wxgridcelltorect}
|
\membersection{wxGrid::CellToRect}\label{wxgridcelltorect}
|
||||||
|
|
||||||
\func{wxRect}{CellToRect}{\param{int }{row}, \param{int }{col}}
|
\constfunc{wxRect}{CellToRect}{\param{int }{row}, \param{int }{col}}
|
||||||
|
|
||||||
\func{wxRect}{CellToRect}{\param{const wxGridCellCoords\& }{coords}}
|
\constfunc{wxRect}{CellToRect}{\param{const wxGridCellCoords\& }{coords}}
|
||||||
|
|
||||||
Return the rectangle corresponding to the grid cell's size and position in logical
|
Return the rectangle corresponding to the grid cell's size and position in logical
|
||||||
coordinates.
|
coordinates.
|
||||||
@@ -534,7 +534,7 @@ Causes immediate repainting of the grid. Use this instead of the usual wxWindow:
|
|||||||
|
|
||||||
\membersection{wxGrid::GetBatchCount}\label{wxgridgetbatchcount}
|
\membersection{wxGrid::GetBatchCount}\label{wxgridgetbatchcount}
|
||||||
|
|
||||||
\func{int}{GetBatchCount}{\void}
|
\constfunc{int}{GetBatchCount}{\void}
|
||||||
|
|
||||||
Returns the number of times that \helpref{wxGrid::BeginBatch}{wxgridbeginbatch} has been called
|
Returns the number of times that \helpref{wxGrid::BeginBatch}{wxgridbeginbatch} has been called
|
||||||
without (yet) matching calls to \helpref{wxGrid::EndBatch}{wxgridendbatch}. While
|
without (yet) matching calls to \helpref{wxGrid::EndBatch}{wxgridendbatch}. While
|
||||||
@@ -544,7 +544,7 @@ the grid's batch count is greater than zero the display will not be updated.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetCellAlignment}\label{wxgridgetcellalignment}
|
\membersection{wxGrid::GetCellAlignment}\label{wxgridgetcellalignment}
|
||||||
|
|
||||||
\func{void}{GetCellAlignment}{\param{int }{row}, \param{int }{col}, \param{int* }{horiz}, \param{int* }{vert}}
|
\constfunc{void}{GetCellAlignment}{\param{int }{row}, \param{int }{col}, \param{int* }{horiz}, \param{int* }{vert}}
|
||||||
|
|
||||||
Sets the arguments to the horizontal and vertical text alignment values for the
|
Sets the arguments to the horizontal and vertical text alignment values for the
|
||||||
grid cell at the specified location.
|
grid cell at the specified location.
|
||||||
@@ -559,7 +559,7 @@ returns a 2-element list {\tt ( horiz, vert )}.}
|
|||||||
|
|
||||||
\membersection{wxGrid::GetCellBackgroundColour}\label{wxgridgetcellbackgroundcolour}
|
\membersection{wxGrid::GetCellBackgroundColour}\label{wxgridgetcellbackgroundcolour}
|
||||||
|
|
||||||
\func{wxColour}{GetCellBackgroundColour}{\param{int }{row}, \param{int }{col}}
|
\constfunc{wxColour}{GetCellBackgroundColour}{\param{int }{row}, \param{int }{col}}
|
||||||
|
|
||||||
Returns the background colour of the cell at the specified location.
|
Returns the background colour of the cell at the specified location.
|
||||||
|
|
||||||
@@ -567,7 +567,7 @@ Returns the background colour of the cell at the specified location.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetCellEditor}\label{wxgridgetcelleditor}
|
\membersection{wxGrid::GetCellEditor}\label{wxgridgetcelleditor}
|
||||||
|
|
||||||
\func{wxGridCellEditor*}{GetCellEditor}{\param{int }{row}, \param{int }{col}}
|
\constfunc{wxGridCellEditor*}{GetCellEditor}{\param{int }{row}, \param{int }{col}}
|
||||||
|
|
||||||
Returns a pointer to the editor for the cell at the specified location.
|
Returns a pointer to the editor for the cell at the specified location.
|
||||||
|
|
||||||
@@ -578,7 +578,7 @@ the \helpref{wxGrid overview}{gridoverview} for more information about cell edit
|
|||||||
|
|
||||||
\membersection{wxGrid::GetCellFont}\label{wxgridgetcellfont}
|
\membersection{wxGrid::GetCellFont}\label{wxgridgetcellfont}
|
||||||
|
|
||||||
\func{wxFont}{GetCellFont}{\param{int }{row}, \param{int }{col}}
|
\constfunc{wxFont}{GetCellFont}{\param{int }{row}, \param{int }{col}}
|
||||||
|
|
||||||
Returns the font for text in the grid cell at the specified location.
|
Returns the font for text in the grid cell at the specified location.
|
||||||
|
|
||||||
@@ -586,7 +586,7 @@ Returns the font for text in the grid cell at the specified location.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetCellRenderer}\label{wxgridgetcellrenderer}
|
\membersection{wxGrid::GetCellRenderer}\label{wxgridgetcellrenderer}
|
||||||
|
|
||||||
\func{wxGridCellRenderer*}{GetCellRenderer}{\param{int }{row}, \param{int }{col}}
|
\constfunc{wxGridCellRenderer*}{GetCellRenderer}{\param{int }{row}, \param{int }{col}}
|
||||||
|
|
||||||
Returns a pointer to the renderer for the grid cell at the specified location.
|
Returns a pointer to the renderer for the grid cell at the specified location.
|
||||||
|
|
||||||
@@ -597,7 +597,7 @@ the \helpref{wxGrid overview}{gridoverview} for more information about cell edit
|
|||||||
|
|
||||||
\membersection{wxGrid::GetCellTextColour}\label{wxgridgetcelltextcolour}
|
\membersection{wxGrid::GetCellTextColour}\label{wxgridgetcelltextcolour}
|
||||||
|
|
||||||
\func{wxColour}{GetCellTextColour}{\param{int }{row}, \param{int }{col}}
|
\constfunc{wxColour}{GetCellTextColour}{\param{int }{row}, \param{int }{col}}
|
||||||
|
|
||||||
Returns the text colour for the grid cell at the specified location.
|
Returns the text colour for the grid cell at the specified location.
|
||||||
|
|
||||||
@@ -605,9 +605,9 @@ Returns the text colour for the grid cell at the specified location.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetCellValue}\label{wxgridgetcellvalue}
|
\membersection{wxGrid::GetCellValue}\label{wxgridgetcellvalue}
|
||||||
|
|
||||||
\func{wxString}{GetCellValue}{\param{int }{row}, \param{int }{col}}
|
\constfunc{wxString}{GetCellValue}{\param{int }{row}, \param{int }{col}}
|
||||||
|
|
||||||
\func{wxString}{GetCellValue}{\param{const wxGridCellCoords\&}{coords}}
|
\constfunc{wxString}{GetCellValue}{\param{const wxGridCellCoords\&}{coords}}
|
||||||
|
|
||||||
Returns the string contained in the cell at the specified location. For simple applications where a
|
Returns the string contained in 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
|
grid object automatically uses a default grid table of string values you use this function together
|
||||||
@@ -637,7 +637,7 @@ Returns the column ID of the specified column position.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetColLabelAlignment}\label{wxgridgetcollabelalignment}
|
\membersection{wxGrid::GetColLabelAlignment}\label{wxgridgetcollabelalignment}
|
||||||
|
|
||||||
\func{void}{GetColLabelAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
|
\constfunc{void}{GetColLabelAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
|
||||||
|
|
||||||
Sets the arguments to the current column label alignment values.
|
Sets the arguments to the current column label alignment values.
|
||||||
|
|
||||||
@@ -651,7 +651,7 @@ returns a 2-element list {\tt ( horiz, vert )}.}
|
|||||||
|
|
||||||
\membersection{wxGrid::GetColLabelSize}\label{wxgridgetcollabelsize}
|
\membersection{wxGrid::GetColLabelSize}\label{wxgridgetcollabelsize}
|
||||||
|
|
||||||
\func{int}{GetColLabelSize}{\void}
|
\constfunc{int}{GetColLabelSize}{\void}
|
||||||
|
|
||||||
Returns the current height of the column labels.
|
Returns the current height of the column labels.
|
||||||
|
|
||||||
@@ -659,7 +659,7 @@ Returns the current height of the column labels.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetColLabelValue}\label{wxgridgetcollabelvalue}
|
\membersection{wxGrid::GetColLabelValue}\label{wxgridgetcollabelvalue}
|
||||||
|
|
||||||
\func{wxString}{GetColLabelValue}{\param{int }{col}}
|
\constfunc{wxString}{GetColLabelValue}{\param{int }{col}}
|
||||||
|
|
||||||
Returns the specified column label. The default grid table class provides column labels of
|
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
|
the form A,B...Z,AA,AB...ZZ,AAA... If you are using a custom grid table you can override
|
||||||
@@ -670,7 +670,7 @@ your own labels.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetColMinimalAcceptableWidth}\label{wxgridgetcolminimalacceptablewidth}
|
\membersection{wxGrid::GetColMinimalAcceptableWidth}\label{wxgridgetcolminimalacceptablewidth}
|
||||||
|
|
||||||
\func{int}{GetColMinimalAcceptableWidth}{}
|
\constfunc{int}{GetColMinimalAcceptableWidth}{}
|
||||||
|
|
||||||
This returns the value of the lowest column width that can be handled correctly. See
|
This returns the value of the lowest column width that can be handled correctly. See
|
||||||
member \helpref{SetColMinimalAcceptableWidth}{wxgridsetcolminimalacceptablewidth} for details.
|
member \helpref{SetColMinimalAcceptableWidth}{wxgridsetcolminimalacceptablewidth} for details.
|
||||||
@@ -701,7 +701,7 @@ Returns the position of the specified column.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetColSize}\label{wxgridgetcolsize}
|
\membersection{wxGrid::GetColSize}\label{wxgridgetcolsize}
|
||||||
|
|
||||||
\func{int}{GetColSize}{\param{int }{col}}
|
\constfunc{int}{GetColSize}{\param{int }{col}}
|
||||||
|
|
||||||
Returns the width of the specified column.
|
Returns the width of the specified column.
|
||||||
|
|
||||||
@@ -709,7 +709,7 @@ Returns the width of the specified column.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetDefaultCellAlignment}\label{wxgridgetdefaultcellalignment}
|
\membersection{wxGrid::GetDefaultCellAlignment}\label{wxgridgetdefaultcellalignment}
|
||||||
|
|
||||||
\func{void}{GetDefaultCellAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
|
\constfunc{void}{GetDefaultCellAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
|
||||||
|
|
||||||
Sets the arguments to the current default horizontal and vertical text alignment
|
Sets the arguments to the current default horizontal and vertical text alignment
|
||||||
values.
|
values.
|
||||||
@@ -721,7 +721,7 @@ Vertical alignment will be one of wxALIGN\_TOP, wxALIGN\_CENTRE or wxALIGN\_BOTT
|
|||||||
|
|
||||||
\membersection{wxGrid::GetDefaultCellBackgroundColour}\label{wxgridgetdefaultcellbackgroundcolour}
|
\membersection{wxGrid::GetDefaultCellBackgroundColour}\label{wxgridgetdefaultcellbackgroundcolour}
|
||||||
|
|
||||||
\func{wxColour}{GetDefaultCellBackgroundColour}{\void}
|
\constfunc{wxColour}{GetDefaultCellBackgroundColour}{\void}
|
||||||
|
|
||||||
Returns the current default background colour for grid cells.
|
Returns the current default background colour for grid cells.
|
||||||
|
|
||||||
@@ -729,7 +729,7 @@ Returns the current default background colour for grid cells.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetDefaultCellFont}\label{wxgridgetdefaultcellfont}
|
\membersection{wxGrid::GetDefaultCellFont}\label{wxgridgetdefaultcellfont}
|
||||||
|
|
||||||
\func{wxFont}{GetDefaultCellFont}{\void}
|
\constfunc{wxFont}{GetDefaultCellFont}{\void}
|
||||||
|
|
||||||
Returns the current default font for grid cell text.
|
Returns the current default font for grid cell text.
|
||||||
|
|
||||||
@@ -737,7 +737,7 @@ Returns the current default font for grid cell text.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetDefaultCellTextColour}\label{wxgridgetdefaultcelltextcolour}
|
\membersection{wxGrid::GetDefaultCellTextColour}\label{wxgridgetdefaultcelltextcolour}
|
||||||
|
|
||||||
\func{wxColour}{GetDefaultCellTextColour}{\void}
|
\constfunc{wxColour}{GetDefaultCellTextColour}{\void}
|
||||||
|
|
||||||
Returns the current default colour for grid cell text.
|
Returns the current default colour for grid cell text.
|
||||||
|
|
||||||
@@ -745,7 +745,7 @@ Returns the current default colour for grid cell text.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetDefaultColLabelSize}\label{wxgridgetdefaultcollabelsize}
|
\membersection{wxGrid::GetDefaultColLabelSize}\label{wxgridgetdefaultcollabelsize}
|
||||||
|
|
||||||
\func{int}{GetDefaultColLabelSize}{\void}
|
\constfunc{int}{GetDefaultColLabelSize}{\void}
|
||||||
|
|
||||||
Returns the default height for column labels.
|
Returns the default height for column labels.
|
||||||
|
|
||||||
@@ -753,7 +753,7 @@ Returns the default height for column labels.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetDefaultColSize}\label{wxgridgetdefaultcolsize}
|
\membersection{wxGrid::GetDefaultColSize}\label{wxgridgetdefaultcolsize}
|
||||||
|
|
||||||
\func{int}{GetDefaultColSize}{\void}
|
\constfunc{int}{GetDefaultColSize}{\void}
|
||||||
|
|
||||||
Returns the current default width for grid columns.
|
Returns the current default width for grid columns.
|
||||||
|
|
||||||
@@ -809,7 +809,7 @@ the \helpref{wxGrid overview}{gridoverview} for more information about cell edit
|
|||||||
|
|
||||||
\membersection{wxGrid::GetDefaultRowLabelSize}\label{wxgridgetdefaultrowlabelsize}
|
\membersection{wxGrid::GetDefaultRowLabelSize}\label{wxgridgetdefaultrowlabelsize}
|
||||||
|
|
||||||
\func{int}{GetDefaultRowLabelSize}{\void}
|
\constfunc{int}{GetDefaultRowLabelSize}{\void}
|
||||||
|
|
||||||
Returns the default width for the row labels.
|
Returns the default width for the row labels.
|
||||||
|
|
||||||
@@ -817,7 +817,7 @@ Returns the default width for the row labels.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetDefaultRowSize}\label{wxgridgetdefaultrowsize}
|
\membersection{wxGrid::GetDefaultRowSize}\label{wxgridgetdefaultrowsize}
|
||||||
|
|
||||||
\func{int}{GetDefaultRowSize}{\void}
|
\constfunc{int}{GetDefaultRowSize}{\void}
|
||||||
|
|
||||||
Returns the current default height for grid rows.
|
Returns the current default height for grid rows.
|
||||||
|
|
||||||
@@ -825,7 +825,7 @@ Returns the current default height for grid rows.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetGridCursorCol}\label{wxgridgetgridcursorcol}
|
\membersection{wxGrid::GetGridCursorCol}\label{wxgridgetgridcursorcol}
|
||||||
|
|
||||||
\func{int}{GetGridCursorCol}{\void}
|
\constfunc{int}{GetGridCursorCol}{\void}
|
||||||
|
|
||||||
Returns the current grid cell column position.
|
Returns the current grid cell column position.
|
||||||
|
|
||||||
@@ -833,7 +833,7 @@ Returns the current grid cell column position.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetGridCursorRow}\label{wxgridgetgridcursorrow}
|
\membersection{wxGrid::GetGridCursorRow}\label{wxgridgetgridcursorrow}
|
||||||
|
|
||||||
\func{int}{GetGridCursorRow}{\void}
|
\constfunc{int}{GetGridCursorRow}{\void}
|
||||||
|
|
||||||
Returns the current grid cell row position.
|
Returns the current grid cell row position.
|
||||||
|
|
||||||
@@ -841,7 +841,7 @@ Returns the current grid cell row position.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetGridLineColour}\label{wxgridgetgridlinecolour}
|
\membersection{wxGrid::GetGridLineColour}\label{wxgridgetgridlinecolour}
|
||||||
|
|
||||||
\func{wxColour}{GetGridLineColour}{\void}
|
\constfunc{wxColour}{GetGridLineColour}{\void}
|
||||||
|
|
||||||
Returns the colour used for grid lines.
|
Returns the colour used for grid lines.
|
||||||
|
|
||||||
@@ -905,7 +905,7 @@ See \helpref{GetRowGridLinePen()}{wxgridgetrowgridlinepen} for an example.
|
|||||||
|
|
||||||
\membersection{wxGrid::GridLinesEnabled}\label{wxgridgridlinesenabled}
|
\membersection{wxGrid::GridLinesEnabled}\label{wxgridgridlinesenabled}
|
||||||
|
|
||||||
\func{bool}{GridLinesEnabled}{\void}
|
\constfunc{bool}{GridLinesEnabled}{\void}
|
||||||
|
|
||||||
Returns true if drawing of grid lines is turned on, false otherwise.
|
Returns true if drawing of grid lines is turned on, false otherwise.
|
||||||
|
|
||||||
@@ -913,7 +913,7 @@ Returns true if drawing of grid lines is turned on, false otherwise.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetLabelBackgroundColour}\label{wxgridgetlabelbackgroundcolour}
|
\membersection{wxGrid::GetLabelBackgroundColour}\label{wxgridgetlabelbackgroundcolour}
|
||||||
|
|
||||||
\func{wxColour}{GetLabelBackgroundColour}{\void}
|
\constfunc{wxColour}{GetLabelBackgroundColour}{\void}
|
||||||
|
|
||||||
Returns the colour used for the background of row and column labels.
|
Returns the colour used for the background of row and column labels.
|
||||||
|
|
||||||
@@ -921,7 +921,7 @@ Returns the colour used for the background of row and column labels.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetLabelFont}\label{wxgridgetlabelfont}
|
\membersection{wxGrid::GetLabelFont}\label{wxgridgetlabelfont}
|
||||||
|
|
||||||
\func{wxFont}{GetLabelFont}{\void}
|
\constfunc{wxFont}{GetLabelFont}{\void}
|
||||||
|
|
||||||
Returns the font used for row and column labels.
|
Returns the font used for row and column labels.
|
||||||
|
|
||||||
@@ -929,7 +929,7 @@ Returns the font used for row and column labels.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetLabelTextColour}\label{wxgridgetlabeltextcolour}
|
\membersection{wxGrid::GetLabelTextColour}\label{wxgridgetlabeltextcolour}
|
||||||
|
|
||||||
\func{wxColour}{GetLabelTextColour}{\void}
|
\constfunc{wxColour}{GetLabelTextColour}{\void}
|
||||||
|
|
||||||
Returns the colour used for row and column label text.
|
Returns the colour used for row and column label text.
|
||||||
|
|
||||||
@@ -937,7 +937,7 @@ Returns the colour used for row and column label text.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetNumberCols}\label{wxgridgetnumbercols}
|
\membersection{wxGrid::GetNumberCols}\label{wxgridgetnumbercols}
|
||||||
|
|
||||||
\func{int}{GetNumberCols}{\void}
|
\constfunc{int}{GetNumberCols}{\void}
|
||||||
|
|
||||||
Returns the total number of grid columns (actually the number of columns in the underlying grid
|
Returns the total number of grid columns (actually the number of columns in the underlying grid
|
||||||
table).
|
table).
|
||||||
@@ -946,7 +946,7 @@ table).
|
|||||||
|
|
||||||
\membersection{wxGrid::GetNumberRows}\label{wxgridgetnumberrows}
|
\membersection{wxGrid::GetNumberRows}\label{wxgridgetnumberrows}
|
||||||
|
|
||||||
\func{int}{GetNumberRows}{\void}
|
\constfunc{int}{GetNumberRows}{\void}
|
||||||
|
|
||||||
Returns the total number of grid rows (actually the number of rows in the underlying grid table).
|
Returns the total number of grid rows (actually the number of rows in the underlying grid table).
|
||||||
|
|
||||||
@@ -960,7 +960,7 @@ Returns the total number of grid rows (actually the number of rows in the underl
|
|||||||
|
|
||||||
\membersection{wxGrid::GetRowMinimalAcceptableHeight}\label{wxgridgetrowminimalacceptableheight}
|
\membersection{wxGrid::GetRowMinimalAcceptableHeight}\label{wxgridgetrowminimalacceptableheight}
|
||||||
|
|
||||||
\func{int}{GetRowMinimalAcceptableHeight}{}
|
\constfunc{int}{GetRowMinimalAcceptableHeight}{}
|
||||||
|
|
||||||
This returns the value of the lowest row width that can be handled correctly. See
|
This returns the value of the lowest row width that can be handled correctly. See
|
||||||
member \helpref{SetRowMinimalAcceptableHeight}{wxgridsetrowminimalacceptableheight} for details.
|
member \helpref{SetRowMinimalAcceptableHeight}{wxgridsetrowminimalacceptableheight} for details.
|
||||||
@@ -975,7 +975,7 @@ member \helpref{SetRowMinimalAcceptableHeight}{wxgridsetrowminimalacceptableheig
|
|||||||
|
|
||||||
\membersection{wxGrid::GetRowLabelAlignment}\label{wxgridgetrowlabelalignment}
|
\membersection{wxGrid::GetRowLabelAlignment}\label{wxgridgetrowlabelalignment}
|
||||||
|
|
||||||
\func{void}{GetRowLabelAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
|
\constfunc{void}{GetRowLabelAlignment}{\param{int* }{horiz}, \param{int* }{vert}}
|
||||||
|
|
||||||
Sets the arguments to the current row label alignment values.
|
Sets the arguments to the current row label alignment values.
|
||||||
|
|
||||||
@@ -989,7 +989,7 @@ returns a 2-element list {\tt ( horiz, vert )}.}
|
|||||||
|
|
||||||
\membersection{wxGrid::GetRowLabelSize}\label{wxgridgetrowlabelsize}
|
\membersection{wxGrid::GetRowLabelSize}\label{wxgridgetrowlabelsize}
|
||||||
|
|
||||||
\func{int}{GetRowLabelSize}{\void}
|
\constfunc{int}{GetRowLabelSize}{\void}
|
||||||
|
|
||||||
Returns the current width of the row labels.
|
Returns the current width of the row labels.
|
||||||
|
|
||||||
@@ -997,7 +997,7 @@ Returns the current width of the row labels.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetRowLabelValue}\label{wxgridgetrowlabelvalue}
|
\membersection{wxGrid::GetRowLabelValue}\label{wxgridgetrowlabelvalue}
|
||||||
|
|
||||||
\func{wxString}{GetRowLabelValue}{\param{int }{row}}
|
\constfunc{wxString}{GetRowLabelValue}{\param{int }{row}}
|
||||||
|
|
||||||
Returns the specified 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
|
If you are using a custom grid table you can override
|
||||||
@@ -1008,7 +1008,7 @@ your own labels.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetRowSize}\label{wxgridgetrowsize}
|
\membersection{wxGrid::GetRowSize}\label{wxgridgetrowsize}
|
||||||
|
|
||||||
\func{int}{GetRowSize}{\param{int }{row}}
|
\constfunc{int}{GetRowSize}{\param{int }{row}}
|
||||||
|
|
||||||
Returns the height of the specified row.
|
Returns the height of the specified row.
|
||||||
|
|
||||||
@@ -1116,7 +1116,7 @@ Returns a base pointer to the current table object.
|
|||||||
|
|
||||||
\membersection{wxGrid::GetViewWidth}\label{wxgridgetviewwidth}
|
\membersection{wxGrid::GetViewWidth}\label{wxgridgetviewwidth}
|
||||||
|
|
||||||
\func{int}{GetViewWidth}{\void}
|
\constfunc{int}{GetViewWidth}{\void}
|
||||||
|
|
||||||
Returned number of whole cols visible.
|
Returned number of whole cols visible.
|
||||||
|
|
||||||
@@ -1206,7 +1206,7 @@ Returns true if the current cell has been set to read-only
|
|||||||
|
|
||||||
\membersection{wxGrid::IsEditable}\label{wxgridiseditable}
|
\membersection{wxGrid::IsEditable}\label{wxgridiseditable}
|
||||||
|
|
||||||
\func{bool}{IsEditable}{\void}
|
\constfunc{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
|
See \helpref{wxGrid::EnableEditing}{wxgridenableediting} for more information about
|
||||||
@@ -1235,7 +1235,7 @@ See also \helpref{wxGrid::IsReadOnly}{wxgridisreadonly}.
|
|||||||
|
|
||||||
\membersection{wxGrid::IsSelection}\label{wxgridisselection}
|
\membersection{wxGrid::IsSelection}\label{wxgridisselection}
|
||||||
|
|
||||||
\func{bool}{IsSelection}{\void}
|
\constfunc{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.
|
||||||
|
|
||||||
@@ -1243,9 +1243,9 @@ Returns true if there are currently rows, columns or blocks of cells selected.
|
|||||||
|
|
||||||
\membersection{wxGrid::IsVisible}\label{wxgridisvisible}
|
\membersection{wxGrid::IsVisible}\label{wxgridisvisible}
|
||||||
|
|
||||||
\func{bool}{IsVisible}{\param{int }{row}, \param{int }{col}, \param{bool }{wholeCellVisible = true}}
|
\constfunc{bool}{IsVisible}{\param{int }{row}, \param{int }{col}, \param{bool }{wholeCellVisible = true}}
|
||||||
|
|
||||||
\func{bool}{IsVisible}{\param{const wxGridCellCoords\& }{coords}, \param{bool }{wholeCellVisible = true}}
|
\constfunc{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.
|
visible in the grid window.
|
||||||
@@ -1438,7 +1438,7 @@ deselected; if true the column will be added to the existing selection.
|
|||||||
|
|
||||||
\membersection{wxGrid::SelectionToDeviceRect}\label{wxgridselectiontodevicerect}
|
\membersection{wxGrid::SelectionToDeviceRect}\label{wxgridselectiontodevicerect}
|
||||||
|
|
||||||
\func{wxRect}{SelectionToDeviceRect}{\void}
|
\constfunc{wxRect}{SelectionToDeviceRect}{\void}
|
||||||
|
|
||||||
This function returns the rectangle that encloses the selected cells
|
This function returns the rectangle that encloses the selected cells
|
||||||
in device coords and clipped to the client size of the grid window.
|
in device coords and clipped to the client size of the grid window.
|
||||||
@@ -1982,7 +1982,7 @@ Displays the in-place cell edit control for the current cell.
|
|||||||
|
|
||||||
\membersection{wxGrid::XToCol}\label{wxgridxtocol}
|
\membersection{wxGrid::XToCol}\label{wxgridxtocol}
|
||||||
|
|
||||||
\func{int}{XToCol}{\param{int }{x}, \param{bool }{clipToMinMax = false}}
|
\constfunc{int}{XToCol}{\param{int }{x}, \param{bool }{clipToMinMax = false}}
|
||||||
|
|
||||||
\wxheading{Parameters}
|
\wxheading{Parameters}
|
||||||
\docparam{x}{The x position to evaluate.}
|
\docparam{x}{The x position to evaluate.}
|
||||||
@@ -1996,7 +1996,7 @@ The grid column that corresponds to the logical x coordinate. Returns
|
|||||||
|
|
||||||
\membersection{wxGrid::XToEdgeOfCol}\label{wxgridxtoedgeofcol}
|
\membersection{wxGrid::XToEdgeOfCol}\label{wxgridxtoedgeofcol}
|
||||||
|
|
||||||
\func{int}{XToEdgeOfCol}{\param{int }{x}}
|
\constfunc{int}{XToEdgeOfCol}{\param{int }{x}}
|
||||||
|
|
||||||
Returns the column whose right hand edge is close to the given logical x position.
|
Returns the column whose right hand edge is close to the given logical x position.
|
||||||
If no column edge is near to this position {\tt wxNOT\_FOUND} is returned.
|
If no column edge is near to this position {\tt wxNOT\_FOUND} is returned.
|
||||||
@@ -2005,7 +2005,7 @@ If no column edge is near to this position {\tt wxNOT\_FOUND} is returned.
|
|||||||
|
|
||||||
\membersection{wxGrid::YToEdgeOfRow}\label{wxgridytoedgeofrow}
|
\membersection{wxGrid::YToEdgeOfRow}\label{wxgridytoedgeofrow}
|
||||||
|
|
||||||
\func{int}{YToEdgeOfRow}{\param{int }{y}}
|
\constfunc{int}{YToEdgeOfRow}{\param{int }{y}}
|
||||||
|
|
||||||
Returns the row whose bottom edge is close to the given logical y position.
|
Returns the row whose bottom edge is close to the given logical y position.
|
||||||
If no row edge is near to this position {\tt wxNOT\_FOUND} is returned.
|
If no row edge is near to this position {\tt wxNOT\_FOUND} is returned.
|
||||||
@@ -2014,7 +2014,7 @@ If no row edge is near to this position {\tt wxNOT\_FOUND} is returned.
|
|||||||
|
|
||||||
\membersection{wxGrid::YToRow}\label{wxgridytorow}
|
\membersection{wxGrid::YToRow}\label{wxgridytorow}
|
||||||
|
|
||||||
\func{int}{YToRow}{\param{int }{y}}
|
\constfunc{int}{YToRow}{\param{int }{y}}
|
||||||
|
|
||||||
Returns the grid row that corresponds to the logical y coordinate. Returns
|
Returns the grid row that corresponds to the logical y coordinate. Returns
|
||||||
{\tt wxNOT\_FOUND} if there is no row at the y position.
|
{\tt wxNOT\_FOUND} if there is no row at the y position.
|
||||||
|
@@ -705,8 +705,8 @@ public:
|
|||||||
void GetSize(int *num_rows, int *num_cols) const;
|
void GetSize(int *num_rows, int *num_cols) const;
|
||||||
bool GetOverflow() const
|
bool GetOverflow() const
|
||||||
{ return m_overflow != SingleCell; }
|
{ return m_overflow != SingleCell; }
|
||||||
wxGridCellRenderer *GetRenderer(wxGrid* grid, int row, int col) const;
|
wxGridCellRenderer *GetRenderer(const wxGrid* grid, int row, int col) const;
|
||||||
wxGridCellEditor *GetEditor(wxGrid* grid, int row, int col) const;
|
wxGridCellEditor *GetEditor(const wxGrid* grid, int row, int col) const;
|
||||||
|
|
||||||
bool IsReadOnly() const { return m_isReadOnly == wxGridCellAttr::ReadOnly; }
|
bool IsReadOnly() const { return m_isReadOnly == wxGridCellAttr::ReadOnly; }
|
||||||
|
|
||||||
@@ -1107,16 +1107,16 @@ public:
|
|||||||
|
|
||||||
// ------ grid dimensions
|
// ------ grid dimensions
|
||||||
//
|
//
|
||||||
int GetNumberRows() { return m_numRows; }
|
int GetNumberRows() const { return m_numRows; }
|
||||||
int GetNumberCols() { return m_numCols; }
|
int GetNumberCols() const { return m_numCols; }
|
||||||
|
|
||||||
|
|
||||||
// ------ display update functions
|
// ------ display update functions
|
||||||
//
|
//
|
||||||
wxArrayInt CalcRowLabelsExposed( const wxRegion& reg );
|
wxArrayInt CalcRowLabelsExposed( const wxRegion& reg ) const;
|
||||||
|
|
||||||
wxArrayInt CalcColLabelsExposed( const wxRegion& reg );
|
wxArrayInt CalcColLabelsExposed( const wxRegion& reg ) const;
|
||||||
wxGridCellCoordsArray CalcCellsExposed( const wxRegion& reg );
|
wxGridCellCoordsArray CalcCellsExposed( const wxRegion& reg ) const;
|
||||||
|
|
||||||
|
|
||||||
// ------ event handlers
|
// ------ event handlers
|
||||||
@@ -1175,14 +1175,14 @@ public:
|
|||||||
int textOrientation = wxHORIZONTAL );
|
int textOrientation = wxHORIZONTAL );
|
||||||
|
|
||||||
|
|
||||||
// Split a string containing newline chararcters into an array of
|
// Split a string containing newline characters into an array of
|
||||||
// strings and return the number of lines
|
// strings and return the number of lines
|
||||||
//
|
//
|
||||||
void StringToLines( const wxString& value, wxArrayString& lines );
|
void StringToLines( const wxString& value, wxArrayString& lines ) const;
|
||||||
|
|
||||||
void GetTextBoxSize( const wxDC& dc,
|
void GetTextBoxSize( const wxDC& dc,
|
||||||
const wxArrayString& lines,
|
const wxArrayString& lines,
|
||||||
long *width, long *height );
|
long *width, long *height ) const;
|
||||||
|
|
||||||
|
|
||||||
// ------
|
// ------
|
||||||
@@ -1231,25 +1231,25 @@ public:
|
|||||||
// grid cells and labels so you will need to convert from device
|
// grid cells and labels so you will need to convert from device
|
||||||
// coordinates for mouse events etc.
|
// coordinates for mouse events etc.
|
||||||
//
|
//
|
||||||
void XYToCell( int x, int y, wxGridCellCoords& );
|
void XYToCell( int x, int y, wxGridCellCoords& ) const;
|
||||||
int YToRow( int y );
|
int YToRow( int y ) const;
|
||||||
int XToCol( int x, bool clipToMinMax = false );
|
int XToCol( int x, bool clipToMinMax = false ) const;
|
||||||
|
|
||||||
int YToEdgeOfRow( int y );
|
int YToEdgeOfRow( int y ) const;
|
||||||
int XToEdgeOfCol( int x );
|
int XToEdgeOfCol( int x ) const;
|
||||||
|
|
||||||
wxRect CellToRect( int row, int col );
|
wxRect CellToRect( int row, int col ) const;
|
||||||
wxRect CellToRect( const wxGridCellCoords& coords )
|
wxRect CellToRect( const wxGridCellCoords& coords ) const
|
||||||
{ return CellToRect( coords.GetRow(), coords.GetCol() ); }
|
{ return CellToRect( coords.GetRow(), coords.GetCol() ); }
|
||||||
|
|
||||||
int GetGridCursorRow() { return m_currentCellCoords.GetRow(); }
|
int GetGridCursorRow() const { return m_currentCellCoords.GetRow(); }
|
||||||
int GetGridCursorCol() { return m_currentCellCoords.GetCol(); }
|
int GetGridCursorCol() const { return m_currentCellCoords.GetCol(); }
|
||||||
|
|
||||||
// check to see if a cell is either wholly visible (the default arg) or
|
// check to see if a cell is either wholly visible (the default arg) or
|
||||||
// at least partially visible in the grid window
|
// at least partially visible in the grid window
|
||||||
//
|
//
|
||||||
bool IsVisible( int row, int col, bool wholeCellVisible = true );
|
bool IsVisible( int row, int col, bool wholeCellVisible = true ) const;
|
||||||
bool IsVisible( const wxGridCellCoords& coords, bool wholeCellVisible = true )
|
bool IsVisible( const wxGridCellCoords& coords, bool wholeCellVisible = true ) const
|
||||||
{ return IsVisible( coords.GetRow(), coords.GetCol(), wholeCellVisible ); }
|
{ return IsVisible( coords.GetRow(), coords.GetCol(), wholeCellVisible ); }
|
||||||
void MakeCellVisible( int row, int col );
|
void MakeCellVisible( int row, int col );
|
||||||
void MakeCellVisible( const wxGridCellCoords& coords )
|
void MakeCellVisible( const wxGridCellCoords& coords )
|
||||||
@@ -1275,28 +1275,28 @@ public:
|
|||||||
|
|
||||||
// ------ label and gridline formatting
|
// ------ label and gridline formatting
|
||||||
//
|
//
|
||||||
int GetDefaultRowLabelSize() { return WXGRID_DEFAULT_ROW_LABEL_WIDTH; }
|
int GetDefaultRowLabelSize() const { return WXGRID_DEFAULT_ROW_LABEL_WIDTH; }
|
||||||
int GetRowLabelSize() { return m_rowLabelWidth; }
|
int GetRowLabelSize() const { return m_rowLabelWidth; }
|
||||||
int GetDefaultColLabelSize() { return WXGRID_DEFAULT_COL_LABEL_HEIGHT; }
|
int GetDefaultColLabelSize() const { return WXGRID_DEFAULT_COL_LABEL_HEIGHT; }
|
||||||
int GetColLabelSize() { return m_colLabelHeight; }
|
int GetColLabelSize() const { return m_colLabelHeight; }
|
||||||
wxColour GetLabelBackgroundColour() { return m_labelBackgroundColour; }
|
wxColour GetLabelBackgroundColour() const { return m_labelBackgroundColour; }
|
||||||
wxColour GetLabelTextColour() { return m_labelTextColour; }
|
wxColour GetLabelTextColour() const { return m_labelTextColour; }
|
||||||
wxFont GetLabelFont() { return m_labelFont; }
|
wxFont GetLabelFont() const { return m_labelFont; }
|
||||||
void GetRowLabelAlignment( int *horiz, int *vert );
|
void GetRowLabelAlignment( int *horiz, int *vert ) const;
|
||||||
void GetColLabelAlignment( int *horiz, int *vert );
|
void GetColLabelAlignment( int *horiz, int *vert ) const;
|
||||||
int GetColLabelTextOrientation();
|
int GetColLabelTextOrientation() const;
|
||||||
wxString GetRowLabelValue( int row );
|
wxString GetRowLabelValue( int row ) const;
|
||||||
wxString GetColLabelValue( int col );
|
wxString GetColLabelValue( int col ) const;
|
||||||
wxColour GetGridLineColour() { return m_gridLineColour; }
|
wxColour GetGridLineColour() const { return m_gridLineColour; }
|
||||||
|
|
||||||
// these methods may be overridden to customize individual grid lines
|
// these methods may be overridden to customize individual grid lines
|
||||||
// appearance
|
// appearance
|
||||||
virtual wxPen GetDefaultGridLinePen();
|
virtual wxPen GetDefaultGridLinePen();
|
||||||
virtual wxPen GetRowGridLinePen(int row);
|
virtual wxPen GetRowGridLinePen(int row);
|
||||||
virtual wxPen GetColGridLinePen(int col);
|
virtual wxPen GetColGridLinePen(int col);
|
||||||
wxColour GetCellHighlightColour() { return m_cellHighlightColour; }
|
wxColour GetCellHighlightColour() const { return m_cellHighlightColour; }
|
||||||
int GetCellHighlightPenWidth() { return m_cellHighlightPenWidth; }
|
int GetCellHighlightPenWidth() const { return m_cellHighlightPenWidth; }
|
||||||
int GetCellHighlightROPenWidth() { return m_cellHighlightROPenWidth; }
|
int GetCellHighlightROPenWidth() const { return m_cellHighlightROPenWidth; }
|
||||||
|
|
||||||
void SetRowLabelSize( int width );
|
void SetRowLabelSize( int width );
|
||||||
void SetColLabelSize( int height );
|
void SetColLabelSize( int height );
|
||||||
@@ -1315,20 +1315,20 @@ public:
|
|||||||
|
|
||||||
void EnableDragRowSize( bool enable = true );
|
void EnableDragRowSize( bool enable = true );
|
||||||
void DisableDragRowSize() { EnableDragRowSize( false ); }
|
void DisableDragRowSize() { EnableDragRowSize( false ); }
|
||||||
bool CanDragRowSize() { return m_canDragRowSize; }
|
bool CanDragRowSize() const { return m_canDragRowSize; }
|
||||||
void EnableDragColSize( bool enable = true );
|
void EnableDragColSize( bool enable = true );
|
||||||
void DisableDragColSize() { EnableDragColSize( false ); }
|
void DisableDragColSize() { EnableDragColSize( false ); }
|
||||||
bool CanDragColSize() { return m_canDragColSize; }
|
bool CanDragColSize() const { return m_canDragColSize; }
|
||||||
void EnableDragColMove( bool enable = true );
|
void EnableDragColMove( bool enable = true );
|
||||||
void DisableDragColMove() { EnableDragColMove( false ); }
|
void DisableDragColMove() { EnableDragColMove( false ); }
|
||||||
bool CanDragColMove() { return m_canDragColMove; }
|
bool CanDragColMove() const { return m_canDragColMove; }
|
||||||
void EnableDragGridSize(bool enable = true);
|
void EnableDragGridSize(bool enable = true);
|
||||||
void DisableDragGridSize() { EnableDragGridSize(false); }
|
void DisableDragGridSize() { EnableDragGridSize(false); }
|
||||||
bool CanDragGridSize() { return m_canDragGridSize; }
|
bool CanDragGridSize() const { return m_canDragGridSize; }
|
||||||
|
|
||||||
void EnableDragCell( bool enable = true );
|
void EnableDragCell( bool enable = true );
|
||||||
void DisableDragCell() { EnableDragCell( false ); }
|
void DisableDragCell() { EnableDragCell( false ); }
|
||||||
bool CanDragCell() { return m_canDragCell; }
|
bool CanDragCell() const { return m_canDragCell; }
|
||||||
|
|
||||||
// this sets the specified attribute for this cell or in this row/col
|
// this sets the specified attribute for this cell or in this row/col
|
||||||
void SetAttr(int row, int col, wxGridCellAttr *attr);
|
void SetAttr(int row, int col, wxGridCellAttr *attr);
|
||||||
@@ -1351,25 +1351,25 @@ public:
|
|||||||
void SetColFormatCustom(int col, const wxString& typeName);
|
void SetColFormatCustom(int col, const wxString& typeName);
|
||||||
|
|
||||||
void EnableGridLines( bool enable = true );
|
void EnableGridLines( bool enable = true );
|
||||||
bool GridLinesEnabled() { return m_gridLinesEnabled; }
|
bool GridLinesEnabled() const { return m_gridLinesEnabled; }
|
||||||
|
|
||||||
// ------ row and col formatting
|
// ------ row and col formatting
|
||||||
//
|
//
|
||||||
int GetDefaultRowSize();
|
int GetDefaultRowSize() const;
|
||||||
int GetRowSize( int row );
|
int GetRowSize( int row ) const;
|
||||||
int GetDefaultColSize();
|
int GetDefaultColSize() const;
|
||||||
int GetColSize( int col );
|
int GetColSize( int col ) const;
|
||||||
wxColour GetDefaultCellBackgroundColour();
|
wxColour GetDefaultCellBackgroundColour() const;
|
||||||
wxColour GetCellBackgroundColour( int row, int col );
|
wxColour GetCellBackgroundColour( int row, int col ) const;
|
||||||
wxColour GetDefaultCellTextColour();
|
wxColour GetDefaultCellTextColour() const;
|
||||||
wxColour GetCellTextColour( int row, int col );
|
wxColour GetCellTextColour( int row, int col ) const;
|
||||||
wxFont GetDefaultCellFont();
|
wxFont GetDefaultCellFont() const;
|
||||||
wxFont GetCellFont( int row, int col );
|
wxFont GetCellFont( int row, int col ) const;
|
||||||
void GetDefaultCellAlignment( int *horiz, int *vert );
|
void GetDefaultCellAlignment( int *horiz, int *vert ) const;
|
||||||
void GetCellAlignment( int row, int col, int *horiz, int *vert );
|
void GetCellAlignment( int row, int col, int *horiz, int *vert ) const;
|
||||||
bool GetDefaultCellOverflow();
|
bool GetDefaultCellOverflow() const;
|
||||||
bool GetCellOverflow( int row, int col );
|
bool GetCellOverflow( int row, int col ) const;
|
||||||
void GetCellSize( int row, int col, int *num_rows, int *num_cols );
|
void GetCellSize( int row, int col, int *num_rows, int *num_cols ) const;
|
||||||
|
|
||||||
void SetDefaultRowSize( int height, bool resizeExistingRows = false );
|
void SetDefaultRowSize( int height, bool resizeExistingRows = false );
|
||||||
void SetRowSize( int row, int height );
|
void SetRowSize( int row, int height );
|
||||||
@@ -1464,19 +1464,19 @@ public:
|
|||||||
void SetDefaultRenderer(wxGridCellRenderer *renderer);
|
void SetDefaultRenderer(wxGridCellRenderer *renderer);
|
||||||
void SetCellRenderer(int row, int col, wxGridCellRenderer *renderer);
|
void SetCellRenderer(int row, int col, wxGridCellRenderer *renderer);
|
||||||
wxGridCellRenderer *GetDefaultRenderer() const;
|
wxGridCellRenderer *GetDefaultRenderer() const;
|
||||||
wxGridCellRenderer* GetCellRenderer(int row, int col);
|
wxGridCellRenderer* GetCellRenderer(int row, int col) const;
|
||||||
|
|
||||||
// takes ownership of the pointer
|
// takes ownership of the pointer
|
||||||
void SetDefaultEditor(wxGridCellEditor *editor);
|
void SetDefaultEditor(wxGridCellEditor *editor);
|
||||||
void SetCellEditor(int row, int col, wxGridCellEditor *editor);
|
void SetCellEditor(int row, int col, wxGridCellEditor *editor);
|
||||||
wxGridCellEditor *GetDefaultEditor() const;
|
wxGridCellEditor *GetDefaultEditor() const;
|
||||||
wxGridCellEditor* GetCellEditor(int row, int col);
|
wxGridCellEditor* GetCellEditor(int row, int col) const;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ------ cell value accessors
|
// ------ cell value accessors
|
||||||
//
|
//
|
||||||
wxString GetCellValue( int row, int col )
|
wxString GetCellValue( int row, int col ) const
|
||||||
{
|
{
|
||||||
if ( m_table )
|
if ( m_table )
|
||||||
{
|
{
|
||||||
@@ -1488,7 +1488,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString GetCellValue( const wxGridCellCoords& coords )
|
wxString GetCellValue( const wxGridCellCoords& coords ) const
|
||||||
{ return GetCellValue( coords.GetRow(), coords.GetCol() ); }
|
{ return GetCellValue( coords.GetRow(), coords.GetCol() ); }
|
||||||
|
|
||||||
void SetCellValue( int row, int col, const wxString& s );
|
void SetCellValue( int row, int col, const wxString& s );
|
||||||
@@ -1518,7 +1518,7 @@ public:
|
|||||||
|
|
||||||
void SelectAll();
|
void SelectAll();
|
||||||
|
|
||||||
bool IsSelection();
|
bool IsSelection() const;
|
||||||
|
|
||||||
// ------ deselect blocks or cells
|
// ------ deselect blocks or cells
|
||||||
//
|
//
|
||||||
@@ -1544,7 +1544,7 @@ public:
|
|||||||
// to the client size of the grid window.
|
// to the client size of the grid window.
|
||||||
//
|
//
|
||||||
wxRect BlockToDeviceRect( const wxGridCellCoords & topLeft,
|
wxRect BlockToDeviceRect( const wxGridCellCoords & topLeft,
|
||||||
const wxGridCellCoords & bottomRight );
|
const wxGridCellCoords & bottomRight ) const;
|
||||||
|
|
||||||
// Access or update the selection fore/back colours
|
// Access or update the selection fore/back colours
|
||||||
wxColour GetSelectionBackground() const
|
wxColour GetSelectionBackground() const
|
||||||
@@ -1579,10 +1579,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Accessors for component windows
|
// Accessors for component windows
|
||||||
wxWindow* GetGridWindow() { return (wxWindow*)m_gridWin; }
|
wxWindow* GetGridWindow() const { return (wxWindow*)m_gridWin; }
|
||||||
wxWindow* GetGridRowLabelWindow() { return (wxWindow*)m_rowLabelWin; }
|
wxWindow* GetGridRowLabelWindow() const { return (wxWindow*)m_rowLabelWin; }
|
||||||
wxWindow* GetGridColLabelWindow() { return (wxWindow*)m_colLabelWin; }
|
wxWindow* GetGridColLabelWindow() const { return (wxWindow*)m_colLabelWin; }
|
||||||
wxWindow* GetGridCornerLabelWindow() { return (wxWindow*)m_cornerLabelWin; }
|
wxWindow* GetGridCornerLabelWindow() const { return (wxWindow*)m_cornerLabelWin; }
|
||||||
|
|
||||||
// Allow adjustment of scroll increment. The default is (15, 15).
|
// Allow adjustment of scroll increment. The default is (15, 15).
|
||||||
void SetScrollLineX(int x) { m_scrollLineX = x; }
|
void SetScrollLineX(int x) { m_scrollLineX = x; }
|
||||||
@@ -1631,13 +1631,13 @@ public:
|
|||||||
void UpdateDimensions()
|
void UpdateDimensions()
|
||||||
{ CalcDimensions(); }
|
{ CalcDimensions(); }
|
||||||
|
|
||||||
int GetRows() { return GetNumberRows(); }
|
int GetRows() const { return GetNumberRows(); }
|
||||||
int GetCols() { return GetNumberCols(); }
|
int GetCols() const { return GetNumberCols(); }
|
||||||
int GetCursorRow() { return GetGridCursorRow(); }
|
int GetCursorRow() const { return GetGridCursorRow(); }
|
||||||
int GetCursorColumn() { return GetGridCursorCol(); }
|
int GetCursorColumn() const { return GetGridCursorCol(); }
|
||||||
|
|
||||||
int GetScrollPosX() { return 0; }
|
int GetScrollPosX() const { return 0; }
|
||||||
int GetScrollPosY() { return 0; }
|
int GetScrollPosY() const { return 0; }
|
||||||
|
|
||||||
void SetScrollX( int WXUNUSED(x) ) { }
|
void SetScrollX( int WXUNUSED(x) ) { }
|
||||||
void SetScrollY( int WXUNUSED(y) ) { }
|
void SetScrollY( int WXUNUSED(y) ) { }
|
||||||
@@ -1645,7 +1645,7 @@ public:
|
|||||||
void SetColumnWidth( int col, int width )
|
void SetColumnWidth( int col, int width )
|
||||||
{ SetColSize( col, width ); }
|
{ SetColSize( col, width ); }
|
||||||
|
|
||||||
int GetColumnWidth( int col )
|
int GetColumnWidth( int col ) const
|
||||||
{ return GetColSize( col ); }
|
{ return GetColSize( col ); }
|
||||||
|
|
||||||
void SetRowHeight( int row, int height )
|
void SetRowHeight( int row, int height )
|
||||||
@@ -1653,10 +1653,10 @@ public:
|
|||||||
|
|
||||||
// GetRowHeight() is below
|
// GetRowHeight() is below
|
||||||
|
|
||||||
int GetViewHeight() // returned num whole rows visible
|
int GetViewHeight() const // returned num whole rows visible
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
|
||||||
int GetViewWidth() // returned num whole cols visible
|
int GetViewWidth() const // returned num whole cols visible
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
|
||||||
void SetLabelSize( int orientation, int sz )
|
void SetLabelSize( int orientation, int sz )
|
||||||
@@ -1667,7 +1667,7 @@ public:
|
|||||||
SetRowLabelSize( sz );
|
SetRowLabelSize( sz );
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetLabelSize( int orientation )
|
int GetLabelSize( int orientation ) const
|
||||||
{
|
{
|
||||||
if ( orientation == wxHORIZONTAL )
|
if ( orientation == wxHORIZONTAL )
|
||||||
return GetColLabelSize();
|
return GetColLabelSize();
|
||||||
@@ -1683,7 +1683,7 @@ public:
|
|||||||
SetRowLabelAlignment( align, -1 );
|
SetRowLabelAlignment( align, -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetLabelAlignment( int orientation, int WXUNUSED(align) )
|
int GetLabelAlignment( int orientation, int WXUNUSED(align) ) const
|
||||||
{
|
{
|
||||||
int h, v;
|
int h, v;
|
||||||
if ( orientation == wxHORIZONTAL )
|
if ( orientation == wxHORIZONTAL )
|
||||||
@@ -1706,7 +1706,7 @@ public:
|
|||||||
SetRowLabelValue( pos, val );
|
SetRowLabelValue( pos, val );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString GetLabelValue( int orientation, int pos)
|
wxString GetLabelValue( int orientation, int pos) const
|
||||||
{
|
{
|
||||||
if ( orientation == wxHORIZONTAL )
|
if ( orientation == wxHORIZONTAL )
|
||||||
return GetColLabelValue( pos );
|
return GetColLabelValue( pos );
|
||||||
@@ -1738,9 +1738,9 @@ public:
|
|||||||
void SetCellBackgroundColour(const wxColour& colour, int row, int col)
|
void SetCellBackgroundColour(const wxColour& colour, int row, int col)
|
||||||
{ SetCellBackgroundColour( row, col, colour ); }
|
{ SetCellBackgroundColour( row, col, colour ); }
|
||||||
|
|
||||||
bool GetEditable() { return IsEditable(); }
|
bool GetEditable() const { return IsEditable(); }
|
||||||
void SetEditable( bool edit = true ) { EnableEditing( edit ); }
|
void SetEditable( bool edit = true ) { EnableEditing( edit ); }
|
||||||
bool GetEditInPlace() { return IsCellEditControlEnabled(); }
|
bool GetEditInPlace() const { return IsCellEditControlEnabled(); }
|
||||||
|
|
||||||
void SetEditInPlace(bool WXUNUSED(edit) = true) { }
|
void SetEditInPlace(bool WXUNUSED(edit) = true) { }
|
||||||
|
|
||||||
@@ -1871,7 +1871,7 @@ protected:
|
|||||||
int GetRowMinimalHeight(int col) const;
|
int GetRowMinimalHeight(int col) const;
|
||||||
|
|
||||||
// do we have some place to store attributes in?
|
// do we have some place to store attributes in?
|
||||||
bool CanHaveAttributes();
|
bool CanHaveAttributes() const;
|
||||||
|
|
||||||
// cell attribute cache (currently we only cache 1, may be will do
|
// cell attribute cache (currently we only cache 1, may be will do
|
||||||
// more/better later)
|
// more/better later)
|
||||||
@@ -1893,7 +1893,7 @@ protected:
|
|||||||
// looks for the attr in cache, if not found asks the table and caches the
|
// looks for the attr in cache, if not found asks the table and caches the
|
||||||
// result
|
// result
|
||||||
wxGridCellAttr *GetCellAttr(int row, int col) const;
|
wxGridCellAttr *GetCellAttr(int row, int col) const;
|
||||||
wxGridCellAttr *GetCellAttr(const wxGridCellCoords& coords )
|
wxGridCellAttr *GetCellAttr(const wxGridCellCoords& coords ) const
|
||||||
{ return GetCellAttr( coords.GetRow(), coords.GetCol() ); }
|
{ return GetCellAttr( coords.GetRow(), coords.GetCol() ); }
|
||||||
|
|
||||||
// the default cell attr object for cells that don't have their own
|
// the default cell attr object for cells that don't have their own
|
||||||
|
@@ -2475,7 +2475,7 @@ void wxGridCellAttr::GetSize( int *num_rows, int *num_cols ) const
|
|||||||
// NULL (because the table has a type that the grid does not have in its
|
// NULL (because the table has a type that the grid does not have in its
|
||||||
// registry), then the grid's default editor or renderer is used.
|
// registry), then the grid's default editor or renderer is used.
|
||||||
|
|
||||||
wxGridCellRenderer* wxGridCellAttr::GetRenderer(wxGrid* grid, int row, int col) const
|
wxGridCellRenderer* wxGridCellAttr::GetRenderer(const wxGrid* grid, int row, int col) const
|
||||||
{
|
{
|
||||||
wxGridCellRenderer *renderer = NULL;
|
wxGridCellRenderer *renderer = NULL;
|
||||||
|
|
||||||
@@ -2519,7 +2519,7 @@ wxGridCellRenderer* wxGridCellAttr::GetRenderer(wxGrid* grid, int row, int col)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// same as above, except for s/renderer/editor/g
|
// same as above, except for s/renderer/editor/g
|
||||||
wxGridCellEditor* wxGridCellAttr::GetEditor(wxGrid* grid, int row, int col) const
|
wxGridCellEditor* wxGridCellAttr::GetEditor(const wxGrid* grid, int row, int col) const
|
||||||
{
|
{
|
||||||
wxGridCellEditor *editor = NULL;
|
wxGridCellEditor *editor = NULL;
|
||||||
|
|
||||||
@@ -5075,7 +5075,7 @@ bool wxGrid::Redimension( wxGridTableMessage& msg )
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxArrayInt wxGrid::CalcRowLabelsExposed( const wxRegion& reg )
|
wxArrayInt wxGrid::CalcRowLabelsExposed( const wxRegion& reg ) const
|
||||||
{
|
{
|
||||||
wxRegionIterator iter( reg );
|
wxRegionIterator iter( reg );
|
||||||
wxRect r;
|
wxRect r;
|
||||||
@@ -5126,7 +5126,7 @@ wxArrayInt wxGrid::CalcRowLabelsExposed( const wxRegion& reg )
|
|||||||
return rowlabels;
|
return rowlabels;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxArrayInt wxGrid::CalcColLabelsExposed( const wxRegion& reg )
|
wxArrayInt wxGrid::CalcColLabelsExposed( const wxRegion& reg ) const
|
||||||
{
|
{
|
||||||
wxRegionIterator iter( reg );
|
wxRegionIterator iter( reg );
|
||||||
wxRect r;
|
wxRect r;
|
||||||
@@ -5180,7 +5180,7 @@ wxArrayInt wxGrid::CalcColLabelsExposed( const wxRegion& reg )
|
|||||||
return colLabels;
|
return colLabels;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGridCellCoordsArray wxGrid::CalcCellsExposed( const wxRegion& reg )
|
wxGridCellCoordsArray wxGrid::CalcCellsExposed( const wxRegion& reg ) const
|
||||||
{
|
{
|
||||||
wxRegionIterator iter( reg );
|
wxRegionIterator iter( reg );
|
||||||
wxRect r;
|
wxRect r;
|
||||||
@@ -8122,7 +8122,7 @@ void wxGrid::DrawTextRectangle(wxDC& dc,
|
|||||||
// Split multi-line text up into an array of strings.
|
// Split multi-line text up into an array of strings.
|
||||||
// Any existing contents of the string array are preserved.
|
// Any existing contents of the string array are preserved.
|
||||||
//
|
//
|
||||||
void wxGrid::StringToLines( const wxString& value, wxArrayString& lines )
|
void wxGrid::StringToLines( const wxString& value, wxArrayString& lines ) const
|
||||||
{
|
{
|
||||||
int startPos = 0;
|
int startPos = 0;
|
||||||
int pos;
|
int pos;
|
||||||
@@ -8156,7 +8156,7 @@ void wxGrid::StringToLines( const wxString& value, wxArrayString& lines )
|
|||||||
|
|
||||||
void wxGrid::GetTextBoxSize( const wxDC& dc,
|
void wxGrid::GetTextBoxSize( const wxDC& dc,
|
||||||
const wxArrayString& lines,
|
const wxArrayString& lines,
|
||||||
long *width, long *height )
|
long *width, long *height ) const
|
||||||
{
|
{
|
||||||
long w = 0;
|
long w = 0;
|
||||||
long h = 0;
|
long h = 0;
|
||||||
@@ -8503,7 +8503,7 @@ void wxGrid::SaveEditControlValue()
|
|||||||
// coordinates for mouse events etc.
|
// coordinates for mouse events etc.
|
||||||
//
|
//
|
||||||
|
|
||||||
void wxGrid::XYToCell( int x, int y, wxGridCellCoords& coords )
|
void wxGrid::XYToCell( int x, int y, wxGridCellCoords& coords ) const
|
||||||
{
|
{
|
||||||
int row = YToRow(y);
|
int row = YToRow(y);
|
||||||
int col = XToCol(x);
|
int col = XToCol(x);
|
||||||
@@ -8585,19 +8585,18 @@ static int CoordToRowOrCol(int coord, int defaultDist, int minDist,
|
|||||||
return i_max;
|
return i_max;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxGrid::YToRow( int y )
|
int wxGrid::YToRow( int y ) const
|
||||||
{
|
{
|
||||||
return CoordToRowOrCol(y, m_defaultRowHeight,
|
return CoordToRowOrCol(y, m_defaultRowHeight,
|
||||||
m_minAcceptableRowHeight, m_rowBottoms, m_numRows, false);
|
m_minAcceptableRowHeight, m_rowBottoms, m_numRows, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxGrid::XToCol( int x, bool clipToMinMax )
|
int wxGrid::XToCol( int x, bool clipToMinMax ) const
|
||||||
{
|
{
|
||||||
if (x < 0)
|
if (x < 0)
|
||||||
return clipToMinMax && (m_numCols > 0) ? GetColAt( 0 ) : -1;
|
return clipToMinMax && (m_numCols > 0) ? GetColAt( 0 ) : -1;
|
||||||
|
|
||||||
if (!m_defaultColWidth)
|
wxASSERT_MSG(m_defaultColWidth > 0, wxT("Default column width can not be zero"));
|
||||||
m_defaultColWidth = 1;
|
|
||||||
|
|
||||||
int maxPos = x / m_defaultColWidth;
|
int maxPos = x / m_defaultColWidth;
|
||||||
int minPos = 0;
|
int minPos = 0;
|
||||||
@@ -8663,7 +8662,7 @@ int wxGrid::XToCol( int x, bool clipToMinMax )
|
|||||||
// (b) resizing rows/columns (the thing for which edge detection is
|
// (b) resizing rows/columns (the thing for which edge detection is
|
||||||
// relevant at all) is enabled.
|
// relevant at all) is enabled.
|
||||||
//
|
//
|
||||||
int wxGrid::YToEdgeOfRow( int y )
|
int wxGrid::YToEdgeOfRow( int y ) const
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
i = internalYToRow(y);
|
i = internalYToRow(y);
|
||||||
@@ -8685,7 +8684,7 @@ int wxGrid::YToEdgeOfRow( int y )
|
|||||||
// -1 if not near an edge
|
// -1 if not near an edge
|
||||||
// See comment at YToEdgeOfRow for conditions on edge detection.
|
// See comment at YToEdgeOfRow for conditions on edge detection.
|
||||||
//
|
//
|
||||||
int wxGrid::XToEdgeOfCol( int x )
|
int wxGrid::XToEdgeOfCol( int x ) const
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
i = internalXToCol(x);
|
i = internalXToCol(x);
|
||||||
@@ -8703,7 +8702,7 @@ int wxGrid::XToEdgeOfCol( int x )
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxRect wxGrid::CellToRect( int row, int col )
|
wxRect wxGrid::CellToRect( int row, int col ) const
|
||||||
{
|
{
|
||||||
wxRect rect( -1, -1, -1, -1 );
|
wxRect rect( -1, -1, -1, -1 );
|
||||||
|
|
||||||
@@ -8738,7 +8737,7 @@ wxRect wxGrid::CellToRect( int row, int col )
|
|||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGrid::IsVisible( int row, int col, bool wholeCellVisible )
|
bool wxGrid::IsVisible( int row, int col, bool wholeCellVisible ) const
|
||||||
{
|
{
|
||||||
// get the cell rectangle in logical coords
|
// get the cell rectangle in logical coords
|
||||||
//
|
//
|
||||||
@@ -9316,7 +9315,7 @@ bool wxGrid::MoveCursorRightBlock( bool expandSelection )
|
|||||||
// ------ Label values and formatting
|
// ------ Label values and formatting
|
||||||
//
|
//
|
||||||
|
|
||||||
void wxGrid::GetRowLabelAlignment( int *horiz, int *vert )
|
void wxGrid::GetRowLabelAlignment( int *horiz, int *vert ) const
|
||||||
{
|
{
|
||||||
if ( horiz )
|
if ( horiz )
|
||||||
*horiz = m_rowLabelHorizAlign;
|
*horiz = m_rowLabelHorizAlign;
|
||||||
@@ -9324,7 +9323,7 @@ void wxGrid::GetRowLabelAlignment( int *horiz, int *vert )
|
|||||||
*vert = m_rowLabelVertAlign;
|
*vert = m_rowLabelVertAlign;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGrid::GetColLabelAlignment( int *horiz, int *vert )
|
void wxGrid::GetColLabelAlignment( int *horiz, int *vert ) const
|
||||||
{
|
{
|
||||||
if ( horiz )
|
if ( horiz )
|
||||||
*horiz = m_colLabelHorizAlign;
|
*horiz = m_colLabelHorizAlign;
|
||||||
@@ -9332,12 +9331,12 @@ void wxGrid::GetColLabelAlignment( int *horiz, int *vert )
|
|||||||
*vert = m_colLabelVertAlign;
|
*vert = m_colLabelVertAlign;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxGrid::GetColLabelTextOrientation()
|
int wxGrid::GetColLabelTextOrientation() const
|
||||||
{
|
{
|
||||||
return m_colLabelTextOrientation;
|
return m_colLabelTextOrientation;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxGrid::GetRowLabelValue( int row )
|
wxString wxGrid::GetRowLabelValue( int row ) const
|
||||||
{
|
{
|
||||||
if ( m_table )
|
if ( m_table )
|
||||||
{
|
{
|
||||||
@@ -9351,7 +9350,7 @@ wxString wxGrid::GetRowLabelValue( int row )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxGrid::GetColLabelValue( int col )
|
wxString wxGrid::GetColLabelValue( int col ) const
|
||||||
{
|
{
|
||||||
if ( m_table )
|
if ( m_table )
|
||||||
{
|
{
|
||||||
@@ -9656,24 +9655,24 @@ void wxGrid::EnableGridLines( bool enable )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxGrid::GetDefaultRowSize()
|
int wxGrid::GetDefaultRowSize() const
|
||||||
{
|
{
|
||||||
return m_defaultRowHeight;
|
return m_defaultRowHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxGrid::GetRowSize( int row )
|
int wxGrid::GetRowSize( int row ) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( row >= 0 && row < m_numRows, 0, _T("invalid row index") );
|
wxCHECK_MSG( row >= 0 && row < m_numRows, 0, _T("invalid row index") );
|
||||||
|
|
||||||
return GetRowHeight(row);
|
return GetRowHeight(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxGrid::GetDefaultColSize()
|
int wxGrid::GetDefaultColSize() const
|
||||||
{
|
{
|
||||||
return m_defaultColWidth;
|
return m_defaultColWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxGrid::GetColSize( int col )
|
int wxGrid::GetColSize( int col ) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( col >= 0 && col < m_numCols, 0, _T("invalid column index") );
|
wxCHECK_MSG( col >= 0 && col < m_numCols, 0, _T("invalid column index") );
|
||||||
|
|
||||||
@@ -9737,30 +9736,30 @@ void wxGrid::SetDefaultEditor(wxGridCellEditor *editor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// access to the default attrbiutes
|
// access to the default attributes
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxColour wxGrid::GetDefaultCellBackgroundColour()
|
wxColour wxGrid::GetDefaultCellBackgroundColour() const
|
||||||
{
|
{
|
||||||
return m_defaultCellAttr->GetBackgroundColour();
|
return m_defaultCellAttr->GetBackgroundColour();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxColour wxGrid::GetDefaultCellTextColour()
|
wxColour wxGrid::GetDefaultCellTextColour() const
|
||||||
{
|
{
|
||||||
return m_defaultCellAttr->GetTextColour();
|
return m_defaultCellAttr->GetTextColour();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont wxGrid::GetDefaultCellFont()
|
wxFont wxGrid::GetDefaultCellFont() const
|
||||||
{
|
{
|
||||||
return m_defaultCellAttr->GetFont();
|
return m_defaultCellAttr->GetFont();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGrid::GetDefaultCellAlignment( int *horiz, int *vert )
|
void wxGrid::GetDefaultCellAlignment( int *horiz, int *vert ) const
|
||||||
{
|
{
|
||||||
m_defaultCellAttr->GetAlignment(horiz, vert);
|
m_defaultCellAttr->GetAlignment(horiz, vert);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGrid::GetDefaultCellOverflow()
|
bool wxGrid::GetDefaultCellOverflow() const
|
||||||
{
|
{
|
||||||
return m_defaultCellAttr->GetOverflow();
|
return m_defaultCellAttr->GetOverflow();
|
||||||
}
|
}
|
||||||
@@ -9779,7 +9778,7 @@ wxGridCellEditor *wxGrid::GetDefaultEditor() const
|
|||||||
// access to cell attributes
|
// access to cell attributes
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxColour wxGrid::GetCellBackgroundColour(int row, int col)
|
wxColour wxGrid::GetCellBackgroundColour(int row, int col) const
|
||||||
{
|
{
|
||||||
wxGridCellAttr *attr = GetCellAttr(row, col);
|
wxGridCellAttr *attr = GetCellAttr(row, col);
|
||||||
wxColour colour = attr->GetBackgroundColour();
|
wxColour colour = attr->GetBackgroundColour();
|
||||||
@@ -9788,7 +9787,7 @@ wxColour wxGrid::GetCellBackgroundColour(int row, int col)
|
|||||||
return colour;
|
return colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxColour wxGrid::GetCellTextColour( int row, int col )
|
wxColour wxGrid::GetCellTextColour( int row, int col ) const
|
||||||
{
|
{
|
||||||
wxGridCellAttr *attr = GetCellAttr(row, col);
|
wxGridCellAttr *attr = GetCellAttr(row, col);
|
||||||
wxColour colour = attr->GetTextColour();
|
wxColour colour = attr->GetTextColour();
|
||||||
@@ -9797,7 +9796,7 @@ wxColour wxGrid::GetCellTextColour( int row, int col )
|
|||||||
return colour;
|
return colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont wxGrid::GetCellFont( int row, int col )
|
wxFont wxGrid::GetCellFont( int row, int col ) const
|
||||||
{
|
{
|
||||||
wxGridCellAttr *attr = GetCellAttr(row, col);
|
wxGridCellAttr *attr = GetCellAttr(row, col);
|
||||||
wxFont font = attr->GetFont();
|
wxFont font = attr->GetFont();
|
||||||
@@ -9806,14 +9805,14 @@ wxFont wxGrid::GetCellFont( int row, int col )
|
|||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGrid::GetCellAlignment( int row, int col, int *horiz, int *vert )
|
void wxGrid::GetCellAlignment( int row, int col, int *horiz, int *vert ) const
|
||||||
{
|
{
|
||||||
wxGridCellAttr *attr = GetCellAttr(row, col);
|
wxGridCellAttr *attr = GetCellAttr(row, col);
|
||||||
attr->GetAlignment(horiz, vert);
|
attr->GetAlignment(horiz, vert);
|
||||||
attr->DecRef();
|
attr->DecRef();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGrid::GetCellOverflow( int row, int col )
|
bool wxGrid::GetCellOverflow( int row, int col ) const
|
||||||
{
|
{
|
||||||
wxGridCellAttr *attr = GetCellAttr(row, col);
|
wxGridCellAttr *attr = GetCellAttr(row, col);
|
||||||
bool allow = attr->GetOverflow();
|
bool allow = attr->GetOverflow();
|
||||||
@@ -9822,14 +9821,14 @@ bool wxGrid::GetCellOverflow( int row, int col )
|
|||||||
return allow;
|
return allow;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGrid::GetCellSize( int row, int col, int *num_rows, int *num_cols )
|
void wxGrid::GetCellSize( int row, int col, int *num_rows, int *num_cols ) const
|
||||||
{
|
{
|
||||||
wxGridCellAttr *attr = GetCellAttr(row, col);
|
wxGridCellAttr *attr = GetCellAttr(row, col);
|
||||||
attr->GetSize( num_rows, num_cols );
|
attr->GetSize( num_rows, num_cols );
|
||||||
attr->DecRef();
|
attr->DecRef();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGridCellRenderer* wxGrid::GetCellRenderer(int row, int col)
|
wxGridCellRenderer* wxGrid::GetCellRenderer(int row, int col) const
|
||||||
{
|
{
|
||||||
wxGridCellAttr* attr = GetCellAttr(row, col);
|
wxGridCellAttr* attr = GetCellAttr(row, col);
|
||||||
wxGridCellRenderer* renderer = attr->GetRenderer(this, row, col);
|
wxGridCellRenderer* renderer = attr->GetRenderer(this, row, col);
|
||||||
@@ -9838,7 +9837,7 @@ wxGridCellRenderer* wxGrid::GetCellRenderer(int row, int col)
|
|||||||
return renderer;
|
return renderer;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGridCellEditor* wxGrid::GetCellEditor(int row, int col)
|
wxGridCellEditor* wxGrid::GetCellEditor(int row, int col) const
|
||||||
{
|
{
|
||||||
wxGridCellAttr* attr = GetCellAttr(row, col);
|
wxGridCellAttr* attr = GetCellAttr(row, col);
|
||||||
wxGridCellEditor* editor = attr->GetEditor(this, row, col);
|
wxGridCellEditor* editor = attr->GetEditor(this, row, col);
|
||||||
@@ -9860,7 +9859,7 @@ bool wxGrid::IsReadOnly(int row, int col) const
|
|||||||
// attribute support: cache, automatic provider creation, ...
|
// attribute support: cache, automatic provider creation, ...
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool wxGrid::CanHaveAttributes()
|
bool wxGrid::CanHaveAttributes() const
|
||||||
{
|
{
|
||||||
if ( !m_table )
|
if ( !m_table )
|
||||||
{
|
{
|
||||||
@@ -10311,7 +10310,8 @@ void wxGrid::SetRowSize( int row, int height )
|
|||||||
|
|
||||||
void wxGrid::SetDefaultColSize( int width, bool resizeExistingCols )
|
void wxGrid::SetDefaultColSize( int width, bool resizeExistingCols )
|
||||||
{
|
{
|
||||||
m_defaultColWidth = wxMax( width, m_minAcceptableColWidth );
|
// we dont allow zero default column width
|
||||||
|
m_defaultColWidth = wxMax( wxMax( width, m_minAcceptableColWidth ), 1 );
|
||||||
|
|
||||||
if ( resizeExistingCols )
|
if ( resizeExistingCols )
|
||||||
{
|
{
|
||||||
@@ -10867,7 +10867,7 @@ void wxGrid::DeselectCell( int row, int col )
|
|||||||
m_selection->ToggleCellSelection(row, col);
|
m_selection->ToggleCellSelection(row, col);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGrid::IsSelection()
|
bool wxGrid::IsSelection() const
|
||||||
{
|
{
|
||||||
return ( m_selection && (m_selection->IsSelection() ||
|
return ( m_selection && (m_selection->IsSelection() ||
|
||||||
( m_selectingTopLeft != wxGridNoCellCoords &&
|
( m_selectingTopLeft != wxGridNoCellCoords &&
|
||||||
@@ -10951,7 +10951,7 @@ void wxGrid::ClearSelection()
|
|||||||
// in device coords clipped to the client size of the grid window.
|
// in device coords clipped to the client size of the grid window.
|
||||||
//
|
//
|
||||||
wxRect wxGrid::BlockToDeviceRect( const wxGridCellCoords &topLeft,
|
wxRect wxGrid::BlockToDeviceRect( const wxGridCellCoords &topLeft,
|
||||||
const wxGridCellCoords &bottomRight )
|
const wxGridCellCoords &bottomRight ) const
|
||||||
{
|
{
|
||||||
wxRect rect( wxGridNoCellRect );
|
wxRect rect( wxGridNoCellRect );
|
||||||
wxRect cellRect;
|
wxRect cellRect;
|
||||||
|
Reference in New Issue
Block a user