]> git.saurik.com Git - wxWidgets.git/blobdiff - user/wxLayout/wxlwindow.cpp
added a comment and hopefully improved extent detectionn
[wxWidgets.git] / user / wxLayout / wxlwindow.cpp
index 333fd782b2dae2078c6b3eb640b057642bcb1f46..9a7312579b16cf9a07e01c2f39f3add48a627b01 100644 (file)
@@ -37,7 +37,7 @@ wxLayoutWindow::OnMouse(wxMouseEvent& event)
    m_FindPos.y = event.GetY();
    m_FoundObject = NULL;
 
    m_FindPos.y = event.GetY();
    m_FoundObject = NULL;
 
-#ifdef   WXDEBUG
+#ifdef   WXLAYOUT_DEBUG
    cerr << "OnMouse: " << m_FindPos.x << ',' << m_FindPos.y << endl;
 #endif
    Refresh();
    cerr << "OnMouse: " << m_FindPos.x << ',' << m_FindPos.y << endl;
 #endif
    Refresh();
@@ -47,6 +47,8 @@ wxLayoutWindow::OnMouse(wxMouseEvent& event)
       {
          wxCommandEvent commandEvent(wxEVENT_TYPE_MENU_COMMAND, m_EventId);
          commandEvent.SetEventObject( this );
       {
          wxCommandEvent commandEvent(wxEVENT_TYPE_MENU_COMMAND, m_EventId);
          commandEvent.SetEventObject( this );
+         commandEvent.SetClientData((char *)m_FoundObject);
+         m_ClickPosition = wxPoint(event.GetX(), event.GetY());
          GetEventHandler()->ProcessEvent(commandEvent);
       }
    }
          GetEventHandler()->ProcessEvent(commandEvent);
       }
    }
@@ -90,7 +92,7 @@ wxLayoutWindow::OnChar(wxKeyEvent& event)
    case WXK_RETURN:
       m_llist.LineBreak();
       break;
    case WXK_RETURN:
       m_llist.LineBreak();
       break;
-#ifdef WXDEBUG   
+#ifdef WXLAYOUT_DEBUG   
    case WXK_F1:
       m_llist.Debug();
       break;
    case WXK_F1:
       m_llist.Debug();
       break;
@@ -98,7 +100,7 @@ wxLayoutWindow::OnChar(wxKeyEvent& event)
    default:
       if(keyCode < 256 && keyCode >= 32)
       {
    default:
       if(keyCode < 256 && keyCode >= 32)
       {
-         wxString tmp;
+         String tmp;
          tmp += keyCode;
          m_llist.Insert(tmp);
       }
          tmp += keyCode;
          m_llist.Insert(tmp);
       }
@@ -139,6 +141,8 @@ wxLayoutWindow::UpdateScrollbars(void)
 void
 wxLayoutWindow::Print(void)
 {
 void
 wxLayoutWindow::Print(void)
 {
+   VAR(wxThePrintSetupData);
+
    wxPostScriptDC   dc("layout.ps",true,this);
    if (dc.Ok() && dc.StartDoc((char *)_("Printing message...")))
    {
    wxPostScriptDC   dc("layout.ps",true,this);
    if (dc.Ok() && dc.StartDoc((char *)_("Printing message...")))
    {