/// 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;
};
/**
*/
class WXDLLIMPEXP_HTML wxHtmlWindowMouseHelper
{
-public:
+protected:
/**
Ctor.
*/
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; }
class WXDLLIMPEXP_HTML wxHtmlWindow : public wxScrolledWindow,
public wxHtmlWindowInterface,
- private wxHtmlWindowMouseHelper
+ public wxHtmlWindowMouseHelper
{
DECLARE_DYNAMIC_CLASS(wxHtmlWindow)
friend class wxHtmlWinModule;
Init();
Create(parent, id, pos, size, style, name);
}
- ~wxHtmlWindow();
+ virtual ~wxHtmlWindow();
bool Create(wxWindow *parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
virtual void OnInternalIdle();
+ /// Returns standard HTML cursor as used by wxHtmlWindow
+ static wxCursor GetDefaultHTMLCursor(HTMLCursor type);
protected:
void Init();
void OnCopy(wxCommandEvent& event);
void OnMouseEnter(wxMouseEvent& event);
void OnMouseLeave(wxMouseEvent& event);
+ void OnMouseCaptureLost(wxMouseCaptureLostEvent& event);
#endif // wxUSE_CLIPBOARD
// Returns new filter (will be stored into m_DefaultFilter variable)
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);
// defaults to 10 pixels.
int m_Borders;
- int m_Style;
-
// current text selection or NULL
wxHtmlSelection *m_selection;
// 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)
};