// Example : m_Cell -> Find(wxHTML_COND_ISANCHOR, "news");
// returns pointer to anchor news
- virtual void OnMouseClick(wxWindow *parent, int x, int y, bool left, bool middle, bool right);
+ virtual void OnMouseClick(wxWindow *parent, int x, int y, const wxMouseEvent& event);
// This function is called when mouse button is clicked over the cell.
// left, middle, right are flags indicating whether the button was or wasn't
// pressed.
void SetBorder(const wxColour& clr1, const wxColour& clr2) {m_UseBorder = TRUE; m_BorderColour1 = clr1, m_BorderColour2 = clr2;}
virtual wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const;
virtual const wxHtmlCell* Find(int condition, const void* param) const;
- virtual void OnMouseClick(wxWindow *parent, int x, int y, bool left, bool middle, bool right);
+ virtual void OnMouseClick(wxWindow *parent, int x, int y, const wxMouseEvent& event);
wxHtmlCell* GetFirstCell() {return m_Cells;}
// returns pointer to the first cell in container or NULL
{
public:
wxHtmlLinkInfo() : wxObject()
- { m_Href = m_Target = wxEmptyString; }
+ { m_Href = m_Target = wxEmptyString; m_Event = NULL; }
wxHtmlLinkInfo(const wxString& href, const wxString& target = wxEmptyString) : wxObject()
- { m_Href = href; m_Target = target; }
+ { m_Href = href; m_Target = target; m_Event = NULL; }
wxHtmlLinkInfo(const wxHtmlLinkInfo& l)
- { m_Href = l.m_Href, m_Target = l.m_Target; }
+ { m_Href = l.m_Href, m_Target = l.m_Target, m_Event = l.m_Event; }
wxHtmlLinkInfo& operator=(const wxHtmlLinkInfo& l)
- { m_Href = l.m_Href, m_Target = l.m_Target; return *this; }
+ { m_Href = l.m_Href, m_Target = l.m_Target, m_Event = l.m_Event; return *this; }
+
+ void SetEvent(const wxMouseEvent *e) { m_Event = e; }
wxString GetHref() const { return m_Href; }
wxString GetTarget() const { return m_Target; }
+ const wxMouseEvent* GetEvent() const { return m_Event; }
private:
wxString m_Href, m_Target;
+ const wxMouseEvent *m_Event;
};
static void AddFilter(wxHtmlFilter *filter);
// Adds input filter
- virtual void OnLinkClicked(wxHtmlLinkInfo *link);
+ virtual void OnLinkClicked(const wxHtmlLinkInfo& link);
// called when users clicked on hypertext link. Default behavior is to
// call LoadPage(loc)
- static void CleanUpStatics();
+ static void CleanUpStatics();
// cleans static variables
wxHtmlWinParser *GetParser() const { return m_Parser; }
void OnIdle(wxIdleEvent& 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)