X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bc55e31bdc7fbf6f1006f298ed8310e7972984e9..bd00fe32fb099384c5fdd337e3749ae461ae497f:/include/wx/html/htmlwin.h diff --git a/include/wx/html/htmlwin.h b/include/wx/html/htmlwin.h index ea22e30601..dd22df3b2d 100644 --- a/include/wx/html/htmlwin.h +++ b/include/wx/html/htmlwin.h @@ -109,6 +109,22 @@ public: /// Sets status bar text. virtual void SetHTMLStatusText(const wxString& text) = 0; + + /// Type of mouse cursor + enum HTMLCursor + { + /// Standard mouse cursor (typically an arrow) + HTMLCursor_Default, + /// Cursor shown over links + HTMLCursor_Link, + /// Cursor shown over selectable text + HTMLCursor_Text + }; + + /** + Returns mouse cursor of given @a type. + */ + virtual wxCursor GetHTMLCursor(HTMLCursor type) const = 0; }; /** @@ -118,7 +134,7 @@ public: */ class WXDLLIMPEXP_HTML wxHtmlWindowMouseHelper { -public: +protected: /** Ctor. @@ -126,6 +142,14 @@ public: */ wxHtmlWindowMouseHelper(wxHtmlWindowInterface *iface); + /** + Virtual dtor. + + It is not really needed in this case but at leats it prevents gcc from + complaining about its absence. + */ + virtual ~wxHtmlWindowMouseHelper() { } + /// Returns true if the mouse moved since the last call to HandleIdle bool DidMouseMove() const { return m_tmpMouseMoved; } @@ -208,7 +232,7 @@ private: class WXDLLIMPEXP_HTML wxHtmlWindow : public wxScrolledWindow, public wxHtmlWindowInterface, - private wxHtmlWindowMouseHelper + public wxHtmlWindowMouseHelper { DECLARE_DYNAMIC_CLASS(wxHtmlWindow) friend class wxHtmlWinModule; @@ -357,6 +381,8 @@ public: virtual void OnInternalIdle(); + /// Returns standard HTML cursor as used by wxHtmlWindow + static wxCursor GetDefaultHTMLCursor(HTMLCursor type); protected: void Init(); @@ -427,6 +453,7 @@ private: virtual void SetHTMLBackgroundColour(const wxColour& clr); virtual void SetHTMLBackgroundImage(const wxBitmap& bmpBg); virtual void SetHTMLStatusText(const wxString& text); + virtual wxCursor GetHTMLCursor(HTMLCursor type) const; // implementation of SetPage() bool DoSetPage(const wxString& source); @@ -512,6 +539,10 @@ private: // is supposed to have been done in OnEraseBackground()) bool m_eraseBgInOnPaint; + // standard mouse cursors + static wxCursor *ms_cursorLink; + static wxCursor *ms_cursorText; + DECLARE_EVENT_TABLE() DECLARE_NO_COPY_CLASS(wxHtmlWindow) };