Added GetParser method to wxHtmlWindow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -29,13 +29,13 @@
|
|||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
// wxHtmlWindow
|
// wxHtmlWindow
|
||||||
// (This is probably the only class you will directly use.)
|
// (This is probably the only class you will directly use.)
|
||||||
// Purpose of this class is to display HTML page (either local
|
// Purpose of this class is to display HTML page (either local
|
||||||
// file or downloaded via HTTP protocol) in a window. Width
|
// file or downloaded via HTTP protocol) in a window. Width
|
||||||
// of window is constant - given in constructor - virtual height
|
// of window is constant - given in constructor - virtual height
|
||||||
// is changed dynamicly depending on page size.
|
// is changed dynamicly depending on page size.
|
||||||
// Once the window is created you can set it's content by calling
|
// Once the window is created you can set it's content by calling
|
||||||
// SetPage(text) or LoadPage(filename).
|
// SetPage(text) or LoadPage(filename).
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ class WXDLLEXPORT wxHtmlWindow : public wxScrolledWindow
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
wxHtmlWindow() : wxScrolledWindow() {};
|
wxHtmlWindow() : wxScrolledWindow() {};
|
||||||
wxHtmlWindow(wxWindow *parent, wxWindowID id = -1,
|
wxHtmlWindow(wxWindow *parent, wxWindowID id = -1,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
long style = wxHW_SCROLLBAR_AUTO,
|
long style = wxHW_SCROLLBAR_AUTO,
|
||||||
const wxString& name = "htmlWindow");
|
const wxString& name = "htmlWindow");
|
||||||
@@ -126,10 +126,10 @@ class WXDLLEXPORT wxHtmlWindow : public wxScrolledWindow
|
|||||||
|
|
||||||
bool SetPage(const wxString& source);
|
bool SetPage(const wxString& source);
|
||||||
// Set HTML page and display it. !! source is HTML document itself,
|
// Set HTML page and display it. !! source is HTML document itself,
|
||||||
// it is NOT address/filename of HTML document. If you want to
|
// it is NOT address/filename of HTML document. If you want to
|
||||||
// specify document location, use LoadPage() istead
|
// specify document location, use LoadPage() istead
|
||||||
// Return value : FALSE if an error occured, TRUE otherwise
|
// Return value : FALSE if an error occured, TRUE otherwise
|
||||||
|
|
||||||
bool LoadPage(const wxString& location);
|
bool LoadPage(const wxString& location);
|
||||||
// Load HTML page from given location. Location can be either
|
// Load HTML page from given location. Location can be either
|
||||||
// a) /usr/wxGTK2/docs/html/wx.htm
|
// a) /usr/wxGTK2/docs/html/wx.htm
|
||||||
@@ -143,10 +143,10 @@ class WXDLLEXPORT wxHtmlWindow : public wxScrolledWindow
|
|||||||
|
|
||||||
wxString GetOpenedPage() const {return m_OpenedPage;}
|
wxString GetOpenedPage() const {return m_OpenedPage;}
|
||||||
// Returns full location of opened page
|
// Returns full location of opened page
|
||||||
|
|
||||||
void SetRelatedFrame(wxFrame* frame, const wxString& format);
|
void SetRelatedFrame(wxFrame* frame, const wxString& format);
|
||||||
// sets frame in which page title will be displayed. Format is format of
|
// sets frame in which page title will be displayed. Format is format of
|
||||||
// frame title, e.g. "HtmlHelp : %s". It must contain exactly one %s
|
// frame title, e.g. "HtmlHelp : %s". It must contain exactly one %s
|
||||||
wxFrame* GetRelatedFrame() const {return m_RelatedFrame;}
|
wxFrame* GetRelatedFrame() const {return m_RelatedFrame;}
|
||||||
|
|
||||||
void SetRelatedStatusBar(int bar);
|
void SetRelatedStatusBar(int bar);
|
||||||
@@ -188,10 +188,13 @@ class WXDLLEXPORT wxHtmlWindow : public wxScrolledWindow
|
|||||||
virtual void OnLinkClicked(const wxString& link);
|
virtual void OnLinkClicked(const wxString& link);
|
||||||
// called when users clicked on hypertext link. Default behavior is to
|
// called when users clicked on hypertext link. Default behavior is to
|
||||||
// call LoadPage(loc)
|
// call LoadPage(loc)
|
||||||
|
|
||||||
static void CleanUpStatics();
|
static void CleanUpStatics();
|
||||||
// cleans static variables
|
// cleans static variables
|
||||||
|
|
||||||
|
wxHtmlWinParser *GetParser() const { return m_Parser; }
|
||||||
|
// return a pointer to the parser.
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool ScrollToAnchor(const wxString& anchor);
|
bool ScrollToAnchor(const wxString& anchor);
|
||||||
// Scrolls to anchor of this name. (Anchor is #news
|
// Scrolls to anchor of this name. (Anchor is #news
|
||||||
@@ -208,7 +211,7 @@ class WXDLLEXPORT wxHtmlWindow : public wxScrolledWindow
|
|||||||
void OnMouseEvent(wxMouseEvent& event);
|
void OnMouseEvent(wxMouseEvent& event);
|
||||||
void OnIdle(wxIdleEvent& event);
|
void OnIdle(wxIdleEvent& event);
|
||||||
void OnKeyDown(wxKeyEvent& event);
|
void OnKeyDown(wxKeyEvent& event);
|
||||||
|
|
||||||
virtual wxHtmlFilter *GetDefaultFilter() {return new wxHtmlFilterPlainText;}
|
virtual wxHtmlFilter *GetDefaultFilter() {return new wxHtmlFilterPlainText;}
|
||||||
// returns new filter (will be stored into m_DefaultFilter variable)
|
// returns new filter (will be stored into m_DefaultFilter variable)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user