| 1 | \section{\class{wxGridTableBase}}\label{wxgridtablebase} |
| 2 | |
| 3 | Grid table classes. |
| 4 | |
| 5 | \wxheading{Derived from} |
| 6 | |
| 7 | \helpref{wxObject}{wxobject} |
| 8 | |
| 9 | \wxheading{Data structures} |
| 10 | |
| 11 | \latexignore{\rtfignore{\wxheading{Members}}} |
| 12 | |
| 13 | \membersection{wxGridTableBase::wxGridTableBase}\label{wxgridtablebasewxgridtablebase} |
| 14 | |
| 15 | \func{}{wxGridTableBase}{\void} |
| 16 | |
| 17 | \membersection{wxGridTableBase::\destruct{wxGridTableBase}}\label{wxgridtablebasedtor} |
| 18 | |
| 19 | \func{}{\destruct{wxGridTableBase}}{\void} |
| 20 | |
| 21 | \membersection{wxGridTableBase::GetNumberRows}\label{wxgridtablebasegetnumberrows} |
| 22 | |
| 23 | \func{int}{GetNumberRows}{\void} |
| 24 | |
| 25 | You must override these functions in a derived table class. |
| 26 | |
| 27 | \membersection{wxGridTableBase::GetNumberCols}\label{wxgridtablebasegetnumbercols} |
| 28 | |
| 29 | \func{int}{GetNumberCols}{\void} |
| 30 | |
| 31 | |
| 32 | \membersection{wxGridTableBase::IsEmptyCell}\label{wxgridtablebaseisemptycell} |
| 33 | |
| 34 | \func{bool}{IsEmptyCell}{\param{int }{row}, \param{int }{col}} |
| 35 | |
| 36 | |
| 37 | \membersection{wxGridTableBase::GetValue}\label{wxgridtablebasegetvalue} |
| 38 | |
| 39 | \func{wxString}{GetValue}{\param{int }{row}, \param{int }{col}} |
| 40 | |
| 41 | |
| 42 | \membersection{wxGridTableBase::SetValue}\label{wxgridtablebasesetvalue} |
| 43 | |
| 44 | \func{void}{SetValue}{\param{int }{row}, \param{int }{col}, \param{const wxString\& }{value}} |
| 45 | |
| 46 | |
| 47 | \membersection{wxGridTableBase::GetTypeName}\label{wxgridtablebasegettypename} |
| 48 | |
| 49 | \func{wxString}{GetTypeName}{\param{int }{row}, \param{int }{col}} |
| 50 | |
| 51 | Data type determination and value access. |
| 52 | |
| 53 | \membersection{wxGridTableBase::CanGetValueAs}\label{wxgridtablebasecangetvalueas} |
| 54 | |
| 55 | \func{bool}{CanGetValueAs}{\param{int }{row}, \param{int }{col}, \param{const wxString\& }{typeName}} |
| 56 | |
| 57 | |
| 58 | \membersection{wxGridTableBase::CanSetValueAs}\label{wxgridtablebasecansetvalueas} |
| 59 | |
| 60 | \func{bool}{CanSetValueAs}{\param{int }{row}, \param{int }{col}, \param{const wxString\& }{typeName}} |
| 61 | |
| 62 | |
| 63 | \membersection{wxGridTableBase::GetValueAsLong}\label{wxgridtablebasegetvalueaslong} |
| 64 | |
| 65 | \func{long}{GetValueAsLong}{\param{int }{row}, \param{int }{col}} |
| 66 | |
| 67 | |
| 68 | \membersection{wxGridTableBase::GetValueAsDouble}\label{wxgridtablebasegetvalueasdouble} |
| 69 | |
| 70 | \func{double}{GetValueAsDouble}{\param{int }{row}, \param{int }{col}} |
| 71 | |
| 72 | |
| 73 | \membersection{wxGridTableBase::GetValueAsBool}\label{wxgridtablebasegetvalueasbool} |
| 74 | |
| 75 | \func{bool}{GetValueAsBool}{\param{int }{row}, \param{int }{col}} |
| 76 | |
| 77 | |
| 78 | \membersection{wxGridTableBase::SetValueAsLong}\label{wxgridtablebasesetvalueaslong} |
| 79 | |
| 80 | \func{void}{SetValueAsLong}{\param{int }{row}, \param{int }{col}, \param{long }{value}} |
| 81 | |
| 82 | |
| 83 | \membersection{wxGridTableBase::SetValueAsDouble}\label{wxgridtablebasesetvalueasdouble} |
| 84 | |
| 85 | \func{void}{SetValueAsDouble}{\param{int }{row}, \param{int }{col}, \param{double }{value}} |
| 86 | |
| 87 | |
| 88 | \membersection{wxGridTableBase::SetValueAsBool}\label{wxgridtablebasesetvalueasbool} |
| 89 | |
| 90 | \func{void}{SetValueAsBool}{\param{int }{row}, \param{int }{col}, \param{bool }{value}} |
| 91 | |
| 92 | |
| 93 | \membersection{wxGridTableBase::GetValueAsCustom}\label{wxgridtablebasegetvalueascustom} |
| 94 | |
| 95 | \func{void*}{GetValueAsCustom}{\param{int }{row}, \param{int }{col}, \param{const wxString\& }{typeName}} |
| 96 | |
| 97 | For user defined types |
| 98 | |
| 99 | |
| 100 | \membersection{wxGridTableBase::SetValueAsCustom}\label{wxgridtablebasesetvalueascustom} |
| 101 | |
| 102 | \func{void}{SetValueAsCustom}{\param{int }{row}, \param{int }{col}, \param{const wxString\& }{typeName}, \param{void* }{value}} |
| 103 | |
| 104 | |
| 105 | \membersection{wxGridTableBase::SetView}\label{wxgridtablebasesetview} |
| 106 | |
| 107 | \func{void}{SetView}{\param{wxGrid* }{grid}} |
| 108 | |
| 109 | Overriding these is optional |
| 110 | |
| 111 | |
| 112 | \membersection{wxGridTableBase::GetView}\label{wxgridtablebasegetview} |
| 113 | |
| 114 | \constfunc{wxGrid *}{GetView}{\void} |
| 115 | |
| 116 | |
| 117 | \membersection{wxGridTableBase::Clear}\label{wxgridtablebaseclear} |
| 118 | |
| 119 | \func{void}{Clear}{\void} |
| 120 | |
| 121 | |
| 122 | \membersection{wxGridTableBase::InsertRows}\label{wxgridtablebaseinsertrows} |
| 123 | |
| 124 | \func{bool}{InsertRows}{\param{size\_t }{pos = 0}, \param{size\_t }{numRows = 1}} |
| 125 | |
| 126 | |
| 127 | \membersection{wxGridTableBase::AppendRows}\label{wxgridtablebaseappendrows} |
| 128 | |
| 129 | \func{bool}{AppendRows}{\param{size\_t }{numRows = 1}} |
| 130 | |
| 131 | |
| 132 | \membersection{wxGridTableBase::DeleteRows}\label{wxgridtablebasedeleterows} |
| 133 | |
| 134 | \func{bool}{DeleteRows}{\param{size\_t }{pos = 0}, \param{size\_t }{numRows = 1}} |
| 135 | |
| 136 | |
| 137 | \membersection{wxGridTableBase::InsertCols}\label{wxgridtablebaseinsertcols} |
| 138 | |
| 139 | \func{bool}{InsertCols}{\param{size\_t }{pos = 0}, \param{size\_t }{numCols = 1}} |
| 140 | |
| 141 | |
| 142 | \membersection{wxGridTableBase::AppendCols}\label{wxgridtablebaseappendcols} |
| 143 | |
| 144 | \func{bool}{AppendCols}{\param{size\_t }{numCols = 1}} |
| 145 | |
| 146 | |
| 147 | \membersection{wxGridTableBase::DeleteCols}\label{wxgridtablebasedeletecols} |
| 148 | |
| 149 | \func{bool}{DeleteCols}{\param{size\_t }{pos = 0}, \param{size\_t }{numCols = 1}} |
| 150 | |
| 151 | |
| 152 | \membersection{wxGridTableBase::GetRowLabelValue}\label{wxgridtablebasegetrowlabelvalue} |
| 153 | |
| 154 | \func{wxString}{GetRowLabelValue}{\param{int }{row}} |
| 155 | |
| 156 | |
| 157 | \membersection{wxGridTableBase::GetColLabelValue}\label{wxgridtablebasegetcollabelvalue} |
| 158 | |
| 159 | \func{wxString}{GetColLabelValue}{\param{int }{col}} |
| 160 | |
| 161 | |
| 162 | \membersection{wxGridTableBase::SetRowLabelValue}\label{wxgridtablebasesetrowlabelvalue} |
| 163 | |
| 164 | \func{void}{SetRowLabelValue}{\param{int }{WXUNUSED(row)}, \param{const }{wxString\&}} |
| 165 | |
| 166 | |
| 167 | \membersection{wxGridTableBase::SetColLabelValue}\label{wxgridtablebasesetcollabelvalue} |
| 168 | |
| 169 | \func{void}{SetColLabelValue}{\param{int }{WXUNUSED(col)}, \param{const }{wxString\&}} |
| 170 | |
| 171 | |
| 172 | \membersection{wxGridTableBase::SetAttrProvider}\label{wxgridtablebasesetattrprovider} |
| 173 | |
| 174 | \func{void}{SetAttrProvider}{\param{wxGridCellAttrProvider* }{attrProvider}} |
| 175 | |
| 176 | Attribute handling |
| 177 | give us the attr provider to use - we take ownership of the pointer |
| 178 | |
| 179 | |
| 180 | \membersection{wxGridTableBase::GetAttrProvider}\label{wxgridtablebasegetattrprovider} |
| 181 | |
| 182 | \constfunc{wxGridCellAttrProvider*}{GetAttrProvider}{\void} |
| 183 | |
| 184 | get the currently used attr provider (may be NULL) |
| 185 | |
| 186 | |
| 187 | \membersection{wxGridTableBase::CanHaveAttributes}\label{wxgridtablebasecanhaveattributes} |
| 188 | |
| 189 | \func{bool}{CanHaveAttributes}{\void} |
| 190 | |
| 191 | Does this table allow attributes? Default implementation creates |
| 192 | a wxGridCellAttrProvider if necessary. |
| 193 | |
| 194 | |
| 195 | \membersection{wxGridTableBase::UpdateAttrRows}\label{wxgridtablebaseupdateattrrows} |
| 196 | |
| 197 | \func{void}{UpdateAttrRows}{\param{size\_t }{pos}, \param{int }{numRows}} |
| 198 | |
| 199 | change row/col number in attribute if needed |
| 200 | |
| 201 | |
| 202 | \membersection{wxGridTableBase::UpdateAttrCols}\label{wxgridtablebaseupdateattrcols} |
| 203 | |
| 204 | \func{void}{UpdateAttrCols}{\param{size\_t }{pos}, \param{int }{numCols}} |
| 205 | |
| 206 | |
| 207 | \membersection{wxGridTableBase::GetAttr}\label{wxgridtablebasegetattr} |
| 208 | |
| 209 | \func{wxGridCellAttr*}{GetAttr}{\param{int }{row}, \param{int }{col}} |
| 210 | |
| 211 | by default forwarded to wxGridCellAttrProvider if any. May be |
| 212 | overridden to handle attributes directly in the table. |
| 213 | |
| 214 | |
| 215 | \membersection{wxGridTableBase::SetAttr}\label{wxgridtablebasesetattr} |
| 216 | |
| 217 | \func{void}{SetAttr}{\param{wxGridCellAttr* }{attr}, \param{int }{row}, \param{int }{col}} |
| 218 | |
| 219 | these functions take ownership of the pointer |
| 220 | |
| 221 | |
| 222 | \membersection{wxGridTableBase::SetRowAttr}\label{wxgridtablebasesetrowattr} |
| 223 | |
| 224 | \func{void}{SetRowAttr}{\param{wxGridCellAttr* }{attr}, \param{int }{row}} |
| 225 | |
| 226 | |
| 227 | \membersection{wxGridTableBase::SetColAttr}\label{wxgridtablebasesetcolattr} |
| 228 | |
| 229 | \func{void}{SetColAttr}{\param{wxGridCellAttr* }{attr}, \param{int }{col}} |
| 230 | |