Minor Motif changes, made scrollsub sample work somehow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-10-27 19:01:58 +00:00
parent bd8ed12c5a
commit 76db86e7e1
8 changed files with 138 additions and 166 deletions

View File

@@ -245,13 +245,33 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
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
(
"canvasBorder",
xmFrameWidgetClass, parentWidget,
XmNshadowType, XmSHADOW_IN,
NULL
);
} else if (style & wxRAISED_BORDER)
{
m_borderWidget = (WXWidget)XtVaCreateManagedWidget
(
"canvasBorder",
xmFrameWidgetClass, parentWidget,
XmNshadowType, XmSHADOW_OUT,
NULL
);
}
@@ -880,6 +900,18 @@ void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
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);