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:
@@ -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,
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -22,20 +22,32 @@ public:
|
||||
Constructor.
|
||||
|
||||
@param clr
|
||||
The color
|
||||
|
||||
The color
|
||||
@param flags
|
||||
Can be one of following:
|
||||
|
||||
wxHTML_CLR_FOREGROUND
|
||||
Can be one of following:
|
||||
|
||||
|
||||
change color of text
|
||||
|
||||
wxHTML_CLR_BACKGROUND
|
||||
|
||||
|
||||
change background color
|
||||
|
||||
|
||||
wxHTML_CLR_FOREGROUND
|
||||
|
||||
|
||||
|
||||
|
||||
change color of text
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxHTML_CLR_BACKGROUND
|
||||
|
||||
|
||||
|
||||
|
||||
change background color
|
||||
*/
|
||||
wxHtmlColourCell(wxColour clr, int flags = wxHTML_CLR_FOREGROUND);
|
||||
};
|
||||
@@ -62,14 +74,13 @@ public:
|
||||
Constructor.
|
||||
|
||||
@param wnd
|
||||
Connected window. It is parent window must be the wxHtmlWindow object within
|
||||
which it is displayed!
|
||||
|
||||
Connected window. It is parent window must be the wxHtmlWindow object within
|
||||
which it is displayed!
|
||||
@param w
|
||||
Floating width. If non-zero width of wnd window is adjusted so that it is
|
||||
always w percents of parent container's width. (For example w = 100 means that
|
||||
the window
|
||||
will always have same width as parent container)
|
||||
Floating width. If non-zero width of wnd window is adjusted so that it is
|
||||
always w percents of parent container's width. (For example w = 100 means
|
||||
that the window
|
||||
will always have same width as parent container)
|
||||
*/
|
||||
wxHtmlWidgetCell(wxWindow* wnd, int w = 0);
|
||||
};
|
||||
@@ -108,31 +119,26 @@ public:
|
||||
should not be crossed by words, images etc.). If this cell cannot be divided
|
||||
into two pieces (each one on another page) then it moves the pagebreak
|
||||
few pixels up.
|
||||
|
||||
Returns @true if pagebreak was modified, @false otherwise
|
||||
|
||||
Usage:
|
||||
*/
|
||||
virtual bool AdjustPagebreak(int * pagebreak);
|
||||
virtual bool AdjustPagebreak(int* pagebreak);
|
||||
|
||||
/**
|
||||
Renders the cell.
|
||||
|
||||
@param dc
|
||||
Device context to which the cell is to be drawn
|
||||
|
||||
Device context to which the cell is to be drawn
|
||||
@param x,y
|
||||
Coordinates of parent's upper left corner (origin). You must
|
||||
add this to m_PosX,m_PosY when passing coordinates to dc's methods
|
||||
Example : dc - DrawText("hello", x + m_PosX, y + m_PosY)
|
||||
|
||||
Coordinates of parent's upper left corner (origin). You must
|
||||
add this to m_PosX,m_PosY when passing coordinates to dc's methods
|
||||
Example : dc - DrawText("hello", x + m_PosX, y + m_PosY)
|
||||
@param view_y1
|
||||
y-coord of the first line visible in window. This is
|
||||
used to optimize rendering speed
|
||||
|
||||
y-coord of the first line visible in window. This is
|
||||
used to optimize rendering speed
|
||||
@param view_y2
|
||||
y-coord of the last line visible in window. This is
|
||||
used to optimize rendering speed
|
||||
y-coord of the last line visible in window. This is
|
||||
used to optimize rendering speed
|
||||
*/
|
||||
virtual void Draw(wxDC& dc, int x, int y, int view_y1,
|
||||
int view_y2);
|
||||
@@ -144,12 +150,11 @@ public:
|
||||
or font setter) must be drawn even if they are invisible!
|
||||
|
||||
@param dc
|
||||
Device context to which the cell is to be drawn
|
||||
|
||||
Device context to which the cell is to be drawn
|
||||
@param x,y
|
||||
Coordinates of parent's upper left corner. You must
|
||||
add this to m_PosX,m_PosY when passing coordinates to dc's methods
|
||||
Example : dc - DrawText("hello", x + m_PosX, y + m_PosY)
|
||||
Coordinates of parent's upper left corner. You must
|
||||
add this to m_PosX,m_PosY when passing coordinates to dc's methods
|
||||
Example : dc - DrawText("hello", x + m_PosX, y + m_PosY)
|
||||
*/
|
||||
virtual void DrawInvisible(wxDC& dc, int x, int y);
|
||||
|
||||
@@ -158,16 +163,14 @@ public:
|
||||
following in the list matches), @NULL otherwise.
|
||||
(In other words if you call top-level container's Find it will
|
||||
return pointer to the first cell that matches the condition)
|
||||
|
||||
It is recommended way how to obtain pointer to particular cell or
|
||||
to cell of some type (e.g. wxHtmlAnchorCell reacts on
|
||||
wxHTML_COND_ISANCHOR condition)
|
||||
|
||||
@param condition
|
||||
Unique integer identifier of condition
|
||||
|
||||
Unique integer identifier of condition
|
||||
@param param
|
||||
Optional parameters
|
||||
Optional parameters
|
||||
*/
|
||||
virtual const wxHtmlCell* Find(int condition, const void* param);
|
||||
|
||||
@@ -181,7 +184,6 @@ public:
|
||||
Returns pointer to the first cell in the list.
|
||||
You can then use child's GetNext()
|
||||
method to obtain pointer to the next cell in list.
|
||||
|
||||
@b Note: This shouldn't be used by the end user. If you need some way of
|
||||
finding particular cell in the list, try Find() method
|
||||
instead.
|
||||
@@ -204,9 +206,9 @@ public:
|
||||
(Note: this makes sense only for visible tags).
|
||||
|
||||
@param x,y
|
||||
Coordinates of position where the user pressed mouse button.
|
||||
These coordinates are used e.g. by COLORMAP. Values are relative to the
|
||||
upper left corner of THIS cell (i.e. from 0 to m_Width or m_Height)
|
||||
Coordinates of position where the user pressed mouse button.
|
||||
These coordinates are used e.g. by COLORMAP. Values are relative to the
|
||||
upper left corner of THIS cell (i.e. from 0 to m_Width or m_Height)
|
||||
*/
|
||||
virtual wxHtmlLinkInfo* GetLink(int x = 0, int y = 0);
|
||||
|
||||
@@ -214,7 +216,7 @@ public:
|
||||
Returns cursor to show when mouse pointer is over the cell.
|
||||
|
||||
@param window
|
||||
interface to the parent HTML window
|
||||
interface to the parent HTML window
|
||||
*/
|
||||
virtual wxCursor GetMouseCursor(wxHtmlWindowInterface* window);
|
||||
|
||||
@@ -250,13 +252,11 @@ public:
|
||||
|
||||
/**
|
||||
This method performs two actions:
|
||||
|
||||
adjusts the cell's width according to the fact that maximal possible width is
|
||||
@e w.
|
||||
(this has sense when working with horizontal lines, tables etc.)
|
||||
prepares layout (=fill-in m_PosX, m_PosY (and sometimes m_Height) members)
|
||||
based on actual width @e w
|
||||
|
||||
It must be called before displaying cells structure because
|
||||
m_PosX and m_PosY are undefined (or invalid)
|
||||
before calling Layout.
|
||||
@@ -270,13 +270,11 @@ public:
|
||||
wxHtmlWindow::LoadPage.
|
||||
|
||||
@param window
|
||||
interface to the parent HTML window
|
||||
|
||||
interface to the parent HTML window
|
||||
@param pos
|
||||
coordinates of mouse click (this is relative to cell's origin
|
||||
|
||||
coordinates of mouse click (this is relative to cell's origin
|
||||
@param event
|
||||
mouse event that triggered the call
|
||||
mouse event that triggered the call
|
||||
|
||||
@returns @true if a link was clicked, @false otherwise.
|
||||
*/
|
||||
@@ -331,7 +329,7 @@ class wxHtmlContainerCell : public wxHtmlCell
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Constructor. @e parent is pointer to parent container or @NULL.
|
||||
Constructor. @a parent is pointer to parent container or @NULL.
|
||||
*/
|
||||
wxHtmlContainerCell(wxHtmlContainerCell parent);
|
||||
|
||||
@@ -353,17 +351,16 @@ public:
|
||||
wxColour GetBackgroundColour();
|
||||
|
||||
/**
|
||||
Returns the indentation. @e ind is one of the @b wxHTML_INDENT_* constants.
|
||||
|
||||
Returns the indentation. @a ind is one of the @b wxHTML_INDENT_* constants.
|
||||
@b Note: You must call GetIndentUnits()
|
||||
with same @e ind parameter in order to correctly interpret the returned integer
|
||||
with same @a ind parameter in order to correctly interpret the returned integer
|
||||
value.
|
||||
It is NOT always in pixels!
|
||||
*/
|
||||
int GetIndent(int ind);
|
||||
|
||||
/**
|
||||
Returns the units of indentation for @e ind where @e ind is one
|
||||
Returns the units of indentation for @a ind where @a ind is one
|
||||
of the @b wxHTML_INDENT_* constants.
|
||||
*/
|
||||
int GetIndentUnits(int ind);
|
||||
@@ -383,30 +380,55 @@ public:
|
||||
|
||||
/**
|
||||
Sets the container's @e horizontal alignment. During wxHtmlCell::Layout
|
||||
each line is aligned according to @e al value.
|
||||
each line is aligned according to @a al value.
|
||||
|
||||
@param al
|
||||
new horizontal alignment. May be one of these values:
|
||||
|
||||
wxHTML_ALIGN_LEFT
|
||||
new horizontal alignment. May be one of these values:
|
||||
|
||||
|
||||
lines are left-aligned (default)
|
||||
|
||||
wxHTML_ALIGN_JUSTIFY
|
||||
|
||||
|
||||
lines are justified
|
||||
|
||||
wxHTML_ALIGN_CENTER
|
||||
|
||||
|
||||
lines are centered
|
||||
|
||||
wxHTML_ALIGN_RIGHT
|
||||
wxHTML_ALIGN_LEFT
|
||||
|
||||
|
||||
lines are right-aligned
|
||||
|
||||
|
||||
lines are left-aligned (default)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxHTML_ALIGN_JUSTIFY
|
||||
|
||||
|
||||
|
||||
|
||||
lines are justified
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxHTML_ALIGN_CENTER
|
||||
|
||||
|
||||
|
||||
|
||||
lines are centered
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxHTML_ALIGN_RIGHT
|
||||
|
||||
|
||||
|
||||
|
||||
lines are right-aligned
|
||||
*/
|
||||
void SetAlignHor(int al);
|
||||
|
||||
@@ -414,22 +436,41 @@ public:
|
||||
Sets the container's @e vertical alignment. This is per-line alignment!
|
||||
|
||||
@param al
|
||||
new vertical alignment. May be one of these values:
|
||||
|
||||
wxHTML_ALIGN_BOTTOM
|
||||
new vertical alignment. May be one of these values:
|
||||
|
||||
|
||||
cells are over the line (default)
|
||||
|
||||
wxHTML_ALIGN_CENTER
|
||||
|
||||
|
||||
cells are centered on line
|
||||
|
||||
wxHTML_ALIGN_TOP
|
||||
|
||||
|
||||
cells are under the line
|
||||
wxHTML_ALIGN_BOTTOM
|
||||
|
||||
|
||||
|
||||
|
||||
cells are over the line (default)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxHTML_ALIGN_CENTER
|
||||
|
||||
|
||||
|
||||
|
||||
cells are centered on line
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxHTML_ALIGN_TOP
|
||||
|
||||
|
||||
|
||||
|
||||
cells are under the line
|
||||
*/
|
||||
void SetAlignVer(int al);
|
||||
|
||||
@@ -442,10 +483,9 @@ public:
|
||||
Sets the border (frame) colours. A border is a rectangle around the container.
|
||||
|
||||
@param clr1
|
||||
Colour of top and left lines
|
||||
|
||||
Colour of top and left lines
|
||||
@param clr2
|
||||
Colour of bottom and right lines
|
||||
Colour of bottom and right lines
|
||||
*/
|
||||
void SetBorder(const wxColour& clr1, const wxColour& clr2);
|
||||
|
||||
@@ -453,120 +493,181 @@ public:
|
||||
Sets the indentation (free space between borders of container and subcells).
|
||||
|
||||
@param i
|
||||
Indentation value.
|
||||
|
||||
Indentation value.
|
||||
@param what
|
||||
Determines which of the four borders we're setting. It is OR
|
||||
combination of following constants:
|
||||
|
||||
wxHTML_INDENT_TOP
|
||||
Determines which of the four borders we're setting. It is OR
|
||||
combination of following constants:
|
||||
|
||||
|
||||
top border
|
||||
|
||||
wxHTML_INDENT_BOTTOM
|
||||
|
||||
|
||||
bottom
|
||||
|
||||
wxHTML_INDENT_LEFT
|
||||
|
||||
|
||||
left
|
||||
|
||||
wxHTML_INDENT_RIGHT
|
||||
wxHTML_INDENT_TOP
|
||||
|
||||
|
||||
right
|
||||
|
||||
wxHTML_INDENT_HORIZONTAL
|
||||
|
||||
|
||||
left and right
|
||||
|
||||
wxHTML_INDENT_VERTICAL
|
||||
top border
|
||||
|
||||
|
||||
top and bottom
|
||||
|
||||
wxHTML_INDENT_ALL
|
||||
|
||||
|
||||
all 4 borders
|
||||
|
||||
wxHTML_INDENT_BOTTOM
|
||||
|
||||
|
||||
|
||||
|
||||
bottom
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxHTML_INDENT_LEFT
|
||||
|
||||
|
||||
|
||||
|
||||
left
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxHTML_INDENT_RIGHT
|
||||
|
||||
|
||||
|
||||
|
||||
right
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxHTML_INDENT_HORIZONTAL
|
||||
|
||||
|
||||
|
||||
|
||||
left and right
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxHTML_INDENT_VERTICAL
|
||||
|
||||
|
||||
|
||||
|
||||
top and bottom
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxHTML_INDENT_ALL
|
||||
|
||||
|
||||
|
||||
|
||||
all 4 borders
|
||||
@param units
|
||||
Units of i. This parameter affects interpretation of value.
|
||||
|
||||
wxHTML_UNITS_PIXELS
|
||||
Units of i. This parameter affects interpretation of value.
|
||||
|
||||
|
||||
i is number of pixels
|
||||
|
||||
wxHTML_UNITS_PERCENT
|
||||
|
||||
|
||||
i is interpreted as percents of width
|
||||
of parent container
|
||||
|
||||
|
||||
wxHTML_UNITS_PIXELS
|
||||
|
||||
|
||||
|
||||
|
||||
i is number of pixels
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxHTML_UNITS_PERCENT
|
||||
|
||||
|
||||
|
||||
|
||||
i is interpreted as percents of width
|
||||
of parent container
|
||||
*/
|
||||
void SetIndent(int i, int what, int units = wxHTML_UNITS_PIXELS);
|
||||
|
||||
/**
|
||||
Sets minimal height of the container.
|
||||
|
||||
When container's wxHtmlCell::Layout is called, m_Height
|
||||
is set depending on layout of subcells to the height of area covered
|
||||
by layed-out subcells. Calling this method guarantees you that the height
|
||||
of container is never smaller than @e h - even if the subcells cover
|
||||
of container is never smaller than @a h - even if the subcells cover
|
||||
much smaller area.
|
||||
|
||||
@param h
|
||||
The minimal height.
|
||||
|
||||
The minimal height.
|
||||
@param align
|
||||
If height of the container is lower than the minimum height, empty space must
|
||||
be inserted
|
||||
somewhere in order to ensure minimal height. This parameter is one of
|
||||
If height of the container is lower than the minimum height, empty space
|
||||
must be inserted
|
||||
somewhere in order to ensure minimal height. This parameter is one of
|
||||
wxHTML_ALIGN_TOP,
|
||||
wxHTML_ALIGN_BOTTOM, wxHTML_ALIGN_CENTER. It refers to the contents, not to the
|
||||
empty place.
|
||||
wxHTML_ALIGN_BOTTOM, wxHTML_ALIGN_CENTER. It refers to the contents, not to
|
||||
the
|
||||
empty place.
|
||||
*/
|
||||
void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP);
|
||||
|
||||
//@{
|
||||
/**
|
||||
Sets floating width adjustment.
|
||||
|
||||
The normal behaviour of container is that its width is the same as the width of
|
||||
parent container (and thus you can have only one sub-container per line).
|
||||
You can change this by setting FWA.
|
||||
|
||||
@e pixel_scale is number of real pixels that equals to 1 HTML pixel.
|
||||
@a pixel_scale is number of real pixels that equals to 1 HTML pixel.
|
||||
|
||||
@param w
|
||||
Width of the container. If the value is negative it means
|
||||
complement to full width of parent container (e.g.
|
||||
SetWidthFloat(-50, wxHTML_UNITS_PIXELS) sets the width
|
||||
of container to parent's width minus 50 pixels. This is useful when
|
||||
creating tables - you can call SetWidthFloat(50) and SetWidthFloat(-50))
|
||||
|
||||
Width of the container. If the value is negative it means
|
||||
complement to full width of parent container (e.g.
|
||||
SetWidthFloat(-50, wxHTML_UNITS_PIXELS) sets the width
|
||||
of container to parent's width minus 50 pixels. This is useful when
|
||||
creating tables - you can call SetWidthFloat(50) and SetWidthFloat(-50))
|
||||
@param units
|
||||
Units of w This parameter affects the interpretation of value.
|
||||
|
||||
wxHTML_UNITS_PIXELS
|
||||
Units of w This parameter affects the interpretation of value.
|
||||
|
||||
|
||||
w is number of pixels
|
||||
|
||||
wxHTML_UNITS_PERCENT
|
||||
|
||||
|
||||
w is interpreted as percents of width
|
||||
of parent container
|
||||
|
||||
|
||||
wxHTML_UNITS_PIXELS
|
||||
|
||||
|
||||
|
||||
|
||||
w is number of pixels
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wxHTML_UNITS_PERCENT
|
||||
|
||||
|
||||
|
||||
|
||||
w is interpreted as percents of width
|
||||
of parent container
|
||||
@param tag
|
||||
In the second version of method, w and units
|
||||
info is extracted from tag's WIDTH parameter.
|
||||
In the second version of method, w and units
|
||||
info is extracted from tag's WIDTH parameter.
|
||||
*/
|
||||
void SetWidthFloat(int w, int units);
|
||||
void SetWidthFloat(const wxHtmlTag& tag,
|
||||
@@ -605,7 +706,7 @@ public:
|
||||
only within wxHtmlWindow::OnLinkClicked,
|
||||
@NULL otherwise.
|
||||
*/
|
||||
const wxMouseEvent * GetEvent();
|
||||
const wxMouseEvent* GetEvent();
|
||||
|
||||
/**
|
||||
Return @e HREF value of the @c A tag.
|
||||
@@ -617,7 +718,7 @@ public:
|
||||
only within wxHtmlWindow::OnLinkClicked,
|
||||
@NULL otherwise.
|
||||
*/
|
||||
const wxHtmlCell * GetHtmlCell();
|
||||
const wxHtmlCell* GetHtmlCell();
|
||||
|
||||
/**
|
||||
Return @e TARGET value of the @c A tag (this value
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
};
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user