void SetRowAttr(int row, wxGridCellAttr *attr);
void SetColAttr(int col, wxGridCellAttr *attr);
+ // returns the attribute we may modify in place: a new one if this cell
+ // doesn't have any yet or the existing one if it does
+ //
+ // DecRef() must be called on the returned pointer, as usual
+ wxGridCellAttr *GetOrCreateCellAttr(int row, int col) const;
+
+
// shortcuts for setting the column parameters
// set the format for the data in the column: default is string
// do we have some place to store attributes in?
bool CanHaveAttributes();
- // returns the attribute we may modify in place: a new one if this cell
- // doesn't have any yet or the existing one if it does
- //
- // DecRef() must be called on the returned pointer, as usual
- wxGridCellAttr *GetOrCreateCellAttr(int row, int col) const;
-
// cell attribute cache (currently we only cache 1, may be will do
// more/better later)
struct CachedAttr
wxGridCellAttr *wxGrid::GetOrCreateCellAttr(int row, int col) const
{
wxGridCellAttr *attr = (wxGridCellAttr *)NULL;
+ bool canHave = ((wxGrid*)this)->CanHaveAttributes();
- wxCHECK_MSG( m_table, attr,
- _T("we may only be called if CanHaveAttributes() returned true and then m_table should be !NULL") );
+ wxCHECK_MSG( canHave, attr, _T("Cell attributes not allowed"));
+ wxCHECK_MSG( m_table, attr, _T("must have a table") );
attr = m_table->GetAttr(row, col, wxGridCellAttr::Cell);
if ( !attr )
wxMac fix for not sending a native click to a control if it is not
enabled (does an enable itself)
-Added wx.ogl.DrawShape
+Added wx.lib.ogl.DrawnShape
Added support to XRC and XRCed for the 3-state checkbox flags and also
for wx.ToggleButton. Updated the generic window styles supported by
XRCed.
It is now possible to create "stock" buttons. Basically this means
-that you only have to provide one of the stock IDs (and an empty
-label) when creating the button and wxWidgets will choose the stock
-label to go with it automatically. Additionally on the platforms that
-have a native concept of a stock button (currently only GTK2) then the
-native stock button will be used. For example, the following will
-result in a button with "Cancel" as the label and an accelerator on
-the "C", and if on wxGTK2 there will be an image of a red X::
+that you only have to provide one of the stock IDs (and either an
+empty label or a label that matches the stock label) when creating the
+button and wxWidgets will choose the stock label to go with it
+automatically. Additionally on the platforms that have a native
+concept of a stock button (currently only GTK2) then the native stock
+button will be used. For example, the following will result in a
+button with "Cancel" as the label and an accelerator on the "C", and
+if run on wxGTK2 then there will also be an image of a red X::
b = wx.Button(parent, wx.ID_CANCEL)
Added wx.lib.ticker.Ticker class from Chris Mellon.
+Fix some incorrect clipping regions in wxSTC on wxGTK.
+
+Added wrapper for wx.grid.Grid.GetOrCreateCellAttr.
+
void SetRowAttr(int row, wxGridCellAttr *attr);
void SetColAttr(int col, wxGridCellAttr *attr);
+ // returns the attribute we may modify in place: a new one if this cell
+ // doesn't have any yet or the existing one if it does
+ //
+ // DecRef() must be called on the returned pointer, as usual
+ wxGridCellAttr *GetOrCreateCellAttr(int row, int col) const;
+
+
// shortcuts for setting the column parameters
// set the format for the data in the column: default is string