removed @NULL,@true,@false tags from the function prototypes; fixed * and & displacing in the prototypes; changed @param as discussed on wx-dev; use @see instead of @sa; better indentation for @returns,@remarks,@see paragraphs; other misc fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-03-09 12:33:59 +00:00
parent 0aaf0255e4
commit 4cc4bfafe5
256 changed files with 8880 additions and 10701 deletions
+14 -25
View File
@@ -46,15 +46,14 @@ public:
Constructor.
*/
wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE,
wxWindow* parentWindow = @NULL);
wxWindow* parentWindow = NULL);
//@{
/**
Adds book (@ref overview_helpformat ".hhp file" - HTML Help Workshop project
file) into the list of loaded books.
This must be called at least once before displaying any help.
@e bookFile or @e bookUrl may be either .hhp file or ZIP archive
@a bookFile or @a bookUrl may be either .hhp file or ZIP archive
that contains arbitrary number of .hhp files in
top-level directory. This ZIP archive must have .zip or .htb extension
(the latter stands for "HTML book"). In other words, @c
@@ -62,15 +61,13 @@ public:
is possible and is the recommended way.
@param showWaitMsg
If @true then a decoration-less window with progress message is displayed.
If @true then a decoration-less window with progress message is displayed.
@param bookFile
Help book filename. It is recommended to use this prototype
instead of the one taking URL, because it is less error-prone.
Help book filename. It is recommended to use this prototype
instead of the one taking URL, because it is less error-prone.
@param bookUrl
Help book URL (note that syntax of filename and URL is
different on most platforms)
Help book URL (note that syntax of filename and URL is
different on most platforms)
*/
bool AddBook(const wxFileName& bookFile, bool showWaitMsg);
bool AddBook(const wxString& bookUrl, bool showWaitMsg);
@@ -81,13 +78,13 @@ public:
wxHF_DIALOG style, the controller
uses a different dialog.
*/
virtual wxHtmlHelpDialog* CreateHelpDialog(wxHtmlHelpData * data);
virtual wxHtmlHelpDialog* CreateHelpDialog(wxHtmlHelpData* data);
/**
This protected virtual method may be overridden so that the controller
uses a different frame.
*/
virtual wxHtmlHelpFrame* CreateHelpFrame(wxHtmlHelpData * data);
virtual wxHtmlHelpFrame* CreateHelpFrame(wxHtmlHelpData* data);
//@{
/**
@@ -111,7 +108,6 @@ public:
Displays help window, focuses search panel and starts searching. Returns @true
if the keyword was found. Optionally it searches through the index (mode =
wxHELP_SEARCH_INDEX), default the content (mode = wxHELP_SEARCH_ALL).
@b Important: KeywordSearch searches only pages listed in .hhc file(s).
You should list all pages in the contents file.
*/
@@ -130,7 +126,6 @@ public:
forms are much faster to read. Default value is empty string (empty string means
that no cached data are stored). Note that these files are @e not
deleted when program exits.
Once created these cached files will be used in all subsequent executions
of your application. If cached files become older than corresponding .hhp
file (e.g. if you regenerate documentation) it will be refreshed.
@@ -144,13 +139,10 @@ public:
void SetTitleFormat(const wxString& format);
/**
Associates @e config object with the controller.
Associates @a config object with the controller.
If there is associated config object, wxHtmlHelpController automatically
reads and writes settings (including wxHtmlWindow's settings) when needed.
The only thing you must do is create wxConfig object and call UseConfig.
If you do not use @e UseConfig, wxHtmlHelpController will use
default wxConfig object if available (for details see
wxConfigBase::Get and
@@ -194,16 +186,13 @@ class wxHtmlModalHelp
public:
/**
@param parent
is the parent of the dialog.
is the parent of the dialog.
@param helpFile
is the HTML help file to show.
is the HTML help file to show.
@param topic
is an optional topic. If this is empty, the help contents will be shown.
is an optional topic. If this is empty, the help contents will be shown.
@param style
is a combination of the flags described in the wxHtmlHelpController
is a combination of the flags described in the wxHtmlHelpController
documentation.
*/
wxHtmlModalHelp(wxWindow* parent, const wxString& helpFile,
+5 -6
View File
@@ -26,21 +26,20 @@ public:
Constructor. For the values of @e style, please see the documentation for
wxHtmlHelpController.
*/
wxHtmlHelpDialog(wxHtmlHelpData* data = @NULL);
wxHtmlHelpDialog(wxHtmlHelpData* data = NULL);
wxHtmlHelpDialog(wxWindow* parent, int wxWindowID,
const wxString& title = wxEmptyString,
int style = wxHF_DEFAULT_STYLE,
wxHtmlHelpData* data = @NULL);
wxHtmlHelpData* data = NULL);
//@}
/**
You may override this virtual method to add more buttons to the help window's
toolbar. @e toolBar is a pointer to the toolbar and @e style is the style
toolbar. @a toolBar is a pointer to the toolbar and @a style is the style
flag as passed to the Create method.
wxToolBar::Realize is called immediately after returning from this function.
*/
virtual void AddToolbarButtons(wxToolBar * toolBar, int style);
virtual void AddToolbarButtons(wxToolBar* toolBar, int style);
/**
Creates the dialog. See @ref wxhtmlhelpdialog() "the constructor"
@@ -68,7 +67,7 @@ public:
void SetController(wxHtmlHelpController* contoller);
/**
Sets the dialog's title format. @e format must contain exactly one "%s"
Sets the dialog's title format. @a format must contain exactly one "%s"
(it will be replaced by the page title).
*/
void SetTitleFormat(const wxString& format);
+5 -6
View File
@@ -26,21 +26,20 @@ public:
Constructor. For the values of @e style, please see the documentation for
wxHtmlHelpController.
*/
wxHtmlHelpFrame(wxHtmlHelpData* data = @NULL);
wxHtmlHelpFrame(wxHtmlHelpData* data = NULL);
wxHtmlHelpFrame(wxWindow* parent, int wxWindowID,
const wxString& title = wxEmptyString,
int style = wxHF_DEFAULT_STYLE,
wxHtmlHelpData* data = @NULL);
wxHtmlHelpData* data = NULL);
//@}
/**
You may override this virtual method to add more buttons to the help window's
toolbar. @e toolBar is a pointer to the toolbar and @e style is the style
toolbar. @a toolBar is a pointer to the toolbar and @a style is the style
flag as passed to the Create method.
wxToolBar::Realize is called immediately after returning from this function.
*/
virtual void AddToolbarButtons(wxToolBar * toolBar, int style);
virtual void AddToolbarButtons(wxToolBar* toolBar, int style);
/**
Creates the frame. See @ref wxhtmlhelpframe() "the constructor"
@@ -68,7 +67,7 @@ public:
void SetController(wxHtmlHelpController* contoller);
/**
Sets the frame's title format. @e format must contain exactly one "%s"
Sets the frame's title format. @a format must contain exactly one "%s"
(it will be replaced by the page title).
*/
void SetTitleFormat(const wxString& format);
+6 -14
View File
@@ -44,29 +44,26 @@ public:
//@{
/**
Constructor.
Constructor. For the values of @e helpStyle, please see the documentation for
wxHtmlHelpController.
*/
wxHtmlHelpWindow(wxHtmlHelpData* data = @NULL);
wxHtmlHelpWindow(wxHtmlHelpData* data = NULL);
wxHtmlHelpWindow(wxWindow* parent, int wxWindowID,
const wxPoint& pos = wxDefaultPosition,
const wxSize& pos = wxDefaultSize,
int style = wxTAB_TRAVERSAL|wxBORDER_NONE,
int helpStyle = wxHF_DEFAULT_STYLE,
wxHtmlHelpData* data = @NULL);
wxHtmlHelpData* data = NULL);
//@}
/**
You may override this virtual method to add more buttons to the help window's
toolbar. @e toolBar is a pointer to the toolbar and @e style is the style
toolbar. @a toolBar is a pointer to the toolbar and @a style is the style
flag as passed to the Create method.
wxToolBar::Realize is called immediately after returning from this function.
See @e samples/html/helpview for an example.
*/
virtual void AddToolbarButtons(wxToolBar * toolBar, int style);
virtual void AddToolbarButtons(wxToolBar* toolBar, int style);
/**
Creates the help window. See @ref wxhtmlhelpwindow() "the constructor"
@@ -77,18 +74,16 @@ public:
const wxSize& pos = wxDefaultSize,
int style = wxTAB_TRAVERSAL|wxBORDER_NONE,
int helpStyle = wxHF_DEFAULT_STYLE,
wxHtmlHelpData* data = @NULL);
wxHtmlHelpData* data = NULL);
/**
Creates contents panel. (May take some time.)
Protected.
*/
void CreateContents();
/**
Creates index panel. (May take some time.)
Protected.
*/
void CreateIndex();
@@ -103,12 +98,10 @@ public:
Displays page x. If not found it will give the user the choice of
searching books.
Looking for the page runs in these steps:
try to locate file named x (if x is for example "doc/howto.htm")
try to open starting page of book x
try to find x in contents (if x is for example "How To ...")
try to find x in index (if x is for example "How To ...")
The second form takes numeric ID as the parameter.
(uses extension to MS format, param name="ID" value=id)
*/
@@ -148,13 +141,12 @@ public:
/**
Refresh all panels. This is necessary if a new book was added.
Protected.
*/
void RefreshLists();
/**
Sets the frame's title format. @e format must contain exactly one "%s"
Sets the frame's title format. @a format must contain exactly one "%s"
(it will be replaced by the page title).
*/
void SetTitleFormat(const wxString& format);
+247 -146
View File
File diff suppressed because it is too large Load Diff
-2
View File
@@ -29,14 +29,12 @@ public:
/**
Returns @true if this filter is capable of reading file @e file.
Example:
*/
bool CanRead(const wxFSFile& file);
/**
Reads the file and returns string with HTML document.
Example:
*/
wxString ReadFile(const wxFSFile& file);
+42 -34
View File
@@ -33,7 +33,7 @@ public:
/**
This is the core method of each handler. It is called each time
one of supported tags is detected. @e tag contains all necessary
one of supported tags is detected. @a tag contains all necessary
info (see wxHtmlTag for details).
@returns @true if ParseInner was called, @false otherwise.
@@ -43,20 +43,20 @@ public:
/**
This method calls parser's wxHtmlParser::DoParsing method
for the string between this tag and the paired ending tag:
In this example, a call to ParseInner (with @e tag pointing to A tag)
In this example, a call to ParseInner (with @a tag pointing to A tag)
will parse 'Hello, world!'.
*/
void ParseInner(const wxHtmlTag& tag);
/**
Assigns @e parser to this handler. Each @b instance of handler
Assigns @a parser to this handler. Each @b instance of handler
is guaranteed to be called only from the parser.
*/
virtual void SetParser(wxHtmlParser parser);
/**
@b wxHtmlParser* m_Parser
This attribute is used to access parent parser. It is protected so that
it can't be accessed by user but can be accessed from derived classes.
*/
@@ -102,11 +102,9 @@ public:
/**
This may (and may not) be overwritten in derived class.
This method is called each time new tag is about to be added.
@e tag contains information about the tag. (See wxHtmlTag
@a tag contains information about the tag. (See wxHtmlTag
for details.)
Default (wxHtmlParser) behaviour is this:
First it finds a handler capable of handling this tag and then it calls
handler's HandleTag method.
@@ -117,20 +115,17 @@ public:
Adds handler to the internal list ( hash table) of handlers. This
method should not be called directly by user but rather by derived class'
constructor.
This adds the handler to this @b instance of wxHtmlParser, not to
all objects of this class! (Static front-end to AddTagHandler is provided
by wxHtmlWinParser).
All handlers are deleted on object deletion.
*/
virtual void AddTagHandler(wxHtmlTagHandler handler);
/**
Must be overwritten in derived class.
This method is called by DoParsing()
each time a part of text is parsed. @e txt is NOT only one word, it is
each time a part of text is parsed. @a txt is NOT only one word, it is
substring of input. It is not formatted or preprocessed (so white spaces are
unmodified).
*/
@@ -155,13 +150,12 @@ public:
reference to it is parent parser it can easily request the file by
calling
*/
#define wxFileSystem* GetFS() /* implementation is private */
wxFileSystem* GetFS();
/**
Returns product of parsing. Returned value is result of parsing
of the document. The type of this result depends on internal
representation in derived parser (but it must be derived from wxObject!).
See wxHtmlWinParser for details.
*/
virtual wxObject* GetProduct();
@@ -172,7 +166,7 @@ public:
wxString* GetSource();
/**
Setups the parser for parsing the @e source string. (Should be overridden
Setups the parser for parsing the @a source string. (Should be overridden
in derived class)
*/
virtual void InitParser(const wxString& source);
@@ -184,26 +178,44 @@ public:
of @e OpenURL in derived class.
@param type
Indicates type of the resource. Is one of:
wxHTML_URL_PAGE
Indicates type of the resource. Is one of:
Opening a HTML page.
wxHTML_URL_IMAGE
Opening an image.
wxHTML_URL_OTHER
Opening a resource that doesn't fall into
any other category.
wxHTML_URL_PAGE
Opening a HTML page.
wxHTML_URL_IMAGE
Opening an image.
wxHTML_URL_OTHER
Opening a resource that doesn't fall into
any other category.
@param url
URL being opened.
URL being opened.
*/
virtual wxFSFile* OpenURL(wxHtmlURLType type,
const wxString& url);
@@ -211,15 +223,12 @@ public:
/**
Proceeds parsing of the document. This is end-user method. You can simply
call it when you need to obtain parsed output (which is parser-specific)
The method does these things:
calls @ref initparser() InitParser(source)
calls DoParsing()
calls GetProduct()
calls DoneParser()
returns value returned by GetProduct
You shouldn't use InitParser, DoParsing, GetProduct or DoneParser directly.
*/
wxObject* Parse(const wxString& source);
@@ -236,11 +245,10 @@ public:
The handler should already be added to this parser.
@param handler
the handler
the handler
@param tags
List of tags (in same format as GetSupportedTags's return value). The parser
will redirect these tags to handler (until call to PopTagHandler).
List of tags (in same format as GetSupportedTags's return value). The parser
will redirect these tags to handler (until call to PopTagHandler).
*/
void PushTagHandler(wxHtmlTagHandler* handler,
const wxString& tags);
@@ -250,7 +258,7 @@ public:
files. (For example @c IMG tag handler requests wxFSFile with the
image data.)
*/
#define void SetFS(wxFileSystem fs) /* implementation is private */
void SetFS(wxFileSystem fs);
/**
Call this function to interrupt parsing from a tag handler. No more tags
+18 -24
View File
@@ -24,13 +24,12 @@ public:
yourself. Feel free to ignore the constructor parameters.
Have a look at src/html/htmlpars.cpp if you're interested in creating it.
*/
wxHtmlTag(wxHtmlTag * parent, const wxString& source, int pos,
wxHtmlTag(wxHtmlTag* parent, const wxString& source, int pos,
int end_pos, wxHtmlTagsCache* cache,
wxHtmlEntitiesParser * entParser);
wxHtmlEntitiesParser* entParser);
/**
Returns a string containing all parameters.
Example : tag contains @c FONT SIZE=+2 COLOR="#000000". Call to
tag.GetAllParams() would return @c SIZE=+2 COLOR="#000000".
*/
@@ -69,35 +68,32 @@ public:
parameter exists or not (use wxHtmlTag::HasParam) first.
@param par
The parameter's name.
The parameter's name.
@param with_quotes
@true if you want to get quotes as well. See example.
@true if you want to get quotes as well. See example.
*/
wxString GetParam(const wxString& par, bool with_quotes = @false);
wxString GetParam(const wxString& par, bool with_quotes = false);
/**
Interprets tag parameter @e par as colour specification and saves its value
Interprets tag parameter @a par as colour specification and saves its value
into wxColour variable pointed by @e clr.
Returns @true on success and @false if @e par is not colour specification or
Returns @true on success and @false if @a par is not colour specification or
if the tag has no such parameter.
*/
bool GetParamAsColour(const wxString& par, wxColour * clr);
bool GetParamAsColour(const wxString& par, wxColour* clr);
/**
Interprets tag parameter @e par as an integer and saves its value
Interprets tag parameter @a par as an integer and saves its value
into int variable pointed by @e value.
Returns @true on success and @false if @e par is not an integer or
Returns @true on success and @false if @a par is not an integer or
if the tag has no such parameter.
*/
bool GetParamAsInt(const wxString& par, int * value);
bool GetParamAsInt(const wxString& par, int* value);
/**
Returns @true if this tag is paired with ending tag, @false otherwise.
See the example of HTML document:
In this example tags HTML and BODY have ending tags, first P and BR
doesn't have ending tag while the second P has. The third P tag (which
is ending itself) of course doesn't have ending tag.
@@ -110,7 +106,7 @@ public:
"SIZE" and "COLOR".
@param par
the parameter you're looking for.
the parameter you're looking for.
*/
bool HasParam(const wxString& par);
@@ -122,14 +118,12 @@ public:
in @e format).
@param par
The name of the tag you want to query
The name of the tag you want to query
@param format
scanf()-like format string.
scanf()-like format string.
@param value
pointer to a variable to store the value in
pointer to a variable to store the value in
*/
wxString ScanParam(const wxString& par, const wxChar * format,
void * value);
wxString ScanParam(const wxString& par, const wxChar* format,
void* value);
};
+72 -69
View File
@@ -48,7 +48,7 @@ public:
constructor.
@param style
Window style. See wxHtmlWindow.
Window style. See wxHtmlWindow.
*/
wxHtmlWindow();
wxHtmlWindow(wxWindow parent, wxWindowID id = -1,
@@ -61,7 +61,6 @@ public:
/**
Adds @ref overview_filters "input filter" to the static list of available
filters. These filters are present by default:
@c text/html MIME type
@c image/* MIME types
Plain Text filter (this filter is used if no other filter matches)
@@ -72,7 +71,7 @@ public:
Appends HTML fragment to currently displayed text and refreshes the window.
@param source
HTML code fragment
HTML code fragment
@returns @false if an error occurred, @true otherwise.
*/
@@ -80,9 +79,8 @@ public:
/**
Returns pointer to the top-level container.
See also: @ref overview_cells "Cells Overview",
@ref overview_printing "Printing Overview"
@ref overview_printing
*/
wxHtmlContainerCell* GetInternalRepresentation();
@@ -145,43 +143,39 @@ public:
@returns @false if an error occurred, @true otherwise
@sa LoadPage()
@see LoadPage()
*/
virtual bool LoadFile(const wxFileName& filename);
/**
Unlike SetPage this function first loads HTML page from @e location
Unlike SetPage this function first loads HTML page from @a location
and then displays it. See example:
@param location
The address of document. See wxFileSystem for details on address format and
The address of document. See wxFileSystem for details on address format and
behaviour of "opener".
@returns @false if an error occurred, @true otherwise
@sa LoadFile()
@see LoadFile()
*/
virtual bool LoadPage(const wxString& location);
/**
This method is called when a mouse button is clicked inside wxHtmlWindow.
The default behaviour is to emit a wxHtmlCellEvent
and, if the event was not processed or skipped, call
OnLinkClicked() if the cell contains an
hypertext link.
Overloading this method is deprecated; intercept the event instead.
@param cell
The cell inside which the mouse was clicked, always a simple
(i.e. non-container) cell
The cell inside which the mouse was clicked, always a simple
(i.e. non-container) cell
@param x, y
The logical coordinates of the click point
The logical coordinates of the click point
@param event
The mouse event containing other information about the click
The mouse event containing other information about the click
@returns @true if a link was clicked, @false otherwise.
*/
@@ -194,11 +188,10 @@ public:
Overloading this method is deprecated; intercept the event instead.
@param cell
The cell inside which the mouse is currently, always a simple
(i.e. non-container) cell
The cell inside which the mouse is currently, always a simple
(i.e. non-container) cell
@param x, y
The logical coordinates of the click point
The logical coordinates of the click point
*/
virtual void OnCellMouseHover(wxHtmlCell cell, wxCoord x,
wxCoord y);
@@ -208,7 +201,6 @@ public:
wxHtmlLinkEvent and, if the event was not processed
or skipped, call LoadPage() and do nothing else.
Overloading this method is deprecated; intercept the event instead.
Also see wxHtmlLinkInfo.
*/
virtual void OnLinkClicked(const wxHtmlLinkInfo& link);
@@ -223,35 +215,51 @@ public:
behaviour is to always return @c wxHTML_OPEN.
@param type
Indicates type of the resource. Is one of
Indicates type of the resource. Is one of
wxHTML_URL_PAGE
Opening a HTML page.
wxHTML_URL_IMAGE
Opening an image.
wxHTML_URL_OTHER
wxHTML_URL_PAGE
Opening a resource that doesn't fall into
any other category.
Opening a HTML page.
wxHTML_URL_IMAGE
Opening an image.
wxHTML_URL_OTHER
Opening a resource that doesn't fall into
any other category.
@param url
URL being opened.
URL being opened.
@param redirect
Pointer to wxString variable that must be filled with an
URL if OnOpeningURL returns wxHTML_REDIRECT.
Pointer to wxString variable that must be filled with an
URL if OnOpeningURL returns wxHTML_REDIRECT.
*/
virtual wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type,
const wxString& url,
wxString * redirect);
wxString* redirect);
/**
Called on parsing @c TITLE tag.
@@ -262,14 +270,12 @@ public:
This reads custom settings from wxConfig. It uses the path 'path'
if given, otherwise it saves info into currently selected path.
The values are stored in sub-path @c wxHtmlWindow
Read values: all things set by SetFonts, SetBorders.
@param cfg
wxConfig from which you want to read the configuration.
wxConfig from which you want to read the configuration.
@param path
Optional path in config tree. If not given current path is used.
Optional path in config tree. If not given current path is used.
*/
virtual void ReadCustomization(wxConfigBase cfg,
wxString path = wxEmptyString);
@@ -277,17 +283,17 @@ public:
/**
Selects all text in the window.
@sa SelectLine(), SelectWord()
@see SelectLine(), SelectWord()
*/
void SelectAll();
/**
Selects the line of text that @e pos points at. Note that @e pos
Selects the line of text that @a pos points at. Note that @e pos
is relative to the top of displayed page, not to window's origin, use
wxScrolledWindow::CalcUnscrolledPosition
to convert physical coordinate.
@sa SelectAll(), SelectWord()
@see SelectAll(), SelectWord()
*/
void SelectLine(const wxPoint& pos);
@@ -297,7 +303,7 @@ public:
wxScrolledWindow::CalcUnscrolledPosition
to convert physical coordinate.
@sa SelectAll(), SelectLine()
@see SelectAll(), SelectLine()
*/
void SelectWord(const wxPoint& pos);
@@ -312,7 +318,7 @@ public:
image:
@param b
indentation from borders in pixels
indentation from borders in pixels
*/
void SetBorders(int b);
@@ -320,39 +326,38 @@ public:
This function sets font sizes and faces.
@param normal_face
This is face name for normal (i.e. non-fixed) font.
It can be either empty string (then the default face is chosen) or
platform-specific face name. Examples are "helvetica" under Unix or
"Times New Roman" under Windows.
This is face name for normal (i.e. non-fixed) font.
It can be either empty string (then the default face is chosen) or
platform-specific face name. Examples are "helvetica" under Unix or
"Times New Roman" under Windows.
@param fixed_face
The same thing for fixed face ( TT../TT )
The same thing for fixed face ( TT../TT )
@param sizes
This is an array of 7 items of int type.
The values represent size of font with HTML size from -2 to +4
( FONT SIZE=-2 to FONT SIZE=+4 ). Default sizes are used if sizes
is @NULL.
This is an array of 7 items of int type.
The values represent size of font with HTML size from -2 to +4
( FONT SIZE=-2 to FONT SIZE=+4 ). Default sizes are used if sizes
is @NULL.
*/
void SetFonts(const wxString& normal_face,
const wxString& fixed_face,
const int sizes = @NULL);
const int sizes = NULL);
/**
Sets HTML page and display it. This won't @b load the page!!
It will display the @e source. See example:
If you want to load a document from some location use
LoadPage() instead.
@param source
The HTML document source to be displayed.
The HTML document source to be displayed.
@returns @false if an error occurred, @true otherwise.
*/
bool SetPage(const wxString& source);
/**
Sets the frame in which page title will be displayed. @e format is format of
Sets the frame in which page title will be displayed. @a format is format of
frame title, e.g. "HtmlHelp : %s". It must contain exactly one %s. This
%s is substituted with HTML page title.
*/
@@ -364,7 +369,7 @@ public:
(Default is -1 = no messages.)
@param bar
statusbar slot number (0..n)
statusbar slot number (0..n)
*/
void SetRelatedStatusBar(int bar);
@@ -378,14 +383,12 @@ public:
if given, otherwise it saves info into currently selected path.
Regardless of whether the path is given or not, the function creates sub-path
@c wxHtmlWindow.
Saved values: all things set by SetFonts, SetBorders.
@param cfg
wxConfig to which you want to save the configuration.
wxConfig to which you want to save the configuration.
@param path
Optional path in config tree. If not given, the current path is used.
Optional path in config tree. If not given, the current path is used.
*/
virtual void WriteCustomization(wxConfigBase cfg,
wxString path = wxEmptyString);
@@ -407,7 +410,7 @@ public:
/**
The constructor is not normally used by the user code.
*/
wxHyperlinkEvent(int id, const wxHtmlLinkInfo & linkinfo);
wxHyperlinkEvent(int id, const wxHtmlLinkInfo& linkinfo);
/**
Returns the wxHtmlLinkInfo which contains info about the cell clicked and the
@@ -433,13 +436,13 @@ public:
The constructor is not normally used by the user code.
*/
wxHtmlCellEvent(wxEventType commandType, int id,
wxHtmlCell * cell,
const wxPoint & point);
wxHtmlCell* cell,
const wxPoint& point);
/**
Returns the wxHtmlCellEvent associated with the event.
*/
wxHtmlCell * GetCell();
wxHtmlCell* GetCell();
/**
Returns @true if @ref setlinkclicked() SetLinkClicked(@true) has previously
+40 -63
View File
@@ -39,56 +39,50 @@ public:
Renders HTML text to the DC.
@param x,y
position of upper-left corner of printing rectangle (see SetSize)
position of upper-left corner of printing rectangle (see SetSize)
@param from
y-coordinate of the very first visible cell
y-coordinate of the very first visible cell
@param dont_render
if @true then this method only returns y coordinate of the next page
and does not output anything
if @true then this method only returns y coordinate of the next page
and does not output anything
*/
int Render(int x, int y, int from = 0, int dont_render = @false);
int Render(int x, int y, int from = 0, int dont_render = false);
/**
Assign DC instance to the renderer.
@e pixel_scale can be used when rendering to high-resolution DCs (e.g. printer)
@a pixel_scale can be used when rendering to high-resolution DCs (e.g. printer)
to adjust size of pixel metrics.
(Many dimensions in HTML are given in pixels -- e.g. image sizes. 300x300 image
would be only one
inch wide on typical printer. With pixel_scale = 3.0 it would be 3 inches.)
*/
#define void SetDC(wxDC* dc, double pixel_scale = 1.0) /* implementation is private */
void SetDC(wxDC* dc, double pixel_scale = 1.0);
/**
Sets fonts. See wxHtmlWindow::SetFonts for
detailed description.
See also SetSize().
*/
void SetFonts(const wxString& normal_face,
const wxString& fixed_face,
const int sizes = @NULL);
const int sizes = NULL);
/**
Assign text to the renderer. Render() then draws
the text onto DC.
@param html
HTML text. This is not a filename.
HTML text. This is not a filename.
@param basepath
base directory (html string would be stored there if it was in
file). It is used to determine path for loading images, for example.
base directory (html string would be stored there if it was in
file). It is used to determine path for loading images, for example.
@param isdir
@false if basepath is filename, @true if it is directory name
(see wxFileSystem for detailed explanation)
@false if basepath is filename, @true if it is directory name
(see wxFileSystem for detailed explanation)
*/
void SetHtmlText(const wxString& html,
const wxString& basepath = wxEmptyString,
bool isdir = @true);
bool isdir = true);
/**
Set size of output rectangle, in pixels. Note that you @b can't change
@@ -117,14 +111,13 @@ public:
Constructor.
@param name
Name of the printing object. Used by preview frames and setup dialogs.
Name of the printing object. Used by preview frames and setup dialogs.
@param parentWindow
pointer to the window that will own the preview frame and setup dialogs. May be
@NULL.
pointer to the window that will own the preview frame and setup dialogs.
May be @NULL.
*/
wxHtmlEasyPrinting(const wxString& name = "Printing",
wxWindow* parentWindow = @NULL);
wxWindow* parentWindow = NULL);
/**
Returns a pointer to wxPageSetupDialogData instance used by
@@ -150,7 +143,6 @@ public:
/**
Preview HTML file.
Returns @false in case of error -- call
wxPrinter::GetLastError to get detailed
information about the kind of the error.
@@ -159,24 +151,21 @@ public:
/**
Preview HTML text (not file!).
Returns @false in case of error -- call
wxPrinter::GetLastError to get detailed
information about the kind of the error.
@param htmltext
HTML text.
HTML text.
@param basepath
base directory (html string would be stored there if it was in
file). It is used to determine path for loading images, for example.
base directory (html string would be stored there if it was in
file). It is used to determine path for loading images, for example.
*/
bool PreviewText(const wxString& htmltext,
const wxString& basepath = wxEmptyString);
/**
Print HTML file.
Returns @false in case of error -- call
wxPrinter::GetLastError to get detailed
information about the kind of the error.
@@ -185,17 +174,15 @@ public:
/**
Print HTML text (not file!).
Returns @false in case of error -- call
wxPrinter::GetLastError to get detailed
information about the kind of the error.
@param htmltext
HTML text.
HTML text.
@param basepath
base directory (html string would be stored there if it was in
file). It is used to determine path for loading images, for example.
base directory (html string would be stored there if it was in
file). It is used to determine path for loading images, for example.
*/
bool PrintText(const wxString& htmltext,
const wxString& basepath = wxEmptyString);
@@ -206,11 +193,10 @@ public:
*/
void SetFonts(const wxString& normal_face,
const wxString& fixed_face,
const int sizes = @NULL);
const int sizes = NULL);
/**
Set page footer. The following macros can be used inside it:
@DATE@ is replaced by the current date in default format
@PAGENUM@ is replaced by page number
@PAGESCNT@ is replaced by total number of pages
@@ -218,16 +204,14 @@ public:
@TITLE@ is replaced with the title of the document
@param footer
HTML text to be used as footer.
HTML text to be used as footer.
@param pg
one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.
one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.
*/
void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
/**
Set page header. The following macros can be used inside it:
@DATE@ is replaced by the current date in default format
@PAGENUM@ is replaced by page number
@PAGESCNT@ is replaced by total number of pages
@@ -235,10 +219,9 @@ public:
@TITLE@ is replaced with the title of the document
@param header
HTML text to be used as header.
HTML text to be used as header.
@param pg
one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.
one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.
*/
void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
@@ -279,11 +262,10 @@ public:
*/
void SetFonts(const wxString& normal_face,
const wxString& fixed_face,
const int sizes = @NULL);
const int sizes = NULL);
/**
Set page footer. The following macros can be used inside it:
@DATE@ is replaced by the current date in default format
@PAGENUM@ is replaced by page number
@PAGESCNT@ is replaced by total number of pages
@@ -291,16 +273,14 @@ public:
@TITLE@ is replaced with the title of the document
@param footer
HTML text to be used as footer.
HTML text to be used as footer.
@param pg
one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.
one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.
*/
void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
/**
Set page header. The following macros can be used inside it:
@DATE@ is replaced by the current date in default format
@PAGENUM@ is replaced by page number
@PAGESCNT@ is replaced by total number of pages
@@ -308,10 +288,9 @@ public:
@TITLE@ is replaced with the title of the document
@param header
HTML text to be used as header.
HTML text to be used as header.
@param pg
one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.
one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.
*/
void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
@@ -325,19 +304,17 @@ public:
Prepare the class for printing this HTML text.
@param html
HTML text. (NOT file!)
HTML text. (NOT file!)
@param basepath
base directory (html string would be stored there if it was in
file). It is used to determine path for loading images, for example.
base directory (html string would be stored there if it was in
file). It is used to determine path for loading images, for example.
@param isdir
@false if basepath is filename, @true if it is directory name
(see wxFileSystem for detailed explanation)
@false if basepath is filename, @true if it is directory name
(see wxFileSystem for detailed explanation)
*/
void SetHtmlText(const wxString& html,
const wxString& basepath = wxEmptyString,
bool isdir = @true);
bool isdir = true);
/**
Sets margins in millimeters. Defaults to 1 inch for margins and 0.5cm for space
+13 -15
View File
@@ -26,10 +26,11 @@ public:
/**
You must override this method. In most common case its body consists
only of lines of the following type:
I recommend using the @b TAGS_MODULE_* macros.
@param parser
Pointer to the parser that requested tables filling.
Pointer to the parser that requested tables filling.
*/
virtual void FillHandlersTable(wxHtmlWinParser parser);
};
@@ -52,7 +53,6 @@ class wxHtmlWinTagHandler : public wxHtmlTagHandler
public:
/**
@b wxHtmlWinParser* m_WParser
Value of this attribute is identical to value of m_Parser. The only different
is that m_WParser points to wxHtmlWinParser object while m_Parser
points to wxHtmlParser object. (The same object, but overcast.)
@@ -81,7 +81,7 @@ public:
//@{
/**
Constructor. Don't use the default one, use constructor with
@e wndIface parameter (@e wndIface is a pointer to interface object for
@a wndIface parameter (@a wndIface is a pointer to interface object for
the associated wxHtmlWindow or other HTML rendering
window such as wxHtmlListBox).
*/
@@ -125,7 +125,6 @@ public:
/**
Returns (average) char height in standard font. It is used as DC-independent
metrics.
@b Note: This function doesn't return the @e actual height. If you want to
know the height of the current font, call @c GetDC - GetCharHeight().
*/
@@ -134,7 +133,6 @@ public:
/**
Returns average char width in standard font. It is used as DC-independent
metrics.
@b Note: This function doesn't return the @e actual width. If you want to
know the height of the current font, call @c GetDC - GetCharWidth()
*/
@@ -149,14 +147,14 @@ public:
/**
Returns pointer to the DC used during parsing.
*/
#define wxDC* GetDC() /* implementation is private */
wxDC* GetDC();
/**
Returns wxEncodingConverter class used
to do conversion between @ref getinputencoding() "input encoding"
and @ref getoutputencoding() "output encoding".
*/
wxEncodingConverter * GetEncodingConverter();
wxEncodingConverter* GetEncodingConverter();
/**
Returns @true if actual font is bold, @false otherwise.
@@ -242,19 +240,19 @@ public:
should use OpenContainer
wherever possible.
*/
wxHtmlContainerCell* SetContainer(wxHtmlContainerCell * c);
wxHtmlContainerCell* SetContainer(wxHtmlContainerCell* c);
/**
Sets the DC. This must be called before wxHtmlParser::Parse!
@e pixel_scale can be used when rendering to high-resolution
@a pixel_scale can be used when rendering to high-resolution
DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
HTML are given in pixels -- e.g. image sizes. 300x300 image would be only one
inch wide on typical printer. With pixel_scale = 3.0 it would be 3 inches.)
*/
#define virtual void SetDC(wxDC dc, double pixel_scale = 1.0) /* implementation is private */
virtual void SetDC(wxDC dc, double pixel_scale = 1.0);
/**
Sets bold flag of actualfont. @e x is either @true of @false.
Sets bold flag of actualfont. @a x is either @true of @false.
*/
void SetFontBold(int x);
@@ -266,12 +264,12 @@ public:
void SetFontFace(const wxString& face);
/**
Sets fixed face flag of actualfont. @e x is either @true of @false.
Sets fixed face flag of actualfont. @a x is either @true of @false.
*/
void SetFontFixed(int x);
/**
Sets italic flag of actualfont. @e x is either @true of @false.
Sets italic flag of actualfont. @a x is either @true of @false.
*/
void SetFontItalic(int x);
@@ -281,7 +279,7 @@ public:
void SetFontSize(int s);
/**
Sets underlined flag of actualfont. @e x is either @true of @false.
Sets underlined flag of actualfont. @a x is either @true of @false.
*/
void SetFontUnderlined(int x);
@@ -291,7 +289,7 @@ public:
*/
void SetFonts(const wxString& normal_face,
const wxString& fixed_face,
const int sizes = @NULL);
const int sizes = NULL);
/**
Sets input encoding. The parser uses this information to build conversion