]> git.saurik.com Git - wxWidgets.git/commitdiff
Some documentation enhancements for wxRichTextCtrl
authorJulian Smart <julian@anthemion.co.uk>
Thu, 9 Nov 2006 20:22:33 +0000 (20:22 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 9 Nov 2006 20:22:33 +0000 (20:22 +0000)
Comment fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 files changed:
docs/latex/wx/richtextattr.tex
docs/latex/wx/richtextctrl.tex
docs/latex/wx/richtextfilehandler.tex
docs/latex/wx/richtexthtmlhandler.tex
docs/latex/wx/richtextoverview.tex
docs/latex/wx/richtextstyledefinition.tex
docs/latex/wx/richtextstylelistbox.tex
docs/latex/wx/richtextstylesheet.tex
docs/latex/wx/richtextxmlhandler.tex
docs/latex/wx/textattrex.tex
include/wx/richtext/richtextstyles.h
src/richtext/richtextxml.cpp

index ecb81e1146bac711707439fc7032ba35f8234e4a..2c3631d44a2c4892d80f4cc19dea49e4818408e1 100644 (file)
@@ -7,9 +7,9 @@ standard \helpref{wxTextAttr}{wxtextattr} class with wxRichTextCtrl.
 
 When setting up a wxRichTextAttr object, pass a bitlist mask to \helpref{SetFlags}{wxrichtextattrsetflags} to
 indicate which style elements should be changed. As a convenience, when you call a setter such
 
 When setting up a wxRichTextAttr object, pass a bitlist mask to \helpref{SetFlags}{wxrichtextattrsetflags} to
 indicate which style elements should be changed. As a convenience, when you call a setter such
-s SetFont, the relevant bit will be set.
+as SetFont, the relevant bit will be set.
 
 
-wxRichTextAttr stores attributes without a wxFont object, so is a much more
+wxRichTextAttr stores attributes without a wxFont object, so is a more
 efficient way to query styles than using a \helpref{wxTextAttr}{wxtextattr} or \helpref{wxTextAttrEx}{wxtextattrex} object.
 
 \wxheading{Derived from}
 efficient way to query styles than using a \helpref{wxTextAttr}{wxtextattr} or \helpref{wxTextAttrEx}{wxtextattrex} object.
 
 \wxheading{Derived from}
@@ -22,7 +22,7 @@ No base class
 
 \wxheading{Constants}
 
 
 \wxheading{Constants}
 
-The following values can be passed to SetAlignment to determine
+The following values can be passed to wxRichTextAttr::SetAlignment to determine
 paragraph alignment.
 
 {\small
 paragraph alignment.
 
 {\small
@@ -39,7 +39,10 @@ enum wxTextAttrAlignment
 \end{verbatim}
 }
 
 \end{verbatim}
 }
 
-These values are passed in a bitlist to SetFlags to determine
+Of these, wxTEXT\_ALIGNMENT\_JUSTIFIED is unimplemented. In future justification may be supported
+when printing or previewing, only.
+
+The following values are passed in a bitlist to wxRichTextAttr::SetFlags to determine
 what attributes will be considered when setting the attributes
 for a text control.
 
 what attributes will be considered when setting the attributes
 for a text control.
 
@@ -47,20 +50,20 @@ for a text control.
 \begin{verbatim}
 // Standard wxTextAttr constants
 
 \begin{verbatim}
 // Standard wxTextAttr constants
 
-#define wxTEXT_ATTR_TEXT_COLOUR             0x0001
-#define wxTEXT_ATTR_BACKGROUND_COLOUR       0x0002
-#define wxTEXT_ATTR_FONT_FACE               0x0004
-#define wxTEXT_ATTR_FONT_SIZE               0x0008
-#define wxTEXT_ATTR_FONT_WEIGHT             0x0010
-#define wxTEXT_ATTR_FONT_ITALIC             0x0020
-#define wxTEXT_ATTR_FONT_UNDERLINE          0x0040
+#define wxTEXT_ATTR_TEXT_COLOUR             0x00000001
+#define wxTEXT_ATTR_BACKGROUND_COLOUR       0x00000002
+#define wxTEXT_ATTR_FONT_FACE               0x00000004
+#define wxTEXT_ATTR_FONT_SIZE               0x00000008
+#define wxTEXT_ATTR_FONT_WEIGHT             0x00000010
+#define wxTEXT_ATTR_FONT_ITALIC             0x00000020
+#define wxTEXT_ATTR_FONT_UNDERLINE          0x00000040
 #define wxTEXT_ATTR_FONT \
   wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT \
 | wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE
 #define wxTEXT_ATTR_FONT \
   wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT \
 | wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE
-#define wxTEXT_ATTR_ALIGNMENT               0x0080
-#define wxTEXT_ATTR_LEFT_INDENT             0x0100
-#define wxTEXT_ATTR_RIGHT_INDENT            0x0200
-#define wxTEXT_ATTR_TABS                    0x0400
+#define wxTEXT_ATTR_ALIGNMENT               0x00000080
+#define wxTEXT_ATTR_LEFT_INDENT             0x00000100
+#define wxTEXT_ATTR_RIGHT_INDENT            0x00000200
+#define wxTEXT_ATTR_TABS                    0x00000400
 
 // Extra formatting flags not in wxTextAttr
 
 
 // Extra formatting flags not in wxTextAttr
 
@@ -76,6 +79,7 @@ for a text control.
 #define wxTEXT_ATTR_BULLET_NAME             0x00100000
 #define wxTEXT_ATTR_URL                     0x00200000
 #define wxTEXT_ATTR_PAGE_BREAK              0x00400000
 #define wxTEXT_ATTR_BULLET_NAME             0x00100000
 #define wxTEXT_ATTR_URL                     0x00200000
 #define wxTEXT_ATTR_PAGE_BREAK              0x00400000
+#define wxTEXT_ATTR_EFFECTS                 0x00800000
 \end{verbatim}
 }
 
 \end{verbatim}
 }
 
@@ -102,6 +106,8 @@ The following styles can be passed to wxRichTextAttr::SetBulletStyle:
 \end{verbatim}
 }
 
 \end{verbatim}
 }
 
+Of these, wxTEXT\_ATTR\_BULLET\_STYLE\_BITMAP is unimplemented.
+
 The following constants can be passed to wxRichTextAttr::SetLineSpacing:
 
 {\small
 The following constants can be passed to wxRichTextAttr::SetLineSpacing:
 
 {\small
@@ -112,6 +118,26 @@ The following constants can be passed to wxRichTextAttr::SetLineSpacing:
 \end{verbatim}
 }
 
 \end{verbatim}
 }
 
+The following styles can be passed to wxTextAttrEx::SetTextEffects:
+
+{\small
+\begin{verbatim}
+#define wxTEXT_ATTR_EFFECT_NONE                     0x00000000
+#define wxTEXT_ATTR_EFFECT_CAPITALS                 0x00000001
+#define wxTEXT_ATTR_EFFECT_SMALL_CAPITALS           0x00000002
+#define wxTEXT_ATTR_EFFECT_STRIKETHROUGH            0x00000004
+#define wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH     0x00000008
+#define wxTEXT_ATTR_EFFECT_SHADOW                   0x00000010
+#define wxTEXT_ATTR_EFFECT_EMBOSS                   0x00000020
+#define wxTEXT_ATTR_EFFECT_OUTLINE                  0x00000040
+#define wxTEXT_ATTR_EFFECT_ENGRAVE                  0x00000080
+#define wxTEXT_ATTR_EFFECT_SUPERSCRIPT              0x00000100
+#define wxTEXT_ATTR_EFFECT_SUBSCRIPT                0x00000200
+\end{verbatim}
+}
+
+Of these, only wxTEXT\_ATTR\_EFFECT\_CAPITALS and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH are implemented.
+
 \wxheading{See also}
 
 \helpref{wxTextAttr}{wxtextattr}, \helpref{wxTextAttrEx}{wxtextattrex}, \helpref{wxRichTextCtrl}{wxrichtextctrl}
 \wxheading{See also}
 
 \helpref{wxTextAttr}{wxtextattr}, \helpref{wxTextAttrEx}{wxtextattrex}, \helpref{wxRichTextCtrl}{wxrichtextctrl}
@@ -308,6 +334,19 @@ is measured from the left margin and therefore each value must be larger than th
 
 Returns the text foreground colour.
 
 
 Returns the text foreground colour.
 
+\membersection{wxRichTextAttr::GetTextEffectFlags}\label{wxrichtextattrgettexteffectflags}
+
+\constfunc{int}{GetTextEffectFlags}{\void}
+
+Returns the text effect bits of interest. See \helpref{wxRichTextAttr::SetFlags}{wxrichtextattrsetflags} for further information.
+
+\membersection{wxRichTextAttr::GetTextEffects}\label{wxrichtextattrgettexteffects}
+
+\constfunc{int}{GetTextEffects}{\void}
+
+Returns the text effects, a bit list of styles. See \helpref{wxRichTextAttr::SetTextEffects}{wxrichtextattrsettexteffects} for
+details.
+
 \membersection{wxRichTextAttr::GetURL}\label{wxrichtextattrgeturl}
 
 \constfunc{const wxString\&}{GetURL}{\void}
 \membersection{wxRichTextAttr::GetURL}\label{wxrichtextattrgeturl}
 
 \constfunc{const wxString\&}{GetURL}{\void}
@@ -507,6 +546,9 @@ enum wxTextAttrAlignment
 \end{verbatim}
 }
 
 \end{verbatim}
 }
 
+Of these, wxTEXT\_ALIGNMENT\_JUSTIFIED is unimplemented. In future justification may be supported
+when printing or previewing, only.
+
 \membersection{wxRichTextAttr::SetBackgroundColour}\label{wxrichtextattrsetbackgroundcolour}
 
 \func{void}{SetBackgroundColour}{\param{const wxColour\& }{colBack}}
 \membersection{wxRichTextAttr::SetBackgroundColour}\label{wxrichtextattrsetbackgroundcolour}
 
 \func{void}{SetBackgroundColour}{\param{const wxColour\& }{colBack}}
@@ -561,6 +603,8 @@ Sets the bullet style. The following styles can be passed:
 \end{verbatim}
 }
 
 \end{verbatim}
 }
 
+Currently wxTEXT\_ATTR\_BULLET\_STYLE\_BITMAP is not supported.
+
 \membersection{wxRichTextAttr::SetBulletText}\label{wxrichtextattrsetbullettext}
 
 \func{void}{SetBulletText}{\param{const wxString& }{text}}
 \membersection{wxRichTextAttr::SetBulletText}\label{wxrichtextattrsetbullettext}
 
 \func{void}{SetBulletText}{\param{const wxString& }{text}}
@@ -584,20 +628,20 @@ flags can be passed in a bitlist:
 \begin{verbatim}
 // Standard wxTextAttr constants
 
 \begin{verbatim}
 // Standard wxTextAttr constants
 
-#define wxTEXT_ATTR_TEXT_COLOUR             0x0001
-#define wxTEXT_ATTR_BACKGROUND_COLOUR       0x0002
-#define wxTEXT_ATTR_FONT_FACE               0x0004
-#define wxTEXT_ATTR_FONT_SIZE               0x0008
-#define wxTEXT_ATTR_FONT_WEIGHT             0x0010
-#define wxTEXT_ATTR_FONT_ITALIC             0x0020
-#define wxTEXT_ATTR_FONT_UNDERLINE          0x0040
+#define wxTEXT_ATTR_TEXT_COLOUR             0x00000001
+#define wxTEXT_ATTR_BACKGROUND_COLOUR       0x00000002
+#define wxTEXT_ATTR_FONT_FACE               0x00000004
+#define wxTEXT_ATTR_FONT_SIZE               0x00000008
+#define wxTEXT_ATTR_FONT_WEIGHT             0x00000010
+#define wxTEXT_ATTR_FONT_ITALIC             0x00000020
+#define wxTEXT_ATTR_FONT_UNDERLINE          0x00000040
 #define wxTEXT_ATTR_FONT \
   wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT \
 | wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE
 #define wxTEXT_ATTR_FONT \
   wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT \
 | wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE
-#define wxTEXT_ATTR_ALIGNMENT               0x0080
-#define wxTEXT_ATTR_LEFT_INDENT             0x0100
-#define wxTEXT_ATTR_RIGHT_INDENT            0x0200
-#define wxTEXT_ATTR_TABS                    0x0400
+#define wxTEXT_ATTR_ALIGNMENT               0x00000080
+#define wxTEXT_ATTR_LEFT_INDENT             0x00000100
+#define wxTEXT_ATTR_RIGHT_INDENT            0x00000200
+#define wxTEXT_ATTR_TABS                    0x00000400
 
 // Extra formatting flags not in wxTextAttr
 
 
 // Extra formatting flags not in wxTextAttr
 
@@ -612,6 +656,8 @@ flags can be passed in a bitlist:
 #define wxTEXT_ATTR_BULLET_TEXT             0x00080000
 #define wxTEXT_ATTR_BULLET_NAME             0x00100000
 #define wxTEXT_ATTR_URL                     0x00200000
 #define wxTEXT_ATTR_BULLET_TEXT             0x00080000
 #define wxTEXT_ATTR_BULLET_NAME             0x00100000
 #define wxTEXT_ATTR_URL                     0x00200000
+#define wxTEXT_ATTR_PAGE_BREAK              0x00400000
+#define wxTEXT_ATTR_EFFECTS                 0x00800000
 \end{verbatim}
 }
 
 \end{verbatim}
 }
 
@@ -726,6 +772,45 @@ Each stop is measured from the left margin and therefore each value must be larg
 
 Sets the text foreground colout.
 
 
 Sets the text foreground colout.
 
+\membersection{wxRichTextAttr::SetTextEffectFlags}\label{wxrichtextattrsettexteffectflags}
+
+\func{void}{SetTextEffectFlags}{\param{int }{flags}}
+
+Sets the text effect bits of interest. You should also pass wxTEXT\_ATTR\_EFFECTS to \helpref{wxRichTextAttr::SetFlags}{wxrichtextattrsetflags}.
+See \helpref{wxRichTextAttr::SetFlags}{wxrichtextattrsetflags} for further information.
+
+\membersection{wxRichTextAttr::SetTextEffects}\label{wxrichtextattrsettexteffects}
+
+\func{void}{SetTextEffects}{\param{int }{effects}}
+
+Sets the text effects, a bit list of styles.
+
+The following styles can be passed:
+
+{\small
+\begin{verbatim}
+#define wxTEXT_ATTR_EFFECT_NONE                     0x00000000
+#define wxTEXT_ATTR_EFFECT_CAPITALS                 0x00000001
+#define wxTEXT_ATTR_EFFECT_SMALL_CAPITALS           0x00000002
+#define wxTEXT_ATTR_EFFECT_STRIKETHROUGH            0x00000004
+#define wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH     0x00000008
+#define wxTEXT_ATTR_EFFECT_SHADOW                   0x00000010
+#define wxTEXT_ATTR_EFFECT_EMBOSS                   0x00000020
+#define wxTEXT_ATTR_EFFECT_OUTLINE                  0x00000040
+#define wxTEXT_ATTR_EFFECT_ENGRAVE                  0x00000080
+#define wxTEXT_ATTR_EFFECT_SUPERSCRIPT              0x00000100
+#define wxTEXT_ATTR_EFFECT_SUBSCRIPT                0x00000200
+\end{verbatim}
+}
+
+Of these, only wxTEXT\_ATTR\_EFFECT\_CAPITALS and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH are implemented.
+wxTEXT\_ATTR\_EFFECT\_CAPITALS capitalises text when displayed (leaving the case of the actual buffer
+text unchanged), and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH draws a line through text.
+
+To set effects, you should also pass wxTEXT\_ATTR\_EFFECTS to \helpref{wxRichTextAttr::SetFlags}{wxrichtextattrsetflags}, and call\rtfsp
+\helpref{wxRichTextAttr::SetTextEffectFlags}{wxrichtextattrsettexteffectflags} with the styles (taken from the
+above set) that you are interested in setting.
+
 \membersection{wxRichTextAttr::SetURL}\label{wxrichtextattrseturl}
 
 \func{void}{SetURL}{\param{const wxString\& }{url}}
 \membersection{wxRichTextAttr::SetURL}\label{wxrichtextattrseturl}
 
 \func{void}{SetURL}{\param{const wxString\& }{url}}
index b3d4787647aa09ea5b8a77640a49806654b29b41..87b3b88e0a6e1a5734aca9814709f1c30e06076a 100644 (file)
@@ -19,7 +19,9 @@ wxTextCtrlBase
 
 \func{}{wxRichTextCtrl}{\void}
 
 
 \func{}{wxRichTextCtrl}{\void}
 
-\func{}{wxRichTextCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxString\& }{value = wxEmptyString}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxRE\_MULTILINE}}
+\func{}{wxRichTextCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxString\& }{value = wxEmptyString},
+ \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxRE\_MULTILINE},
+ \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = wxTextCtrlNameStr}}
 
 Constructors.
 
 
 Constructors.
 
@@ -345,7 +347,9 @@ Copies the selected content (if any) to the clipboard.
 
 \membersection{wxRichTextCtrl::Create}\label{wxrichtextctrlcreate}
 
 
 \membersection{wxRichTextCtrl::Create}\label{wxrichtextctrlcreate}
 
-\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxString\& }{value = wxEmptyString}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxRE\_MULTILINE}}
+\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxString\& }{value = wxEmptyString},
+ \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxRE\_MULTILINE},
+ \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = wxTextCtrlNameStr}}
 
 Creates the underlying window.
 
 
 Creates the underlying window.
 
@@ -591,6 +595,13 @@ Gets the current filename associated with the control.
 
 Returns the first visible position in the current view.
 
 
 Returns the first visible position in the current view.
 
+\membersection{wxRichTextCtrl::GetHandlerFlags}\label{wxrichtextfilehandlergethandlerflags}
+
+\constfunc{int}{GetHandlerFlags}{\void}
+
+Returns flags that change the behaviour of loading or saving. See the documentation for each
+handler class to see what flags are relevant for each handler.
+
 \membersection{wxRichTextCtrl::GetInsertionPoint}\label{wxrichtextctrlgetinsertionpoint}
 
 \constfunc{long}{GetInsertionPoint}{\void}
 \membersection{wxRichTextCtrl::GetInsertionPoint}\label{wxrichtextctrlgetinsertionpoint}
 
 \constfunc{long}{GetInsertionPoint}{\void}
@@ -1271,6 +1282,13 @@ Sets the current filename.
 
 Sets the font, and also the basic and default attributes (see \helpref{SetDefaultStyle}{wxrichtextctrlsetdefaultstyle}).
 
 
 Sets the font, and also the basic and default attributes (see \helpref{SetDefaultStyle}{wxrichtextctrlsetdefaultstyle}).
 
+\membersection{wxRichTextCtrl::SetHandlerFlags}\label{wxrichtextctrlsethandlerflags}
+
+\func{void}{SetHandlerFlags}{\param{int }{flags}}
+
+Sets flags that change the behaviour of loading or saving. See the documentation for each
+handler class to see what flags are relevant for each handler.
+
 \membersection{wxRichTextCtrl::SetInsertionPoint}\label{wxrichtextctrlsetinsertionpoint}
 
 \func{void}{SetInsertionPoint}{\param{long }{pos}}
 \membersection{wxRichTextCtrl::SetInsertionPoint}\label{wxrichtextctrlsetinsertionpoint}
 
 \func{void}{SetInsertionPoint}{\param{long }{pos}}
index d97d817329f24ddd039249b2e95858d8a1361e08..ced20085855da2ac9656a7de0ae73d94533ebffd 100644 (file)
@@ -64,6 +64,13 @@ Returns the encoding associated with the handler (if any).
 
 Returns the extension associated with the handler.
 
 
 Returns the extension associated with the handler.
 
+\membersection{wxRichTextFileHandler::GetFlags}\label{wxrichtextfilehandlergetflags}
+
+\constfunc{int}{GetFlags}{\void}
+
+Returns flags that change the behaviour of loading or saving. See the documentation for each
+handler class to see what flags are relevant for each handler.
+
 \membersection{wxRichTextFileHandler::GetName}\label{wxrichtextfilehandlergetname}
 
 \constfunc{wxString}{GetName}{\void}
 \membersection{wxRichTextFileHandler::GetName}\label{wxrichtextfilehandlergetname}
 
 \constfunc{wxString}{GetName}{\void}
@@ -110,6 +117,18 @@ Sets the encoding to use when saving a file. If empty, a suitable encoding is ch
 
 Sets the default extension to recognise.
 
 
 Sets the default extension to recognise.
 
+\membersection{wxRichTextFileHandler::SetFlags}\label{wxrichtextfilehandlersetflags}
+
+\func{void}{SetFlags}{\param{int }{flags}}
+
+Sets flags that change the behaviour of loading or saving. See the documentation for each
+handler class to see what flags are relevant for each handler.
+
+You call this function directly if you are using a file handler explicitly (without
+going through the text control or buffer LoadFile/SaveFile API). Or, you can
+call the control or buffer's SetHandlerFlags function to set the flags that will
+be used for subsequent load and save operations.
+
 \membersection{wxRichTextFileHandler::SetName}\label{wxrichtextfilehandlersetname}
 
 \func{void}{SetName}{\param{const wxString\& }{name}}
 \membersection{wxRichTextFileHandler::SetName}\label{wxrichtextfilehandlersetname}
 
 \func{void}{SetName}{\param{const wxString\& }{name}}
index 02cea9151b85fc9d463d34eab06dc26a5408fa7a..e98a92842192bc019a588df120aa78c4d2659d56 100644 (file)
@@ -2,6 +2,35 @@
 
 Handles HTML output (only) for \helpref{wxRichTextCtrl}{wxrichtextctrl} content.
 
 
 Handles HTML output (only) for \helpref{wxRichTextCtrl}{wxrichtextctrl} content.
 
+The most flexible way to use this class is to create a temporary object and call
+its functions directly, rather than use \helpref{wxRichTextBuffer::SaveFile}{wxrichtextbuffersavefile} or\rtfsp
+\helpref{wxRichTextCtrl::SaveFile}{wxrichtextctrlsavefile}.
+
+Image handling requires a little extra work from the application, to choose an
+appropriate image format for the target HTML viewer and to clean up the temporary images
+later. If you are planning to load the HTML into a standard web browser, you can
+specify the handler flag wxRICHTEXT\_HANDLER\_SAVE\_IMAGES\_TO\_BASE64 (the default)
+and no extra work is required: the images will be written with the HTML.
+
+However, if you want wxHTML compatibility, you will need to use wxRICHTEXT\_HANDLER\_SAVE\_IMAGES\_TO\_MEMORY
+or wxRICHTEXT\_HANDLER\_SAVE\_IMAGES\_TO\_FILES. In this case, you must either call \helpref{DeleteTemporaryImages}{wxrichtexthtmlhandlerdeletetemporaryimages} before
+the next load operation, or you must store the image
+locations and delete them yourself when appropriate. You can call \helpref{GetTemporaryImageLocations}{wxrichtexthtmlhandlergettemporaryimagelocations} to
+get the array of temporary image names.
+
+\wxheading{Handler flags}
+
+The following flags can be used with this handler, via
+the handler's SetFlags function or the buffer or control's
+SetHandlerFlags function:
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{\windowstyle{wxRICHTEXT\_HANDLER\_SAVE\_IMAGES\_TO\_MEMORY}}{Images are saved to the memory filesystem: suitable for showing wxHTML windows.}
+\twocolitem{\windowstyle{wxRICHTEXT\_HANDLER\_SAVE\_IMAGES\_TO\_FILES}}{Images are saved to temporary files: suitable for showing in wxHTML windows.}
+\twocolitem{\windowstyle{wxRICHTEXT\_HANDLER\_SAVE\_IMAGES\_TO\_BASE64}}{Images are written with the HTML files in Base 64 format: suitable for showing in web browsers.}
+\end{twocollist}
+
 \wxheading{Derived from}
 
 \helpref{wxRichTextFileHandler}{wxrichtextfilehandler}
 \wxheading{Derived from}
 
 \helpref{wxRichTextFileHandler}{wxrichtextfilehandler}
@@ -20,9 +49,58 @@ Handles HTML output (only) for \helpref{wxRichTextCtrl}{wxrichtextctrl} content.
 
 Constructor.
 
 
 Constructor.
 
+\membersection{wxRichTextHTMLHandler::ClearTemporaryImageLocations}\label{wxrichtexthtmlhandlercleartemporaryimagelocations}
+
+\func{void}{ClearTemporaryImageLocations}{\void}
+
+Clears the image locations generated by the last operation.
+
+\membersection{wxRichTextHTMLHandler::DeleteTemporaryImages}\label{wxrichtexthtmlhandlerdeletetemporaryimages}
+
+\func{bool}{DeleteTemporaryImages}{\void}
+
+Deletes the in-memory or temporary files generated by the last operation.
+
+\func{bool}{DeleteTemporaryImages}{\param{int }{flags}, \param{const wxArrayString\& }{imageLocations}}
+
+Delete the in-memory or temporary files generated by the last operation. This is a static
+function that can be used to delete the saved locations from an earlier operation,
+for example after the user has viewed the HTML file.
+
 \membersection{wxRichTextHTMLHandler::DoSaveFile}\label{wxrichtexthtmlhandlerdosavefile}
 
 \func{bool}{DoSaveFile}{\param{wxRichTextBuffer* }{buffer}, \param{wxOutputStream\& }{stream}}
 
 Saves the buffer content to the HTML stream.
 
 \membersection{wxRichTextHTMLHandler::DoSaveFile}\label{wxrichtexthtmlhandlerdosavefile}
 
 \func{bool}{DoSaveFile}{\param{wxRichTextBuffer* }{buffer}, \param{wxOutputStream\& }{stream}}
 
 Saves the buffer content to the HTML stream.
 
+\membersection{wxRichTextHTMLHandler::GetTempDir}\label{wxrichtexthtmlhandlergettempdir}
+
+\constfunc{const wxString\&}{GetTempDir}{\void}
+
+Returns the directory used to store temporary image files.
+
+\membersection{wxRichTextHTMLHandler::GetTemporaryImageLocations}\label{wxrichtexthtmlhandlergettemporaryimagelocations}
+
+\constfunc{const wxArrayString\&}{GetTemporaryImageLocations}{\void}
+
+Returns the image locations for the last operation.
+
+\membersection{wxRichTextHTMLHandler::SetFileCounter}\label{wxrichtexthtmlhandlersetfilecounter}
+
+\func{void}{SetFileCounter}{\param{int }{counter}}
+
+Reset the file counter, in case, for example, the same names are required each time
+
+\membersection{wxRichTextHTMLHandler::SetTempDir}\label{wxrichtexthtmlhandlersettempdir}
+
+\func{void}{SetTempDir}{\param{const wxString\& }{tempDir}}
+
+Sets the directory for storing temporary files. If empty, the system
+temporary directory will be used.
+
+\membersection{wxRichTextHTMLHandler::SetTemporaryImageLocations}\label{wxrichtexthtmlhandlersettemporaryimagelocations}
+
+\func{void}{SetTemporaryImageLocations}{\param{const wxArrayString\& }{locations}}
+
+Sets the list of image locations generated by the last operation.
+
index a7d7dfc766f5dd12d06658c478b1c1ab87612fec..481319eecbad6363e96bf5474133d1335803991b 100644 (file)
@@ -8,6 +8,7 @@ Classes: \helpref{wxRichTextCtrl}{wxrichtextctrl}, \helpref{wxRichTextBuffer}{wx
 \helpref{wxRichTextStyleSheet}{wxrichtextstylesheet}, 
 \helpref{wxRichTextStyleComboCtrl}{wxrichtextstylecomboctrl}, 
 \helpref{wxRichTextStyleListBox}{wxrichtextstylelistbox}, 
 \helpref{wxRichTextStyleSheet}{wxrichtextstylesheet}, 
 \helpref{wxRichTextStyleComboCtrl}{wxrichtextstylecomboctrl}, 
 \helpref{wxRichTextStyleListBox}{wxrichtextstylelistbox}, 
+\helpref{wxRichTextStyleListCtrl}{wxrichtextstylelistctrl}, 
 \helpref{wxRichTextEvent}{wxrichtextevent}, \helpref{wxRichTextRange}{wxrichtextrange}, 
 \helpref{wxRichTextFileHandler}{wxrichtextfilehandler}, \helpref{wxRichTextHTMLHandler}{wxrichtexthtmlhandler}, 
 \helpref{wxRichTextXMLHandler}{wxrichtextxmlhandler}, 
 \helpref{wxRichTextEvent}{wxrichtextevent}, \helpref{wxRichTextRange}{wxrichtextrange}, 
 \helpref{wxRichTextFileHandler}{wxrichtextfilehandler}, \helpref{wxRichTextHTMLHandler}{wxrichtexthtmlhandler}, 
 \helpref{wxRichTextXMLHandler}{wxrichtextxmlhandler}, 
index 19e5fcc5145f338831bc80261526a8c9aaebbfe2..2ed18ab5fa6b56a86be84759bd9e239e8b8a9bb8 100644 (file)
@@ -32,6 +32,12 @@ Destructor.
 
 Returns the style on which this style is based.
 
 
 Returns the style on which this style is based.
 
+\membersection{wxRichTextStyleDefinition::GetDescription}\label{wxrichtextstyledefinitiongetdescription}
+
+\constfunc{const wxString\&}{GetDescription}{\void}
+
+Returns the style's description.
+
 \membersection{wxRichTextStyleDefinition::GetName}\label{wxrichtextstyledefinitiongetname}
 
 \constfunc{const wxString\&}{GetName}{\void}
 \membersection{wxRichTextStyleDefinition::GetName}\label{wxrichtextstyledefinitiongetname}
 
 \constfunc{const wxString\&}{GetName}{\void}
@@ -58,6 +64,12 @@ Initialises the definition.
 
 Sets the name of the style that this style is based on.
 
 
 Sets the name of the style that this style is based on.
 
+\membersection{wxRichTextStyleDefinition::SetDescription}\label{wxrichtextstyledefinitionsetdescription}
+
+\func{void}{SetDescription}{\param{const wxString\& }{descr}}
+
+Sets the style description.
+
 \membersection{wxRichTextStyleDefinition::SetName}\label{wxrichtextstyledefinitionsetname}
 
 \func{void}{SetName}{\param{const wxString\& }{name}}
 \membersection{wxRichTextStyleDefinition::SetName}\label{wxrichtextstyledefinitionsetname}
 
 \func{void}{SetName}{\param{const wxString\& }{name}}
index 92081ea2fdcc5e61dae4e657d3c315a2ac90d7fe..eb748648c9db640d9e10bcd4b8518bbc96e697c3 100644 (file)
@@ -138,6 +138,12 @@ Gets a style for a listbox index.
 
 Returns the style sheet associated with this listbox.
 
 
 Returns the style sheet associated with this listbox.
 
+\membersection{wxRichTextStyleListBox::GetStyleType}\label{wxrichtextstylelistboxgetstyletype}
+
+\constfunc{wxRichTextStyleListBox::wxRichTextStyleType}{GetStyleType}{\void}
+
+Returns the type of style to show in the list box.
+
 \membersection{wxRichTextStyleListBox::OnGetItem}\label{wxrichtextstylelistboxongetitem}
 
 \constfunc{wxString}{OnGetItem}{\param{size\_t }{n}}
 \membersection{wxRichTextStyleListBox::OnGetItem}\label{wxrichtextstylelistboxongetitem}
 
 \constfunc{wxString}{OnGetItem}{\param{size\_t }{n}}
@@ -175,9 +181,118 @@ Associates the listbox with a \helpref{wxRichTextCtrl}{wxrichtextctrl}.
 
 Associates the control with a style sheet.
 
 
 Associates the control with a style sheet.
 
+\membersection{wxRichTextStyleListBox::SetStyleType}\label{wxrichtextstylelistboxsetstyletype}
+
+\func{void}{SetStyleType}{\param{wxRichTextStyleListBox::wxRichTextStyleType }{styleType}}
+
+Sets the style type to display. One of wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_ALL, wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_PARAGRAPH,
+wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_CHARACTER and wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_LIST.
+
 \membersection{wxRichTextStyleListBox::UpdateStyles}\label{wxrichtextstylelistboxupdatestyles}
 
 \func{void}{UpdateStyles}{\void}
 
 Updates the list from the associated style sheet.
 
 \membersection{wxRichTextStyleListBox::UpdateStyles}\label{wxrichtextstylelistboxupdatestyles}
 
 \func{void}{UpdateStyles}{\void}
 
 Updates the list from the associated style sheet.
 
+
+\section{\class{wxRichTextStyleListCtrl}}\label{wxrichtextstylelistctrl}
+
+This class incorporates a \helpref{wxRichTextStyleListBox}{wxrichtextstylelistbox} and
+a choice control that allows the user to select the category of style to view.
+It is demonstrated in the wxRichTextCtrl sample in {\tt samples/richtext}.
+
+To use wxRichTextStyleListCtrl, add the control to your window hierarchy and
+call \helpref{SetStyleType}{wxrichtextstylelistctrlsetstyletype} with
+one of wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_ALL, wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_PARAGRAPH,
+wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_CHARACTER and wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_LIST to set the current view.
+Associate the control with a style sheet and rich text control with SetStyleSheet and SetRichTextCtrl,
+so that when a style is double-clicked, it is applied to the selection.
+
+\wxheading{Window styles}
+
+\twocolwidtha{5cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{\windowstyle{wxRICHTEXTSTYLELIST\_HIDE\_TYPE\_SELECTOR}}{This style hides the category selection control.}
+\end{twocollist}
+
+\wxheading{Derived from}
+
+\helpref{wxControl}{wxcontrol}
+
+\wxheading{Include files}
+
+<wx/richtext/richtextstyles.h>
+
+\wxheading{Data structures}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxRichTextStyleListCtrl::wxRichTextStyleListCtrl}\label{wxrichtextstylelistctrlwxrichtextstylelistctrl}
+
+\func{}{wxRichTextStyleListCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}}
+
+\func{}{wxRichTextStyleListCtrl}{\void}
+
+Constructors.
+
+\membersection{wxRichTextStyleListCtrl::Create}\label{wxrichtextstylelistctrlcreate}
+
+\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}}
+
+Creates the windows.
+
+\membersection{wxRichTextStyleListCtrl::GetRichTextCtrl}\label{wxrichtextstylelistctrlgetrichtextctrl}
+
+\constfunc{wxRichTextCtrl*}{GetRichTextCtrl}{\void}
+
+Returns the associated rich text control, if any.
+
+\membersection{wxRichTextStyleListCtrl::GetStyleChoice}\label{wxrichtextstylelistctrlgetstylechoice}
+
+\constfunc{wxChoice*}{GetStyleChoice}{\void}
+
+Returns the wxChoice control used for selecting the style category.
+
+\membersection{wxRichTextStyleListCtrl::GetStyleListBox}\label{wxrichtextstylelistctrlgetstylelistbox}
+
+\constfunc{wxRichTextStyleListBox*}{GetStyleListBox}{\void}
+
+Returns the wxListBox control used to view the style list.
+
+\membersection{wxRichTextStyleListCtrl::GetStyleSheet}\label{wxrichtextstylelistctrlgetstylesheet}
+
+\constfunc{wxRichTextStyleSheet*}{GetStyleSheet}{\void}
+
+Returns the associated style sheet, if any.
+
+\membersection{wxRichTextStyleListCtrl::GetStyleType}\label{wxrichtextstylelistctrlgetstyletype}
+
+\constfunc{wxRichTextStyleListBox::wxRichTextStyleType}{GetStyleType}{\void}
+
+Returns the type of style to show in the list box.
+
+\membersection{wxRichTextStyleListCtrl::SetRichTextCtrl}\label{wxrichtextstylelistctrlsetrichtextctrl}
+
+\func{void}{SetRichTextCtrl}{\param{wxRichTextCtrl* }{ctrl}}
+
+Associates the control with a wxRichTextCtrl.
+
+\membersection{wxRichTextStyleListCtrl::SetStyleSheet}\label{wxrichtextstylelistctrlsetstylesheet}
+
+\func{void}{SetStyleSheet}{\param{wxRichTextStyleSheet* }{styleSheet}}
+
+Associates the control with a style sheet.
+
+\membersection{wxRichTextStyleListCtrl::SetStyleType}\label{wxrichtextstylelistctrlsetstyletype}
+
+\func{void}{SetStyleType}{\param{wxRichTextStyleListBox::wxRichTextStyleType }{styleType}}
+
+Sets the style type to display. One of wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_ALL, wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_PARAGRAPH,
+wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_CHARACTER and wxRichTextStyleListBox::wxRICHTEXT\_STYLE\_LIST.
+
+\membersection{wxRichTextStyleListCtrl::UpdateStyles}\label{wxrichtextstylelistctrlupdatestyles}
+
+\func{void}{UpdateStyles}{\void}
+
+Updates the style list box. 
+
index 33f89516f7956c6ada86003b0da6748efe356571..c1b3fe5ce61e1f9ac7a7d8d92b03491081395d9e 100644 (file)
@@ -85,6 +85,12 @@ Returns the {\it n}th character style.
 
 Returns the number of character styles.
 
 
 Returns the number of character styles.
 
+\membersection{wxRichTextStyleSheet::GetDescription}\label{wxrichtextstylesheetgetdescription}
+
+\constfunc{const wxString\&}{GetDescription}{\void}
+
+Returns the style sheet's description.
+
 \membersection{wxRichTextStyleSheet::GetListStyle}\label{wxrichtextstylesheetgetliststyle}
 
 \constfunc{wxRichTextListStyleDefinition*}{GetListStyle}{\param{size\_t }{n}}
 \membersection{wxRichTextStyleSheet::GetListStyle}\label{wxrichtextstylesheetgetliststyle}
 
 \constfunc{wxRichTextListStyleDefinition*}{GetListStyle}{\param{size\_t }{n}}
@@ -97,6 +103,12 @@ Returns the {\it n}th list style.
 
 Returns the number of list styles.
 
 
 Returns the number of list styles.
 
+\membersection{wxRichTextStyleSheet::GetName}\label{wxrichtextstylesheetgetname}
+
+\constfunc{const wxString\&}{GetName}{\void}
+
+Returns the style sheet's name.
+
 \membersection{wxRichTextStyleSheet::GetParagraphStyle}\label{wxrichtextstylesheetgetparagraphstyle}
 
 \constfunc{wxRichTextParagraphStyleDefinition*}{GetParagraphStyle}{\param{size\_t }{n}}
 \membersection{wxRichTextStyleSheet::GetParagraphStyle}\label{wxrichtextstylesheetgetparagraphstyle}
 
 \constfunc{wxRichTextParagraphStyleDefinition*}{GetParagraphStyle}{\param{size\_t }{n}}
@@ -133,3 +145,15 @@ Removes a list style.
 
 Removes a paragraph style.
 
 
 Removes a paragraph style.
 
+\membersection{wxRichTextStyleSheet::SetDescription}\label{wxrichtextstylesheetsetdescription}
+
+\func{void}{SetDescription}{\param{const wxString\& }{descr}}
+
+Sets the style sheet's description.
+
+\membersection{wxRichTextStyleSheet::SetName}\label{wxrichtextstylesheetsetname}
+
+\func{void}{SetName}{\param{const wxString\& }{name}}
+
+Sets the style sheet's name.
+
index 224d132eff313c5d4e5046b9bbac1adce5f44649..6711ecaa45b49ecc091509e8be1152f5cb73df49 100644 (file)
@@ -6,6 +6,17 @@ and load and save through the buffer or control API, or you can
 create an instance of the handler on the stack and call its
 functions directly.
 
 create an instance of the handler on the stack and call its
 functions directly.
 
+\wxheading{Handler flags}
+
+The following flags can be used with this handler, via
+the handler's SetFlags function or the buffer or control's
+SetHandlerFlags function:
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{\windowstyle{wxRICHTEXT\_HANDLER\_INCLUDE\_STYLESHEET}}{Include the style sheet in loading and saving operations.}
+\end{twocollist}
+
 \wxheading{Derived from}
 
 \helpref{wxRichTextFileHandler}{wxrichtextfilehandler}
 \wxheading{Derived from}
 
 \helpref{wxRichTextFileHandler}{wxrichtextfilehandler}
index 04f26ada5ccff88e0d32dde9a57eb4c1e8f1c240..5c94102976f6413172cf61c5f083535354eb4ac6 100644 (file)
@@ -82,10 +82,11 @@ for a text control.
 #define wxTEXT_ATTR_BULLET_NAME             0x00100000
 #define wxTEXT_ATTR_URL                     0x00200000
 #define wxTEXT_ATTR_PAGE_BREAK              0x00400000
 #define wxTEXT_ATTR_BULLET_NAME             0x00100000
 #define wxTEXT_ATTR_URL                     0x00200000
 #define wxTEXT_ATTR_PAGE_BREAK              0x00400000
+#define wxTEXT_ATTR_EFFECTS                 0x00800000
 \end{verbatim}
 }
 
 \end{verbatim}
 }
 
-The following styles can be passed to wxRichTextAttr::SetBulletStyle:
+The following styles can be passed to wxTextAttrEx::SetBulletStyle:
 
 {\small
 \begin{verbatim}
 
 {\small
 \begin{verbatim}
@@ -108,7 +109,9 @@ The following styles can be passed to wxRichTextAttr::SetBulletStyle:
 \end{verbatim}
 }
 
 \end{verbatim}
 }
 
-The following constants can be passed to wxRichTextAttr::SetLineSpacing:
+Of these, wxTEXT\_ATTR\_BULLET\_STYLE\_BITMAP is unimplemented.
+
+The following constants can be passed to wxTextAttrEx::SetLineSpacing:
 
 {\small
 \begin{verbatim}
 
 {\small
 \begin{verbatim}
@@ -118,6 +121,26 @@ The following constants can be passed to wxRichTextAttr::SetLineSpacing:
 \end{verbatim}
 }
 
 \end{verbatim}
 }
 
+The following styles can be passed to wxTextAttrEx::SetTextEffects:
+
+{\small
+\begin{verbatim}
+#define wxTEXT_ATTR_EFFECT_NONE                     0x00000000
+#define wxTEXT_ATTR_EFFECT_CAPITALS                 0x00000001
+#define wxTEXT_ATTR_EFFECT_SMALL_CAPITALS           0x00000002
+#define wxTEXT_ATTR_EFFECT_STRIKETHROUGH            0x00000004
+#define wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH     0x00000008
+#define wxTEXT_ATTR_EFFECT_SHADOW                   0x00000010
+#define wxTEXT_ATTR_EFFECT_EMBOSS                   0x00000020
+#define wxTEXT_ATTR_EFFECT_OUTLINE                  0x00000040
+#define wxTEXT_ATTR_EFFECT_ENGRAVE                  0x00000080
+#define wxTEXT_ATTR_EFFECT_SUPERSCRIPT              0x00000100
+#define wxTEXT_ATTR_EFFECT_SUBSCRIPT                0x00000200
+\end{verbatim}
+}
+
+Of these, only wxTEXT\_ATTR\_EFFECT\_CAPITALS and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH are implemented.
+
 \wxheading{See also}
 
 \helpref{wxTextAttr}{wxtextattr}, \helpref{wxRichTextAttr}{wxrichtextattr}, \helpref{wxRichTextCtrl}{wxrichtextctrl}
 \wxheading{See also}
 
 \helpref{wxTextAttr}{wxtextattr}, \helpref{wxRichTextAttr}{wxrichtextattr}, \helpref{wxRichTextCtrl}{wxrichtextctrl}
@@ -172,7 +195,7 @@ Returns the bullet number.
 Returns the bullet style.
 See \helpref{wxTextAttrEx::SetBulletStyle}{wxtextattrexsetbulletstyle} for a list of available styles.
 
 Returns the bullet style.
 See \helpref{wxTextAttrEx::SetBulletStyle}{wxtextattrexsetbulletstyle} for a list of available styles.
 
-\membersection{wxTextAttrEx::GetBulletText}\label{wxrichtextattrgetbullettext}
+\membersection{wxTextAttrEx::GetBulletText}\label{wxtextattrexgetbullettext}
 
 \constfunc{const wxString\&}{GetBulletText}{\void}
 
 
 \constfunc{const wxString\&}{GetBulletText}{\void}
 
@@ -215,6 +238,19 @@ Returns the space in tenths of a millimeter before the paragraph.
 
 Returns the name of the paragraph style.
 
 
 Returns the name of the paragraph style.
 
+\membersection{wxTextAttrEx::GetTextEffectFlags}\label{wxtextattrexgettexteffectflags}
+
+\constfunc{int}{GetTextEffectFlags}{\void}
+
+Returns the text effect bits of interest. See \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags} for further information.
+
+\membersection{wxTextAttrEx::GetTextEffects}\label{wxtextattrexgettexteffects}
+
+\constfunc{int}{GetTextEffects}{\void}
+
+Returns the text effects, a bit list of styles. See \helpref{wxTextAttrEx::SetTextEffects}{wxtextattrexsettexteffects} for
+details.
+
 \membersection{wxTextAttrEx::GetURL}\label{wxtextattrexgeturl}
 
 \constfunc{const wxString\&}{GetURL}{\void}
 \membersection{wxTextAttrEx::GetURL}\label{wxtextattrexgeturl}
 
 \constfunc{const wxString\&}{GetURL}{\void}
@@ -364,6 +400,8 @@ Sets the bullet style. The following styles can be passed:
 \end{verbatim}
 }
 
 \end{verbatim}
 }
 
+Currently wxTEXT\_ATTR\_BULLET\_STYLE\_BITMAP is not supported.
+
 \membersection{wxTextAttrEx::SetBulletText}\label{wxtextattrexsetbullettext}
 
 \func{void}{SetBulletText}{\param{const wxString\& }{text}}
 \membersection{wxTextAttrEx::SetBulletText}\label{wxtextattrexsetbullettext}
 
 \func{void}{SetBulletText}{\param{const wxString\& }{text}}
@@ -422,6 +460,44 @@ Sets the spacing before a paragraph, in tenths of a millimetre.
 
 Sets the name of the paragraph style.
 
 
 Sets the name of the paragraph style.
 
+\membersection{wxTextAttrEx::SetTextEffectFlags}\label{wxtextattrexsettexteffectflags}
+
+\func{void}{SetTextEffectFlags}{\param{int }{flags}}
+
+Sets the text effect bits of interest. You should also pass wxTEXT\_ATTR\_EFFECTS to \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags}.
+
+\membersection{wxTextAttrEx::SetTextEffects}\label{wxtextattrexsettexteffects}
+
+\func{void}{SetTextEffects}{\param{int }{effects}}
+
+Sets the text effects, a bit list of styles.
+
+The following styles can be passed:
+
+{\small
+\begin{verbatim}
+#define wxTEXT_ATTR_EFFECT_NONE                     0x00000000
+#define wxTEXT_ATTR_EFFECT_CAPITALS                 0x00000001
+#define wxTEXT_ATTR_EFFECT_SMALL_CAPITALS           0x00000002
+#define wxTEXT_ATTR_EFFECT_STRIKETHROUGH            0x00000004
+#define wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH     0x00000008
+#define wxTEXT_ATTR_EFFECT_SHADOW                   0x00000010
+#define wxTEXT_ATTR_EFFECT_EMBOSS                   0x00000020
+#define wxTEXT_ATTR_EFFECT_OUTLINE                  0x00000040
+#define wxTEXT_ATTR_EFFECT_ENGRAVE                  0x00000080
+#define wxTEXT_ATTR_EFFECT_SUPERSCRIPT              0x00000100
+#define wxTEXT_ATTR_EFFECT_SUBSCRIPT                0x00000200
+\end{verbatim}
+}
+
+Of these, only wxTEXT\_ATTR\_EFFECT\_CAPITALS and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH are implemented.
+wxTEXT\_ATTR\_EFFECT\_CAPITALS capitalises text when displayed (leaving the case of the actual buffer
+text unchanged), and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH draws a line through text.
+
+To set effects, you should also pass wxTEXT\_ATTR\_EFFECTS to \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags}, and call\rtfsp
+\helpref{wxTextAttrEx::SetTextEffectFlags}{wxtextattrexsettexteffectflags} with the styles (taken from the
+above set) that you are interested in setting.
+
 \membersection{wxTextAttrEx::SetURL}\label{wxtextattrexseturl}
 
 \func{void}{SetURL}{\param{const wxString\& }{url}}
 \membersection{wxTextAttrEx::SetURL}\label{wxtextattrexseturl}
 
 \func{void}{SetURL}{\param{const wxString\& }{url}}
index 30ec7fe3f9063722f29ac8a13cb809429a7d81de..729e5e3f341bf589205c8caf94ee992e57a8d48d 100644 (file)
@@ -408,7 +408,7 @@ public:
     /// Creates a suitable HTML fragment for a definition
     wxString CreateHTML(wxRichTextStyleDefinition* def) const;
 
     /// Creates a suitable HTML fragment for a definition
     wxString CreateHTML(wxRichTextStyleDefinition* def) const;
 
-    /// Associates the control with a style manager
+    /// Associates the control with a style sheet
     void SetStyleSheet(wxRichTextStyleSheet* styleSheet) { m_styleSheet = styleSheet; }
     wxRichTextStyleSheet* GetStyleSheet() const { return m_styleSheet; }
 
     void SetStyleSheet(wxRichTextStyleSheet* styleSheet) { m_styleSheet = styleSheet; }
     wxRichTextStyleSheet* GetStyleSheet() const { return m_styleSheet; }
 
@@ -514,7 +514,7 @@ public:
     /// Updates the style list box
     void UpdateStyles();
 
     /// Updates the style list box
     void UpdateStyles();
 
-    /// Associates the control with a style manager
+    /// Associates the control with a style sheet
     void SetStyleSheet(wxRichTextStyleSheet* styleSheet);
     wxRichTextStyleSheet* GetStyleSheet() const;
 
     void SetStyleSheet(wxRichTextStyleSheet* styleSheet);
     wxRichTextStyleSheet* GetStyleSheet() const;
 
@@ -638,7 +638,7 @@ public:
     /// Updates the list
     void UpdateStyles() { m_stylePopup->UpdateStyles(); }
 
     /// Updates the list
     void UpdateStyles() { m_stylePopup->UpdateStyles(); }
 
-    /// Associates the control with a style manager
+    /// Associates the control with a style sheet
     void SetStyleSheet(wxRichTextStyleSheet* styleSheet) { m_stylePopup->SetStyleSheet(styleSheet); }
     wxRichTextStyleSheet* GetStyleSheet() const { return m_stylePopup->GetStyleSheet(); }
 
     void SetStyleSheet(wxRichTextStyleSheet* styleSheet) { m_stylePopup->SetStyleSheet(styleSheet); }
     wxRichTextStyleSheet* GetStyleSheet() const { return m_stylePopup->GetStyleSheet(); }
 
index 2a9ac747cc31665a5c0fe85ef8f148d10d69d69d..26189e93ec560b5e2a8f87ea0f8c48f0ae266d07 100644 (file)
@@ -917,6 +917,10 @@ wxString wxRichTextXMLHandler::CreateStyle(const wxTextAttrEx& attr, bool isPara
         str << wxT(" texteffects=\"");
         str << attr.GetTextEffects();
         str << wxT("\"");
         str << wxT(" texteffects=\"");
         str << attr.GetTextEffects();
         str << wxT("\"");
+
+        str << wxT(" texteffectflags=\"");
+        str << attr.GetTextEffectFlags();
+        str << wxT("\"");
     }
 
     if (!attr.GetCharacterStyleName().empty())
     }
 
     if (!attr.GetCharacterStyleName().empty())
@@ -1082,6 +1086,12 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
         attr.SetTextEffects(wxAtoi(value));
     }
 
         attr.SetTextEffects(wxAtoi(value));
     }
 
+    value = node->GetPropVal(wxT("texteffectflags"), wxEmptyString);
+    if (!value.IsEmpty())
+    {
+        attr.SetTextEffectFlags(wxAtoi(value));
+    }
+
     // Set paragraph attributes
     if (isPara)
     {
     // Set paragraph attributes
     if (isPara)
     {