]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/window.cpp
VTK wrapper of vtkRenderWindow for wxPython. Tested on MSW so far.
[wxWidgets.git] / src / motif / window.cpp
index 0959d93286fffd8195c1c65ea24888c5fb0794c7..3dd230e4e35f921c708bb6c1b7b9dd4100767238 100644 (file)
@@ -245,7 +245,18 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
     XtAppAddActions ((XtAppContext) wxTheApp->GetAppContext(), actions, 1);
 
     Widget parentWidget = (Widget) parent->GetClientWidget();
     XtAppAddActions ((XtAppContext) wxTheApp->GetAppContext(), actions, 1);
 
     Widget parentWidget = (Widget) parent->GetClientWidget();
-    if (style & wxBORDER)
+    
+    if (style & wxSIMPLE_BORDER)
+    {
+        m_borderWidget = (WXWidget)XtVaCreateManagedWidget
+                                   (
+                                    "canvasBorder",
+                                    xmFrameWidgetClass, parentWidget,
+                                    XmNshadowType, XmSHADOW_IN,
+                                    XmNshadowThickness, 1,
+                                    NULL
+                                   );
+    } else if (style & wxSUNKEN_BORDER)
     {
         m_borderWidget = (WXWidget)XtVaCreateManagedWidget
                                    (
     {
         m_borderWidget = (WXWidget)XtVaCreateManagedWidget
                                    (
@@ -254,6 +265,15 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
                                     XmNshadowType, XmSHADOW_IN,
                                     NULL
                                    );
                                     XmNshadowType, XmSHADOW_IN,
                                     NULL
                                    );
+    } else if (style & wxRAISED_BORDER)
+    {
+        m_borderWidget = (WXWidget)XtVaCreateManagedWidget
+                                   (
+                                    "canvasBorder",
+                                    xmFrameWidgetClass, parentWidget,
+                                    XmNshadowType, XmSHADOW_OUT,
+                                    NULL
+                                   );
     }
 
     m_scrolledWindow = (WXWidget)XtVaCreateManagedWidget
     }
 
     m_scrolledWindow = (WXWidget)XtVaCreateManagedWidget
@@ -880,6 +900,18 @@ void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
         GetClientSize(& w, & h);
     }
 
         GetClientSize(& w, & h);
     }
 
+    wxNode *cnode = m_children.First();
+    while (cnode)
+    {
+        wxWindow *child = (wxWindow*) cnode->Data();
+       int sx = 0;
+       int sy = 0;
+       child->GetSize( &sx, &sy );
+        wxPoint pos( child->GetPosition() );
+       child->SetSize( pos.x + dx, pos.y + dy, sx, sy, wxSIZE_ALLOW_MINUS_ONE );
+       cnode = cnode->Next();
+    }
+
     int x1 = (dx >= 0) ? x : x - dx;
     int y1 = (dy >= 0) ? y : y - dy;
     int w1 = w - abs(dx);
     int x1 = (dx >= 0) ? x : x - dx;
     int y1 = (dy >= 0) ? y : y - dy;
     int w1 = w - abs(dx);
@@ -1625,7 +1657,7 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event)
                 // Try for a menu command
                 if (frame->GetMenuBar())
                 {
                 // Try for a menu command
                 if (frame->GetMenuBar())
                 {
-                    wxMenuItem* item = frame->GetMenuBar()->FindItemForId(entry->GetCommand());
+                    wxMenuItem* item = frame->GetMenuBar()->FindItem(entry->GetCommand());
                     if (item)
                     {
                         wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, entry->GetCommand());
                     if (item)
                     {
                         wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, entry->GetCommand());