]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmlcell.cpp
Chnages to mono-bitmap code.
[wxWidgets.git] / src / html / htmlcell.cpp
index f9f50db98f1534d5481509e73380945766220aac..542c1c656e3af11270bd422445182082964416fb 100644 (file)
@@ -49,15 +49,18 @@ wxHtmlCell::~wxHtmlCell()
 }
 
 
-void wxHtmlCell::OnMouseClick(wxWindow *parent, int x, int y,
-                              bool WXUNUSED(left),
-                              bool WXUNUSED(middle),
-                              bool WXUNUSED(right))
+void wxHtmlCell::OnMouseClick(wxWindow *parent, int x, int y, 
+                              const wxMouseEvent& event)
 {
     wxHtmlLinkInfo *lnk = GetLink(x, y);
     if (lnk != NULL)
-        ((wxHtmlWindow*)parent) -> OnLinkClicked(lnk);
+    {
+        wxHtmlLinkInfo lnk2(*lnk);
+        lnk2.SetEvent(&event);
+        lnk2.SetHtmlCell(this);
+        ((wxHtmlWindow*)parent) -> OnLinkClicked(lnk2);
         // note : this overcasting is legal because parent is *always* wxHtmlWindow
+    }
 }
 
 
@@ -444,7 +447,7 @@ const wxHtmlCell* wxHtmlContainerCell::Find(int condition, const void* param) co
 
 
 
-void wxHtmlContainerCell::OnMouseClick(wxWindow *parent, int x, int y, bool left, bool middle, bool right)
+void wxHtmlContainerCell::OnMouseClick(wxWindow *parent, int x, int y, const wxMouseEvent& event)
 {
     if (m_Cells) {
         wxHtmlCell *c = m_Cells;
@@ -453,7 +456,7 @@ void wxHtmlContainerCell::OnMouseClick(wxWindow *parent, int x, int y, bool left
                     (c -> GetPosY() <= y) &&
                     (c -> GetPosX() + c -> GetWidth() > x) &&
                     (c -> GetPosY() + c -> GetHeight() > y)) {
-                c -> OnMouseClick(parent, x - c -> GetPosX(), y - c -> GetPosY(), left, middle, right);
+                c -> OnMouseClick(parent, x - c -> GetPosX(), y - c -> GetPosY(), event);
                 break;
             }
             c = c -> GetNext();