From f4647740bb001b5855b29ce7ff179a6c8cff1640 Mon Sep 17 00:00:00 2001
From: Robert Roebling <robert@roebling.de>
Date: Sun, 18 Nov 2007 11:07:33 +0000
Subject: [PATCH] document attributes mechanism

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/classes.tex                |  1 +
 docs/latex/wx/dataviewindexlistmodel.tex | 10 +++++
 docs/latex/wx/dataviewitemattr.tex       | 54 ++++++++++++++++++++++++
 docs/latex/wx/dataviewmodel.tex          | 10 +++++
 docs/latex/wx/dataviewrenderer.tex       | 45 +++++++++++++++++---
 5 files changed, 113 insertions(+), 7 deletions(-)
 create mode 100644 docs/latex/wx/dataviewitemattr.tex

diff --git a/docs/latex/wx/classes.tex b/docs/latex/wx/classes.tex
index b60a009921..e19606d4bc 100644
--- a/docs/latex/wx/classes.tex
+++ b/docs/latex/wx/classes.tex
@@ -88,6 +88,7 @@
 \input dataviewmodel.tex
 \input dataviewindexlistmodel.tex
 \input dataviewitem.tex
+\input dataviewitemattr.tex
 \input dataviewrenderer.tex
 \input dataviewtreestore.tex
 \input dobjcomp.tex
diff --git a/docs/latex/wx/dataviewindexlistmodel.tex b/docs/latex/wx/dataviewindexlistmodel.tex
index f2140020e4..6865386f2f 100644
--- a/docs/latex/wx/dataviewindexlistmodel.tex
+++ b/docs/latex/wx/dataviewindexlistmodel.tex
@@ -38,6 +38,16 @@ Destructor.
 
 Compare method that sorts the items by their index.
 
+\membersection{wxDataViewIndexListModel::GetAttr}\label{wxdataviewindexlistmodelgetattr}
+
+\func{bool}{GetAttr}{\param{unsigned int }{row}, \param{unsigned int }{col}, \param{wxDataViewItemAttr\& }{attr}}
+
+Oberride this to indicate that the row has special font attributes.
+This only affects the 
+\helpref{wxDataViewTextRendererText}{wxdataviewtextrendererattr} renderer.
+
+See also \helpref{wxDataViewItemAttr}{wxdataviewitemattr}.
+
 \membersection{wxDataViewIndexListModel::GetItem}\label{wxdataviewindexlistmodelgetitem}
 
 \constfunc{wxDataViewItem}{GetItem}{\param{unsigned int }{row}}
diff --git a/docs/latex/wx/dataviewitemattr.tex b/docs/latex/wx/dataviewitemattr.tex
new file mode 100644
index 0000000000..838bc76e50
--- /dev/null
+++ b/docs/latex/wx/dataviewitemattr.tex
@@ -0,0 +1,54 @@
+\section{\class{wxDataViewItemAttr}}\label{wxdataviewitemattr}
+
+This class is used to indicate to a \helpref{wxDataViewCtrl}{wxdataviewctrl}
+that a certain \helpref{Item}{wxdataviewitem} has extra font attributes
+for its renderer. For this, it is required to override 
+\helpref{wxDataViewModel::GetAttr}{wxdataviewmodelgetattr}.
+
+Attributes are currently only supported by 
+\helpref{wxDataViewTextRendererText}{wxdataviewtextrendererattr}.
+
+\wxheading{Derived from}
+
+No base class
+
+\wxheading{Include files}
+
+<wx/dataview.h>
+
+\wxheading{Library}
+
+\helpref{wxAdv}{librarieslist}
+
+
+\wxheading{Data structures}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+
+\membersection{wxDataViewItemAttr::wxDataViewItemAttr}\label{wxdataviewitemattrwxdataviewitemattr}
+
+\func{}{wxDataViewItemAttr}{\void}
+
+Constructor.
+
+
+\membersection{wxDataViewItemAttr::SetBold}\label{wxdataviewitemattrsetbold}
+
+\func{void}{SetBold}{\param{bool }{set}}
+
+Call this to indicate that the item shall be displayed in bold text.
+
+\membersection{wxDataViewItemAttr::SetColour}\label{wxdataviewitemattrsetcolour}
+
+\func{void}{SetColour}{\param{const wxColour\& }{colour}}
+
+Call this to indicate that the item shall be displayed with
+that colour.
+
+\membersection{wxDataViewItemAttr::SetItalic}\label{wxdataviewitemattrsetitalic}
+
+\func{void}{SetItalic}{\param{bool }{set}}
+
+Call this to indicate that the item shall be displayed in italic text.
+
diff --git a/docs/latex/wx/dataviewmodel.tex b/docs/latex/wx/dataviewmodel.tex
index 53f09e3b10..7279f240e8 100644
--- a/docs/latex/wx/dataviewmodel.tex
+++ b/docs/latex/wx/dataviewmodel.tex
@@ -138,6 +138,16 @@ Override this for a different sorting behaviour.
 See also \helpref{HasDefaultCompare}{wxdataviewmodelhasdefaultcompare}.
 
 
+\membersection{wxDataViewModel::GetAttr}\label{wxdataviewmodelgetattr}
+
+\func{bool}{GetAttr}{\param{const wxDataViewItem\& }{item}, \param{unsigned int }{col}, \param{wxDataViewItemAttr\& }{attr}}
+
+Oberride this to indicate that the item has special font attributes.
+This only affects the 
+\helpref{wxDataViewTextRendererText}{wxdataviewtextrendererattr} renderer.
+
+See also \helpref{wxDataViewItemAttr}{wxdataviewitemattr}.
+
 \membersection{wxDataViewModel::GetColumnCount}\label{wxdataviewmodelgetcolumncount}
 
 \constfunc{virtual unsigned int}{GetColumnCount}{\void}
diff --git a/docs/latex/wx/dataviewrenderer.tex b/docs/latex/wx/dataviewrenderer.tex
index 46a5b4f0d2..0e4504604f 100644
--- a/docs/latex/wx/dataviewrenderer.tex
+++ b/docs/latex/wx/dataviewrenderer.tex
@@ -7,6 +7,7 @@ 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{wxDataViewTextRendererAttr}{wxdataviewtextrendererattr},
 \helpref{wxDataViewIconTextRenderer}{wxdataviewicontextrenderer},
 \helpref{wxDataViewToggleRenderer}{wxdataviewtogglerenderer},
 \helpref{wxDataViewProgressRenderer}{wxdataviewprogressrenderer},
@@ -160,9 +161,39 @@ in-place editing if desired.
 
 \membersection{wxDataViewTextRenderer::wxDataViewTextRenderer}\label{wxdataviewtextrendererwxdataviewtextrenderer}
 
-\func{}{wxDataViewTextRenderer}{\param{const wxString\& }{varianttype = wxT("string")}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}}
+\func{}{wxDataViewTextRenderer}{\param{const wxString\& }{varianttype = "string"}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}}
 
 
+\section{\class{wxDataViewTextRendererAttr}}\label{wxdataviewtextrendererattr}
+
+The same as \helpref{wxDataViewTextRenderer}{wxdataviewtextrenderer} but with
+support for font attributes. Font attributes are currently only supported
+under GTK+ and MSW.
+
+See also \helpref{wxDataViewModel::GetAttr}{wxdataviewmodelgetattr} and
+\helpref{wxDataViewAttr}{wxdataviewattr}.
+
+\wxheading{Derived from}
+
+\helpref{wxDataViewTextRenderer}{wxdataviewtextrenderer}
+
+\wxheading{Include files}
+
+<wx/dataview.h>
+
+\wxheading{Library}
+
+\helpref{wxAdv}{librarieslist}
+
+\wxheading{Data structures}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+
+\membersection{wxDataViewTextRendererAttr::wxDataViewTextRendererAttr}\label{wxdataviewtextrendererattrwxdataviewtextrendererattr}
+
+\func{}{wxDataViewTextRendererAttr}{\param{const wxString\& }{varianttype = "string"}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{align = wxDVR\_DEFAULT\_ALIGNMENT}}
+
 
 \section{\class{wxDataViewProgressRenderer}}\label{wxdataviewprogressrenderer}
 
@@ -187,7 +218,7 @@ wxDataViewProgressRenderer
 
 \membersection{wxDataViewProgressRenderer::wxDataViewProgressRenderer}\label{wxdataviewprogressrendererwxdataviewprogressrenderer}
 
-\func{}{wxDataViewProgressRenderer}{\param{const wxString\& }{label = wxEmptyString}, \param{const wxString\& }{varianttype = wxT("long")}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}}
+\func{}{wxDataViewProgressRenderer}{\param{const wxString\& }{label = wxEmptyString}, \param{const wxString\& }{varianttype = long"}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}}
 
 
 \section{\class{wxDataViewIconText}}\label{wxdataviewicontext}
@@ -264,7 +295,7 @@ operator.
 
 \membersection{wxDataViewIconTextRenderer::wxDataViewIconTextRenderer}\label{wxdataviewtogglerendererwxdataviewicontextrenderer}
 
-\func{}{wxDataViewIconTextRenderer}{\param{const wxString\& }{varianttype = wxT("wxDataViewIconText")}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}}
+\func{}{wxDataViewIconTextRenderer}{\param{const wxString\& }{varianttype = "wxDataViewIconText"}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}}
 
 
 \section{\class{wxDataViewToggleRenderer}}\label{wxdataviewtogglerenderer}
@@ -289,7 +320,7 @@ wxDataViewToggleRenderer
 
 \membersection{wxDataViewToggleRenderer::wxDataViewToggleRenderer}\label{wxdataviewtogglerendererwxdataviewtogglerenderer}
 
-\func{}{wxDataViewToggleRenderer}{\param{const wxString\& }{varianttype = wxT("bool")}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}}
+\func{}{wxDataViewToggleRenderer}{\param{const wxString\& }{varianttype = "bool"}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}}
 
 
 \section{\class{wxDataViewBitmapRenderer}}\label{wxdataviewbitmaprenderer}
@@ -314,7 +345,7 @@ wxDataViewBitmapRenderer
 
 \membersection{wxDataViewBitmapRenderer::wxDataViewBitmapRenderer}\label{wxdataviewbitmaprendererwxdataviewbitmaprenderer}
 
-\func{}{wxDataViewBitmapRenderer}{\param{const wxString\& }{varianttype = wxT("wxBitmap")}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}}
+\func{}{wxDataViewBitmapRenderer}{\param{const wxString\& }{varianttype = "wxBitmap"}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}}
 
 
 \section{\class{wxDataViewDateRenderer}}\label{wxdataviewdaterenderer}
@@ -340,7 +371,7 @@ wxDataViewDateRenderer
 
 \membersection{wxDataViewDateRenderer::wxDataViewDateRenderer}\label{wxdataviewdaterendererwxdataviewdaterenderer}
 
-\func{}{wxDataViewDateRenderer}{\param{const wxString\& }{varianttype = wxT("datetime")}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_ACTIVATABLE}}
+\func{}{wxDataViewDateRenderer}{\param{const wxString\& }{varianttype = "datetime"}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_ACTIVATABLE}}
 
 
 \section{\class{wxDataViewCustomRenderer}}\label{wxdataviewcustomrenderer}
@@ -379,7 +410,7 @@ in order to end the editing.
 
 \membersection{wxDataViewCustomRenderer::wxDataViewCustomRenderer}\label{wxdataviewcustomrendererwxdataviewcustomrenderer}
 
-\func{}{wxDataViewCustomRenderer}{\param{const wxString\& }{varianttype = wxT("string")}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{bool }{no\_init = false}}
+\func{}{wxDataViewCustomRenderer}{\param{const wxString\& }{varianttype = "string"}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{bool }{no\_init = false}}
 
 Constructor.
 
-- 
2.50.0

