X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a7af285d1ab87e908454bfabbbe063ab1756912b..576adedbc01b335f921aaa3254ff805a07ef12f3:/docs/latex/wx/dataviewrenderer.tex diff --git a/docs/latex/wx/dataviewrenderer.tex b/docs/latex/wx/dataviewrenderer.tex index 209887885f..46a5b4f0d2 100644 --- a/docs/latex/wx/dataviewrenderer.tex +++ b/docs/latex/wx/dataviewrenderer.tex @@ -7,10 +7,12 @@ render the individual cells. One instance of a renderer class is owned by \helpref{wxDataViewColumn}{wxdataviewcolumn}. There is a number of ready-to-use renderers provided: \helpref{wxDataViewTextRenderer}{wxdataviewtextrenderer}, +\helpref{wxDataViewIconTextRenderer}{wxdataviewicontextrenderer}, \helpref{wxDataViewToggleRenderer}{wxdataviewtogglerenderer}, \helpref{wxDataViewProgressRenderer}{wxdataviewprogressrenderer}, \helpref{wxDataViewBitmapRenderer}{wxdataviewbitmaprenderer}, \helpref{wxDataViewDateRenderer}{wxdataviewdaterenderer}. +\helpref{wxDataViewSpinRenderer}{wxdataviewspinrenderer}. Additionally, the user can write own renderers by deriving from \helpref{wxDataViewCustomRenderer}{wxdataviewcustomrenderer}. @@ -67,9 +69,12 @@ enum wxDataViewCellRenderState \helpref{wxAdv}{librarieslist} + +\latexignore{\rtfignore{\wxheading{Members}}} + \membersection{wxDataViewRenderer::wxDataViewRenderer}\label{wxdataviewrendererwxdataviewrenderer} -\func{}{wxDataViewRenderer}{\param{const wxString\& }{varianttype}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}} +\func{}{wxDataViewRenderer}{\param{const wxString\& }{varianttype}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{alignment = wxALIGN\_LEFT|wxALIGN\_CENTRE\_VERTICAL}} Constructor. @@ -139,7 +144,8 @@ in-place editing if desired. \wxheading{Derived from} -\helpref{wxDataViewRenderer}{wxdataviewrenderer} +\helpref{wxDataViewRenderer}{wxdataviewrenderer}\\ +\helpref{wxObject}{wxobject} \wxheading{Include files} @@ -150,6 +156,8 @@ in-place editing if desired. \helpref{wxAdv}{librarieslist} +\latexignore{\rtfignore{\wxheading{Members}}} + \membersection{wxDataViewTextRenderer::wxDataViewTextRenderer}\label{wxdataviewtextrendererwxdataviewtextrenderer} \func{}{wxDataViewTextRenderer}{\param{const wxString\& }{varianttype = wxT("string")}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}} @@ -163,7 +171,8 @@ wxDataViewProgressRenderer \wxheading{Derived from} -\helpref{wxDataViewRenderer}{wxdataviewrenderer} +\helpref{wxDataViewRenderer}{wxdataviewrenderer}\\ +\helpref{wxObject}{wxobject} \wxheading{Include files} @@ -174,11 +183,89 @@ wxDataViewProgressRenderer \helpref{wxAdv}{librarieslist} +\latexignore{\rtfignore{\wxheading{Members}}} + \membersection{wxDataViewProgressRenderer::wxDataViewProgressRenderer}\label{wxdataviewprogressrendererwxdataviewprogressrenderer} \func{}{wxDataViewProgressRenderer}{\param{const wxString\& }{label = wxEmptyString}, \param{const wxString\& }{varianttype = wxT("long")}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}} +\section{\class{wxDataViewIconText}}\label{wxdataviewicontext} + +wxDataViewIconText is used by +\helpref{wxDataViewIconTextRenderer}{wxdataviewicontextrenderer} +for data transfer. This class can be converted to a from +a \helpref{wxVariant}{wxvariant}. + +\wxheading{Derived from} + +\helpref{wxObject}{wxobject} + +\wxheading{Include files} + + + +\membersection{wxDataViewIconText::wxDataViewIconText}\label{wxdataviewicontextwxdataviewicontext} + +\func{}{wxDataViewIconText}{\param{const wxString\& }{text = wxEmptyString}, \param{const wxIcon\& }{icon = wxNullIcon}} + +\func{}{wxDataViewIconText}{\param{const wxDataViewIconText\& }{other}} + +Constructor. + +\membersection{wxDataViewIconText::GetIcon}\label{wxdataviewicontextgeticon} + +\constfunc{const wxIcon\&}{GetIcon}{\void} + +Gets the icon. + +\membersection{wxDataViewIconText::GetText}\label{wxdataviewicontextgettext} + +\constfunc{wxString}{GetText}{\void} + +Gets the text. + +\membersection{wxDataViewIconText::SetIcon}\label{wxdataviewicontextseticon} + +\func{void}{SetIcon}{\param{const wxIcon\& }{icon}} + +Set the icon. + +\membersection{wxDataViewIconText::SetText}\label{wxdataviewicontextsettext} + +\func{void}{SetText}{\param{const wxString\& }{text}} + +Set the text. + +\section{\class{wxDataViewIconTextRenderer}}\label{wxdataviewicontextrenderer} + +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 \helpref{wxDataViewIconText}{wxdataviewicontext} +helper class to store its data. wxDataViewIonText can be converted +to a from a \helpref{wxVariant}{wxvariant} using the left shift +operator. + +\wxheading{Derived from} + +\helpref{wxDataViewRenderer}{wxdataviewrenderer}\\ +\helpref{wxObject}{wxobject} + +\wxheading{Include files} + + + +\wxheading{Library} + +\helpref{wxAdv}{librarieslist} + + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxDataViewIconTextRenderer::wxDataViewIconTextRenderer}\label{wxdataviewtogglerendererwxdataviewicontextrenderer} + +\func{}{wxDataViewIconTextRenderer}{\param{const wxString\& }{varianttype = wxT("wxDataViewIconText")}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}} + \section{\class{wxDataViewToggleRenderer}}\label{wxdataviewtogglerenderer} @@ -186,7 +273,8 @@ wxDataViewToggleRenderer \wxheading{Derived from} -\helpref{wxDataViewRenderer}{wxdataviewrenderer} +\helpref{wxDataViewRenderer}{wxdataviewrenderer}\\ +\helpref{wxObject}{wxobject} \wxheading{Include files} @@ -197,6 +285,8 @@ wxDataViewToggleRenderer \helpref{wxAdv}{librarieslist} +\latexignore{\rtfignore{\wxheading{Members}}} + \membersection{wxDataViewToggleRenderer::wxDataViewToggleRenderer}\label{wxdataviewtogglerendererwxdataviewtogglerenderer} \func{}{wxDataViewToggleRenderer}{\param{const wxString\& }{varianttype = wxT("bool")}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}} @@ -208,7 +298,8 @@ wxDataViewBitmapRenderer \wxheading{Derived from} -\helpref{wxDataViewRenderer}{wxdataviewrenderer} +\helpref{wxDataViewRenderer}{wxdataviewrenderer}\\ +\helpref{wxObject}{wxobject} \wxheading{Include files} @@ -219,6 +310,8 @@ wxDataViewBitmapRenderer \helpref{wxAdv}{librarieslist} +\latexignore{\rtfignore{\wxheading{Members}}} + \membersection{wxDataViewBitmapRenderer::wxDataViewBitmapRenderer}\label{wxdataviewbitmaprendererwxdataviewbitmaprenderer} \func{}{wxDataViewBitmapRenderer}{\param{const wxString\& }{varianttype = wxT("wxBitmap")}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}} @@ -231,7 +324,8 @@ wxDataViewDateRenderer \wxheading{Derived from} -\helpref{wxDataViewRenderer}{wxdataviewrenderer} +\helpref{wxDataViewRenderer}{wxdataviewrenderer}\\ +\helpref{wxObject}{wxobject} \wxheading{Include files} @@ -241,6 +335,9 @@ wxDataViewDateRenderer \helpref{wxAdv}{librarieslist} + +\latexignore{\rtfignore{\wxheading{Members}}} + \membersection{wxDataViewDateRenderer::wxDataViewDateRenderer}\label{wxdataviewdaterendererwxdataviewdaterenderer} \func{}{wxDataViewDateRenderer}{\param{const wxString\& }{varianttype = wxT("datetime")}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_ACTIVATABLE}} @@ -266,7 +363,8 @@ in order to end the editing. \wxheading{Derived from} -\helpref{wxDataViewRenderer}{wxdataviewrenderer} +\helpref{wxDataViewRenderer}{wxdataviewrenderer}\\ +\helpref{wxObject}{wxobject} \wxheading{Include files} @@ -276,6 +374,9 @@ in order to end the editing. \helpref{wxAdv}{librarieslist} + +\latexignore{\rtfignore{\wxheading{Members}}} + \membersection{wxDataViewCustomRenderer::wxDataViewCustomRenderer}\label{wxdataviewcustomrendererwxdataviewcustomrenderer} \func{}{wxDataViewCustomRenderer}{\param{const wxString\& }{varianttype = wxT("string")}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{bool }{no\_init = false}} @@ -335,7 +436,7 @@ from the editor control (pointed to by {\it editor}): \membersection{wxDataViewCustomRenderer::Activate}\label{wxdataviewcustomrendereractivate} -\func{virtual bool}{Activate}{\param{wxRect }{cell}, \param{wxDataViewListModel* }{model}, \param{unsigned int }{col}, \param{unsigned int }{row}} +\func{virtual bool}{Activate}{\param{wxRect }{cell}, \param{wxDataViewModel* }{model}, \param{unsigned int }{col}, \param{unsigned int }{row}} Override this to react to double clicks or . @@ -355,7 +456,7 @@ Return size required to show content. \membersection{wxDataViewCustomRenderer::LeftClick}\label{wxdataviewcustomrendererleftclick} -\func{virtual bool}{LeftClick}{\param{wxPoint }{cursor}, \param{wxRect }{cell}, \param{wxDataViewListModel* }{model}, \param{unsigned int }{col}, \param{unsigned int }{row}} +\func{virtual bool}{LeftClick}{\param{wxPoint }{cursor}, \param{wxRect }{cell}, \param{wxDataViewModel* }{model}, \param{unsigned int }{col}, \param{unsigned int }{row}} Overrride this to react to a left click. @@ -367,17 +468,51 @@ Override this to render the cell. Before this is called, \helpref{SetValue}{wxdataviewrenderersetvalue} was called so that this instance knows what to render. +\membersection{wxDataViewCustomRenderer::RenderText}\label{wxdataviewcustomrendererrender} + +\func{bool}{RenderText}{\param{const wxString\& }{text}, \param{int }{xoffset}, \param{wxRect }{cell}, \param{wxDC* }{dc}, \param{int }{state}} + +This method should be called from within \helpref{Render}{wxdataviewcustomrendererrender} +whenever you need to render simple text. This will ensure that the +correct colour, font and vertical alignment will be chosen so the +text will look the same as text drawn by native renderers. + \membersection{wxDataViewCustomRenderer::RightClick}\label{wxdataviewcustomrendererrightclick} -\func{virtual bool}{RightClick}{\param{wxPoint }{cursor}, \param{wxRect }{cell}, \param{wxDataViewListModel* }{model}, \param{unsigned int }{col}, \param{unsigned int }{row}} +\func{virtual bool}{RightClick}{\param{wxPoint }{cursor}, \param{wxRect }{cell}, \param{wxDataViewModel* }{model}, \param{unsigned int }{col}, \param{unsigned int }{row}} Overrride this to react to a right click. \membersection{wxDataViewCustomRenderer::StartDrag}\label{wxdataviewcustomrendererstartdrag} -\func{virtual bool}{StartDrag}{\param{wxPoint }{cursor}, \param{wxRect }{cell}, \param{wxDataViewListModel* }{model}, \param{unsigned int }{col}, \param{unsigned int }{row}} +\func{virtual bool}{StartDrag}{\param{wxPoint }{cursor}, \param{wxRect }{cell}, \param{wxDataViewModel* }{model}, \param{unsigned int }{col}, \param{unsigned int }{row}} Overrride this to start a drag operation. +\section{\class{wxDataViewSpinRenderer}}\label{wxdataviewspinrenderer} + +This is a specialized renderer for rendering integer values. It +supports modifying the values in-place by using a wxSpinCtrl. +The renderer only support variants of type {\it long}. + +\wxheading{Derived from} + +\helpref{wxDataViewCustomRenderer}{wxdataviewcustomrenderer} + +\wxheading{Include files} + + + +\wxheading{Data structures} + +\latexignore{\rtfignore{\wxheading{Members}}} + + +\membersection{wxDataViewSpinRenderer::wxDataViewSpinRenderer}\label{wxdataviewspinrendererwxdataviewspinrenderer} + +\func{}{wxDataViewSpinRenderer}{\param{int }{min}, \param{int }{max}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_EDITABLE}, \param{int }{alignment = wxDVR\_DEFAULT\_ALIGNMENT}} + +Constructor. {\it min} and {\it max} indicate the minimum und +maximum values of for the wxSpinCtrl.