Since it is documented, changed GetOrCreateCellAttr from protected to
public so it can be used from wxPython. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9a8a6d250f
commit
71e60f703c
@ -1310,6 +1310,13 @@ public:
|
||||
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
|
||||
@ -1794,12 +1801,6 @@ protected:
|
||||
// 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
|
||||
|
@ -9097,9 +9097,10 @@ wxGridCellAttr *wxGrid::GetCellAttr(int row, int col) const
|
||||
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 )
|
||||
|
@ -16,26 +16,31 @@ wx.grid.Grid fix allowing DoGetBestSize to be called before CreateGrid
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1820,6 +1820,13 @@ public:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user