X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e39de7022c2fb33d79b4d1770fa6e3911128d2d6..cde80c9284b64d611e8cf4a7565de40aa0acce81:/interface/dataview.h diff --git a/interface/dataview.h b/interface/dataview.h index 5d651b1737..533e8ec36b 100644 --- a/interface/dataview.h +++ b/interface/dataview.h @@ -16,7 +16,7 @@ a wxVariant. @library{wxbase} - @category{FIXME} + @category{dvc} */ class wxDataViewIconText : public wxObject { @@ -60,7 +60,7 @@ public: wxDataViewEvent - the event class for the wxDataViewCtrl notifications @library{wxadv} - @category{FIXME} + @category{events,dvc} */ class wxDataViewEvent : public wxNotifyEvent { @@ -129,32 +129,6 @@ public: -/** - @class wxDataViewIconTextRenderer - @wxheader{dataview.h} - - The wxDataViewIconTextRenderer class is used to display text with - a small icon next to it as it is typically done in a file manager. - This classes uses the wxDataViewIconText - helper class to store its data. wxDataViewIonText can be converted - to a from a wxVariant using the left shift - operator. - - @library{wxadv} - @category{FIXME} -*/ -class wxDataViewIconTextRenderer : public wxDataViewRenderer -{ -public: - /** - - */ - wxDataViewIconTextRenderer(const wxString& varianttype = "wxDataViewIconText", - wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT); -}; - - - /** @class wxDataViewModel @wxheader{dataview.h} @@ -239,7 +213,7 @@ public: @library{wxadv} - @category{FIXME} + @category{dvc} */ class wxDataViewModel : public wxObjectRefData { @@ -421,7 +395,6 @@ public: - /** @class wxDataViewIndexListModel @wxheader{dataview.h} @@ -438,7 +411,7 @@ public: use a virtual control. @library{wxbase} - @category{FIXME} + @category{dvc} */ class wxDataViewIndexListModel : public wxDataViewModel { @@ -555,7 +528,7 @@ public: @see wxDataViewIndexListModel for the API. @library{wxbase} - @category{FIXME} + @category{dvc} */ class wxDataViewVirtualListModel : public wxDataViewModel { @@ -564,9 +537,7 @@ public: Constructor. */ wxDataViewVirtualListModel(unsigned int initial_size = 0); -} - - +}; @@ -583,7 +554,7 @@ public: wxDataViewTextRendererText(). @library{wxadv} - @category{FIXME} + @category{dvc} */ class wxDataViewItemAttr { @@ -633,7 +604,7 @@ public: wxDataViewModel::GetChildren. @library{wxadv} - @category{FIXME} + @category{dvc} */ class wxDataViewItem { @@ -705,26 +676,30 @@ public: Display fine rules between row if supported. @style{wxDV_VERT_RULES} Display fine rules between columns is supported. + @style{wxDV_VARIABLE_LINE_HEIGHT} + Allow variable line heights. This can be inefficient when displaying large number of items. @endStyleTable @library{wxadv} - @category{ctrl} - @appearance{dataviewctrl.png} + @category{ctrl,dvc} + */ class wxDataViewCtrl : public wxControl { public: - //@{ /** - Constructor. Calls Create(). + Default Constructor. */ wxDataViewCtrl(); + + /** + Constructor. Calls Create(). + */ wxDataViewCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator); - //@} /** Destructor. @@ -732,13 +707,24 @@ public: ~wxDataViewCtrl(); /** - Add a wxDataViewColumn to the control. Returns - @e @true on success. + Appends a wxDataViewColumn to the control. Returns @true on success. Note that there is a number of short cut methods which implicitly create a wxDataViewColumn and a wxDataViewRenderer for it (see below). */ virtual bool AppendColumn(wxDataViewColumn* col); + /** + Prepends a wxDataViewColumn to the control. Returns @true on success. + Note that there is a number of short cut methods which implicitly create + a wxDataViewColumn and a wxDataViewRenderer for it. + */ + virtual bool PrependColumn(wxDataViewColumn* col); + + /** + Inserts a wxDataViewColumn to the control. Returns @true on success. + */ + virtual bool InsertColumn(unsigned int pos, wxDataViewColumn* col); + //@{ /** Appends a column for rendering a bitmap. Returns the wxDataViewColumn @@ -1032,7 +1018,7 @@ public: information. @library{wxbase} - @category{FIXME} + @category{dvc} */ class wxDataViewModelNotifier { @@ -1055,7 +1041,7 @@ public: /** Get owning wxDataViewModel. */ - wxDataViewModel* GetOwner(); + wxDataViewModel* GetOwner() const; /** Called by owning model. @@ -1125,11 +1111,6 @@ public: wxDataViewDateRenderer. wxDataViewSpinRenderer. - Note that the @e alignment parameter is ignored under OS X and - the alignment is controlled by wxDataViewColumn::GetAlignment() - so that under OS X, column header alignment and column content - alignment are always the same and cannot be set independently. - Additionally, the user can write own renderers by deriving from wxDataViewCustomRenderer. @@ -1168,7 +1149,7 @@ public: @library{wxadv} - @category{FIXME} + @category{dvc} */ class wxDataViewRenderer : public wxObject { @@ -1178,10 +1159,10 @@ public: */ wxDataViewRenderer(const wxString& varianttype, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, - int align = wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL); + int align = wxDVR_DEFAULT_ALIGNMENT ); /** - Returns the alignment. + Returns the alignment. See SetAlignment() */ virtual int GetAlignment() const; @@ -1193,7 +1174,7 @@ public: /** Returns pointer to the owning wxDataViewColumn. */ - virtual wxDataViewColumn* GetOwner(); + virtual wxDataViewColumn* GetOwner() const; /** This methods retrieves the value from the renderer in order to @@ -1209,7 +1190,12 @@ public: virtual wxString GetVariantType(); /** - Sets the alignment. + Sets the alignment of the renderer's content. The default value + of wxDVR_DEFAULT_ALIGMENT indicates that the content should + have the same alignment as the column header. The method is + not implemented under OS X and the renderer always aligns its + contents as the column header on that platform. The other platforms + support both vertical and horizontal alignment. */ virtual void SetAlignment( int align ); /** @@ -1248,7 +1234,7 @@ public: in-place editing if desired. @library{wxadv} - @category{FIXME} + @category{dvc} */ class wxDataViewTextRenderer : public wxDataViewRenderer { @@ -1263,6 +1249,33 @@ public: +/** + @class wxDataViewIconTextRenderer + @wxheader{dataview.h} + + The wxDataViewIconTextRenderer class is used to display text with + a small icon next to it as it is typically done in a file manager. + This classes uses the wxDataViewIconText + helper class to store its data. wxDataViewIonText can be converted + to a from a wxVariant using the left shift + operator. + + @library{wxadv} + @category{dvc} +*/ +class wxDataViewIconTextRenderer : public wxDataViewRenderer +{ +public: + /** + + */ + wxDataViewIconTextRenderer(const wxString& varianttype = "wxDataViewIconText", + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); +}; + + + /** @class wxDataViewProgressRenderer @wxheader{dataview.h} @@ -1270,7 +1283,7 @@ public: wxDataViewProgressRenderer @library{wxadv} - @category{FIXME} + @category{dvc} */ class wxDataViewProgressRenderer : public wxDataViewRenderer { @@ -1295,7 +1308,7 @@ public: The renderer only support variants of type @e long. @library{wxbase} - @category{FIXME} + @category{dvc} */ class wxDataViewSpinRenderer : public wxDataViewCustomRenderer { @@ -1318,7 +1331,7 @@ public: wxDataViewToggleRenderer @library{wxadv} - @category{FIXME} + @category{dvc} */ class wxDataViewToggleRenderer : public wxDataViewRenderer { @@ -1339,7 +1352,7 @@ public: wxDataViewDateRenderer @library{wxadv} - @category{FIXME} + @category{dvc} */ class wxDataViewDateRenderer : public wxDataViewRenderer { @@ -1365,7 +1378,7 @@ public: wxDataViewItemAttr. @library{wxadv} - @category{FIXME} + @category{dvc} */ class wxDataViewTextRendererAttr : public wxDataViewTextRenderer { @@ -1379,6 +1392,7 @@ public: }; + /** @class wxDataViewCustomRenderer @wxheader{dataview.h} @@ -1400,7 +1414,7 @@ public: in order to end the editing. @library{wxadv} - @category{FIXME} + @category{dvc} */ class wxDataViewCustomRenderer : public wxDataViewRenderer { @@ -1504,7 +1518,7 @@ public: wxDataViewBitmapRenderer @library{wxadv} - @category{FIXME} + @category{dvc} */ class wxDataViewBitmapRenderer : public wxDataViewRenderer { @@ -1519,7 +1533,6 @@ public: - /** @class wxDataViewColumn @wxheader{dataview.h} @@ -1532,7 +1545,7 @@ public: this class to render its data. @library{wxadv} - @category{FIXME} + @category{dvc} */ class wxDataViewColumn : public wxObject { @@ -1574,7 +1587,7 @@ public: /** Returns the owning wxDataViewCtrl. */ - wxDataViewCtrl* GetOwner(); + wxDataViewCtrl* GetOwner() const; /** Returns the renderer of this wxDataViewColumn. @@ -1660,8 +1673,8 @@ public: to the wxDataViewCtrl class simpler. @library{wxbase} - @category{ctrl} - @appearance{dataviewtreectrl.png} + @category{ctrl,dvc} + */ class wxDataViewTreeCtrl : public wxDataViewCtrl { @@ -1851,7 +1864,7 @@ public: This comes at the price of much reduced flexibility. @library{wxadv} - @category{FIXME} + @category{dvc} */ class wxDataViewTreeStore : public wxDataViewModel { @@ -1982,5 +1995,3 @@ public: void SetItemIcon(const wxDataViewItem& item, const wxIcon& icon); }; - -