]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/grid.tex
Remove double entry of wxTrackable
[wxWidgets.git] / docs / latex / wx / grid.tex
index 353b7f3eea14adb700d8a4caa9cb79efba05c951..6c51b452e48a84329ca42b1d94a4944e3fe5875d 100644 (file)
@@ -24,12 +24,36 @@ 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 wxWidgets 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
+onwards. 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.
 
+A \helpref{wxGridTableBase}{wxgridtablebase} class holds the actual
+data to be displayed by a wxGrid class. One or more wxGrid classes
+may act as a view for one table class. 
+The default table class is called wxGridStringTable and
+holds an array of strings. An instance of such a class is created
+by \helpref{wxGrid::CreateGrid}{wxgridcreategrid}.
+
+\helpref{wxGridCellRenderer}{wxgridcellrenderer} is the abstract base
+class for rendereing contents in a cell. The following renderers are
+predefined:
+\helpref{wxGridCellStringRenderer}{wxgridcellstringrenderer},
+\helpref{wxGridCellBoolRenderer}{wxgridcellboolrenderer},
+\helpref{wxGridCellFloatRenderer}{wxgridcellfloatrenderer},
+\helpref{wxGridCellNumberRenderer}{wxgridcellnumberrenderer}. The
+look of a cell can be further defined using \helpref{wxGridCellAttr}{wxgridcellattr}.
+An object of this type may be returned by \helpref{wxGridTableBase::GetAttr}{wxgridtablebasegetattr}.
+
+\helpref{wxGridCellEditor}{wxgridcelleditor} is the abstract base
+class for editing the value of a cell. The following editors are
+predefined:
+\helpref{wxGridCellTextEditor}{wxgridcelltexteditor}
+\helpref{wxGridCellBoolEditor}{wxgridcellbooleditor}
+\helpref{wxGridCellChoiceEditor}{wxgridcellchoiceeditor}
+\helpref{wxGridCellNumberEditor}{wxgridcellnumbereditor}.
+
+
 \wxheading{Derived from}
 
 \helpref{wxScrolledWindow}{wxscrolledwindow}\\
@@ -61,8 +85,10 @@ The ...\_CMD\_... variants also take a window identifier.
 \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\_COL\_MOVE(func)}}{The user moved a column by dragging it. Processes a wxEVT\_GRID\_COL\_MOVE.}
 \twocolitem{{\bf EVT\_GRID\_ROW\_SIZE(func)}}{The user resized a row by dragging it. Processes a wxEVT\_GRID\_ROW\_SIZE.}
 \twocolitem{{\bf EVT\_GRID\_CMD\_COL\_SIZE(func)}}{The user resized a column by dragging it; variant taking a window identifier. Processes a wxEVT\_GRID\_COL\_SIZE.}
+\twocolitem{{\bf EVT\_GRID\_CMD\_COL\_MOVE(func)}}{The user moved a column by dragging it; variant taking a window identifier. Processes a wxEVT\_GRID\_COL\_MOVE.}
 \twocolitem{{\bf EVT\_GRID\_CMD\_ROW\_SIZE(func)}}{The user resized a row by dragging it; variant taking a window identifier. Processes a wxEVT\_GRID\_ROW\_SIZE.}
 \end{twocollist}%
 
@@ -103,10 +129,93 @@ The ...\_CMD\_... variant also takes a window identifier.
 \helpref{SetTable}{wxgridsettable}
 
 
-
-\membersection{Display format}\label{wxgriddisplayformat}
-
-
+\membersection{Cursor movement}\label{wxgridcursormovement}
+
+\helpref{wxGrid::MoveCursorUp}{wxgridmovecursorup}\\
+\helpref{wxGrid::MoveCursorDown}{wxgridmovecursordown}\\
+\helpref{wxGrid::MoveCursorLeft}{wxgridmovecursorleft}\\
+\helpref{wxGrid::MoveCursorRight}{wxgridmovecursorright}\\
+\helpref{wxGrid::MoveCursorPageUp}{wxgridmovecursorup}\\
+\helpref{wxGrid::MoveCursorPageDown}{wxgridmovecursordown}\\
+\helpref{wxGrid::MoveCursorUpBlock}{wxgridmovecursorupblock}\\
+\helpref{wxGrid::MoveCursorDownBlock}{wxgridmovecursordownblock}\\
+\helpref{wxGrid::MoveCursorLeftBlock}{wxgridmovecursorleftblock}\\
+\helpref{wxGrid::MoveCursorRightBlock}{wxgridmovecursorrightblock}
+
+
+\membersection{Grid line formatting}\label{wxgridlineformatting}
+
+\helpref{wxGrid::EnableGridLines}{wxgridenablegridlines}\\
+\helpref{wxGrid::GridLinesEnabled}{wxgridgridlinesenabled}\\
+\helpref{wxGrid::SetGridLineColour}{wxgridsetgridlinecolour}\\
+\helpref{wxGrid::GetGridLineColour}{wxgridgetgridlinecolour}\\
+\helpref{wxGrid::GetDefaultGridLinePen}{wxgridgetdefaultgridlinepen}\\
+\helpref{wxGrid::GetRowGridLinePen}{wxgridgetrowgridlinepen}\\
+\helpref{wxGrid::GetColGridLinePen}{wxgridgetcolgridlinepen}
+
+\membersection{Row and column label value and format}\label{wxgridrowcoulmlabelformat}
+
+\helpref{wxGrid::SetRowLabelValue}{wxgridsetrowlabelvalue}\\
+\helpref{wxGrid::SetColLabelValue}{wxgridsetcollabelvalue}\\
+\helpref{wxGrid::GetRowLabelValue}{wxgridgetrowlabelvalue}\\
+\helpref{wxGrid::GetColLabelValue}{wxgridgetcollabelvalue}\\
+\helpref{wxGrid::SetUseNativeColLabels}{wxgridsetsenativecollabels}\\
+\helpref{wxGrid::HideColLabels}{wxgridhidecollabels}\\
+\helpref{wxGrid::HideRowLabels}{wxgridhiderowlabels}\\
+\helpref{wxGrid::SetRowLabelSize}{wxgridsetrowlabelsize}\\
+\helpref{wxGrid::SetColLabelSize}{wxgridsetcollabelsize}\\
+\helpref{wxGrid::GetRowLabelSize}{wxgridgetrowlabelsize}\\
+\helpref{wxGrid::GetColLabelSize}{wxgridgetcollabelsize}\\
+\helpref{wxGrid::AutoSizeRowLabelSize}{wxgridautosizerowlabelsize}\\
+\helpref{wxGrid::AutoSizeColLabelSize}{wxgridautosizecollabelsize}\\
+\helpref{wxGrid::GetDefaultRowLabelSize}{wxgridgetdefaultrowlabelsize}\\
+\helpref{wxGrid::GetDefaultColLabelSize}{wxgridgetdefaultcollabelsize}\\
+\helpref{wxGrid::SetRowLabelAlignment}{wxgridsetrowlabelalignment}\\
+\helpref{wxGrid::SetColLabelAlignment}{wxgridsetcollabelalignment}\\
+\helpref{wxGrid::GetRowLabelAlignment}{wxgridgetrowlabelalignment}\\
+\helpref{wxGrid::GetColLabelAlignment}{wxgridgetcollabelalignment}\\
+\helpref{wxGrid::SetLabelFont}{wxgridsetlabelfont}\\
+\helpref{wxGrid::SetLabelTextColour}{wxgridsetlabeltextcolour}\\
+\helpref{wxGrid::SetLabelBackgroundColour}{wxgridsetlabelbackgroundcolour}\\
+\helpref{wxGrid::GetLabelFont}{wxgridgetlabelfont}\\
+\helpref{wxGrid::GetLabelBackgroundColour}{wxgridgetlabelbackgroundcolour}\\
+\helpref{wxGrid::GetLabelTextColour}{wxgridgetlabeltextcolour}\\
+%\helpref{wxGrid::SetColLabelTextOrientation}{wxgridsetcollabeltextorientation}\\
+%\helpref{wxGrid::GetColLabelTextOrientation}{wxgridgetcollabeltextorientation}
+wxGrid::SetColLabelTextOrientation\\
+wxGrid::GetColLabelTextOrientation
+
+\membersection{Cell, row and column user-resizing and dragging}\label{wxgridcellrowcolresizing}
+
+\helpref{wxGrid::EnableDragRowSize}{wxgridenabledragrowsize}\\
+\helpref{wxGrid::EnableDragColSize}{wxgridenabledragcolsize}\\
+\helpref{wxGrid::CanDragRowSize}{wxgridcandragrowsize}\\
+\helpref{wxGrid::CanDragColSize}{wxgridcandragcolsize}\\
+\helpref{wxGrid::EnableDragColMove}{wxgridenabledragcolmove}\\
+\helpref{wxGrid::CanDragColMove}{wxgridcandragcolmove}\\
+\helpref{wxGrid::EnableDragGridSize}{wxgridenabledraggridsize}\\
+\helpref{wxGrid::CanDragGridSize}{wxgridcandraggridsize}\\
+\helpref{wxGrid::GetColAt}{wxgridgetcolat}\\
+\helpref{wxGrid::SetColPos}{wxgridsetcolpos}\\
+\helpref{wxGrid::GetColPos}{wxgridgetcolpos}\\
+%\helpref{wxGrid::EnableDragCell}{wxgridenabledragcell}\\
+%\helpref{wxGrid::CanDragCell}{wxgridcandragcell}
+wxGrid::EnableDragCell\\
+wxGrid::CanDragCell
+
+\membersection{Autoresizing and cell size constraints}\label{wxgridautoresizingandcellconstriants}
+
+\helpref{wxGrid::AutoSizeColumn}{wxgridautosizecolumn}\\
+\helpref{wxGrid::AutoSizeRow}{wxgridautosizerow}\\
+\helpref{wxGrid::AutoSizeColumns}{wxgridautosizecolumns}\\
+\helpref{wxGrid::AutoSizeRows}{wxgridautosizerows}\\
+\helpref{wxGrid::AutoSize}{wxgridautosize}\\
+\helpref{wxGrid::SetColMinimalWidth}{wxgridsetcolminimalwidth}\\
+\helpref{wxGrid::SetRowMinimalHeight}{wxgridsetrowminimalheight}\\
+\helpref{wxGrid::SetColMinimalAcceptableWidth}{wxgridsetcolminimalacceptablewidth}\\
+\helpref{wxGrid::SetRowMinimalAcceptableHeight}{wxgridsetrowminimalacceptableheight}\\
+\helpref{wxGrid::GetColMinimalAcceptableWidth}{wxgridgetcolminimalacceptablewidth}\\
+\helpref{wxGrid::GetRowMinimalAcceptableHeight}{wxgridgetrowminimalacceptableheight}
 
 \membersection{Selection functions}\label{wxgridselectionfunctions}
 
@@ -1150,6 +1259,23 @@ Returned number of whole cols visible.
 Hides the in-place cell edit control.
 
 
+\membersection{wxGrid::HideColLabels}\label{wxgridhidecollabels}
+
+\func{void}{HideColLabels}{\void}
+
+Hides the column labels by calling \helpref{SetColLabelSize}{wxgridsetcollabelsize}
+with a size of 0. Show labels again by calling that method with
+a width greater than 0.
+
+
+\membersection{wxGrid::HideRowLabels}\label{wxgridhiderowlabels}
+
+\func{void}{HideRowLabels}{\void}
+
+Hides the row labels by calling \helpref{SetRowLabelSize}{wxgridsetrowlabelsize}
+with a size of 0. Show labels again by calling that method with
+a width greater than 0.
+
 
 \membersection{wxGrid::InitColWidths}\label{wxgridinitcolwidths}
 
@@ -1998,6 +2124,15 @@ application involves complex or non-string data or data sets that are too large
 wholly in memory.
 
 
+\membersection{wxGrid::SetUseNativeColLabels}\label{wxgridsetsenativecollabels}
+
+\func{void}{SetUseNativeColLabels}{\param{bool }{native= true}}
+
+Call this in order to make the column labels use a native look by using
+\helpref{wxRenderer::DrawHeaderButton}{wxrenderernativedrawheaderbutton}
+internally. There is no equivalent method for drawing row columns as
+there is not native look for that. This option is useful when using
+wxGrid for displaying tables and not as a spread-sheet.
 
 \membersection{wxGrid::ShowCellEditControl}\label{wxgridshowcelleditcontrol}