Applied #11389: dataview GetValueByRow, SetValueByRow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@66925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -120,6 +120,24 @@ public:
|
|||||||
// set value, call ValueChanged() afterwards!
|
// set value, call ValueChanged() afterwards!
|
||||||
virtual bool SetValue( wxVariant &variant, unsigned int col, unsigned int row ) = 0;
|
virtual bool SetValue( wxVariant &variant, unsigned int col, unsigned int row ) = 0;
|
||||||
|
|
||||||
|
#if wxABI_VERSION >= 20812
|
||||||
|
// Notes:
|
||||||
|
// - In wx 2.9 GetValue/SetValue are removed, replaced with GetValueByRow and SetValueByRow
|
||||||
|
// - GetValueByRow/SetValueByRow has (row,col) parameters, GetValue/SetValue is vice versa, (col,row)
|
||||||
|
|
||||||
|
// virtual in wx 2.9
|
||||||
|
void GetValueByRow(wxVariant& variant, unsigned row, unsigned col) const
|
||||||
|
{
|
||||||
|
const_cast<wxDataViewListModel*>(this)->GetValue(variant, col, row);
|
||||||
|
}
|
||||||
|
|
||||||
|
// virtual in wx 2.9
|
||||||
|
bool SetValueByRow(const wxVariant& variant, unsigned row, unsigned col)
|
||||||
|
{
|
||||||
|
return SetValue((wxVariant&)variant, col, row);
|
||||||
|
}
|
||||||
|
#endif // wx >= 2.8.12
|
||||||
|
|
||||||
// delegated notifiers
|
// delegated notifiers
|
||||||
virtual bool RowAppended();
|
virtual bool RowAppended();
|
||||||
virtual bool RowPrepended();
|
virtual bool RowPrepended();
|
||||||
@@ -198,7 +216,7 @@ private:
|
|||||||
wxDataViewListModel *m_child;
|
wxDataViewListModel *m_child;
|
||||||
wxDataViewSortedIndexArray m_array;
|
wxDataViewSortedIndexArray m_array;
|
||||||
wxDataViewListModelNotifier *m_notifierOnChild;
|
wxDataViewListModelNotifier *m_notifierOnChild;
|
||||||
|
|
||||||
void InitStatics(); // BAD
|
void InitStatics(); // BAD
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -273,9 +291,9 @@ public:
|
|||||||
|
|
||||||
virtual void SetBitmap( const wxBitmap &bitmap );
|
virtual void SetBitmap( const wxBitmap &bitmap );
|
||||||
virtual const wxBitmap &GetBitmap();
|
virtual const wxBitmap &GetBitmap();
|
||||||
|
|
||||||
virtual void SetAlignment( wxAlignment align ) = 0;
|
virtual void SetAlignment( wxAlignment align ) = 0;
|
||||||
|
|
||||||
virtual void SetSortable( bool sortable ) = 0;
|
virtual void SetSortable( bool sortable ) = 0;
|
||||||
virtual bool GetSortable() = 0;
|
virtual bool GetSortable() = 0;
|
||||||
virtual void SetSortOrder( bool ascending ) = 0;
|
virtual void SetSortOrder( bool ascending ) = 0;
|
||||||
@@ -320,11 +338,11 @@ public:
|
|||||||
wxDataViewListModel* GetModel();
|
wxDataViewListModel* GetModel();
|
||||||
|
|
||||||
// short cuts
|
// short cuts
|
||||||
bool AppendTextColumn( const wxString &label, unsigned int model_column,
|
bool AppendTextColumn( const wxString &label, unsigned int model_column,
|
||||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 );
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 );
|
||||||
bool AppendToggleColumn( const wxString &label, unsigned int model_column,
|
bool AppendToggleColumn( const wxString &label, unsigned int model_column,
|
||||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 30 );
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 30 );
|
||||||
bool AppendProgressColumn( const wxString &label, unsigned int model_column,
|
bool AppendProgressColumn( const wxString &label, unsigned int model_column,
|
||||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 80 );
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 80 );
|
||||||
bool AppendDateColumn( const wxString &label, unsigned int model_column,
|
bool AppendDateColumn( const wxString &label, unsigned int model_column,
|
||||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1 );
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1 );
|
||||||
@@ -340,7 +358,7 @@ public:
|
|||||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1 );
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1 );
|
||||||
bool AppendBitmapColumn( const wxBitmap &label, unsigned int model_column,
|
bool AppendBitmapColumn( const wxBitmap &label, unsigned int model_column,
|
||||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 );
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 );
|
||||||
|
|
||||||
virtual bool AppendColumn( wxDataViewColumn *col );
|
virtual bool AppendColumn( wxDataViewColumn *col );
|
||||||
virtual unsigned int GetNumberOfColumns();
|
virtual unsigned int GetNumberOfColumns();
|
||||||
virtual bool DeleteColumn( unsigned int pos );
|
virtual bool DeleteColumn( unsigned int pos );
|
||||||
@@ -352,7 +370,7 @@ public:
|
|||||||
virtual void Unselect( unsigned int row ) = 0;
|
virtual void Unselect( unsigned int row ) = 0;
|
||||||
virtual void SetSelectionRange( unsigned int from, unsigned int to ) = 0;
|
virtual void SetSelectionRange( unsigned int from, unsigned int to ) = 0;
|
||||||
virtual void SetSelections( const wxArrayInt& aSelections) = 0;
|
virtual void SetSelections( const wxArrayInt& aSelections) = 0;
|
||||||
|
|
||||||
virtual bool IsSelected( unsigned int row ) const = 0;
|
virtual bool IsSelected( unsigned int row ) const = 0;
|
||||||
virtual int GetSelection() const = 0;
|
virtual int GetSelection() const = 0;
|
||||||
virtual int GetSelections(wxArrayInt& aSelections) const = 0;
|
virtual int GetSelections(wxArrayInt& aSelections) const = 0;
|
||||||
|
@@ -23,6 +23,12 @@
|
|||||||
# released with the generic branch version due to the final wildcard below,
|
# released with the generic branch version due to the final wildcard below,
|
||||||
# and once released its version cannot be changed.
|
# and once released its version cannot be changed.
|
||||||
|
|
||||||
|
# public symbols added in 2.8.12 (please keep in alphabetical order):
|
||||||
|
@WX_VERSION_TAG@.12 {
|
||||||
|
*wxDataViewListModel*GetValueByRow*;
|
||||||
|
*wxDataViewListModel*SetValueByRow*;
|
||||||
|
};
|
||||||
|
|
||||||
# public symbols added in 2.8.11 (please keep in alphabetical order):
|
# public symbols added in 2.8.11 (please keep in alphabetical order):
|
||||||
#
|
#
|
||||||
# NB: Convert{From,To}IeeeExtended() were not really added but they were not
|
# NB: Convert{From,To}IeeeExtended() were not really added but they were not
|
||||||
|
Reference in New Issue
Block a user