void* m_id;
};
-bool operator == (const wxDataViewItem &left, const wxDataViewItem &right);
+inline
+bool operator==(const wxDataViewItem& left, const wxDataViewItem& right)
+{
+ return left.GetID() == right.GetID();
+}
+
+inline
+bool operator!=(const wxDataViewItem& left, const wxDataViewItem& right)
+{
+ return !(left == right);
+}
WX_DEFINE_ARRAY(wxDataViewItem, wxDataViewItemArray);
bool HasColour() const { return m_colour.Ok(); }
const wxColour& GetColour() const { return m_colour; }
+ bool HasFont() const { return m_bold || m_italic; }
bool GetBold() const { return m_bold; }
bool GetItalic() const { return m_italic; }
wxDataViewRendererBase( const wxString &varianttype,
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
int alignment = wxDVR_DEFAULT_ALIGNMENT );
- ~wxDataViewRendererBase();
+ virtual ~wxDataViewRendererBase();
virtual bool Validate( wxVariant& WXUNUSED(value) )
{ return true; }
virtual void SetAlignment( int align ) = 0;
virtual int GetAlignment() const = 0;
+ // enable or disable (if called with wxELLIPSIZE_NONE) replacing parts of
+ // the item text (hence this only makes sense for renderers showing
+ // text...) with ellipsis in order to make it fit the column width
+ virtual void EnableEllipsize(wxEllipsizeMode mode = wxELLIPSIZE_MIDDLE) = 0;
+ void DisableEllipsize() { EnableEllipsize(wxELLIPSIZE_NONE); }
+
+ virtual wxEllipsizeMode GetEllipsizeMode() const = 0;
+
// in-place editing
virtual bool HasEditorCtrl() const
{ return false; }
DECLARE_DYNAMIC_CLASS(wxDataViewIconText)
};
-bool operator == (const wxDataViewIconText &one, const wxDataViewIconText &two);
+inline
+bool operator==(const wxDataViewIconText& left, const wxDataViewIconText& right)
+{
+ return left.GetText() == right.GetText() &&
+ left.GetIcon().IsSameAs(right.GetIcon());
+}
+
+inline
+bool operator!=(const wxDataViewIconText& left, const wxDataViewIconText& right)
+{
+ return !(left == right);
+}
DECLARE_VARIANT_OBJECT_EXPORTED(wxDataViewIconText, WXDLLIMPEXP_ADV)
#endif
+// this class is obsolete, its functionality was merged in
+// wxDataViewTextRenderer itself now, don't use it any more
+#define wxDataViewTextRendererAttr wxDataViewTextRenderer
+
//-----------------------------------------------------------------------------
// wxDataViewListStore
//-----------------------------------------------------------------------------