Moved wxWindow::SetSizeHints implementation to wxTopLevelWindow,

where it belongs, verified that it works for wxDialog, too.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2003-03-30 19:34:51 +00:00
parent ccb234b4d0
commit 66f8b9ace2
4 changed files with 32 additions and 42 deletions

View File

@@ -317,6 +317,25 @@ bool wxTopLevelWindowMotif::IsMaximized() const
return FALSE;
}
void wxTopLevelWindowMotif::SetSizeHints( int minW, int minH,
int maxW, int maxH,
int incW, int incH )
{
wxTopLevelWindowBase::SetSizeHints( minW, minH, maxW, maxH, incW, incH );
int count = 0;
Arg args[6];
if( minW > -1 ) { XtSetArg( args[count], XmNminWidth, minW ); ++count; }
if( minH > -1 ) { XtSetArg( args[count], XmNminHeight, minH ); ++count; }
if( maxW > -1 ) { XtSetArg( args[count], XmNmaxWidth, maxW ); ++count; }
if( maxH > -1 ) { XtSetArg( args[count], XmNmaxHeight, maxH ); ++count; }
if( incW > -1 ) { XtSetArg( args[count], XmNwidthInc, incW ); ++count; }
if( incH > -1 ) { XtSetArg( args[count], XmNheightInc, incH ); ++count; }
XtSetValues( (Widget)GetShellWidget(), args, count );
}
// ---------------------------------------------------------------------------
// Callback definition
// ---------------------------------------------------------------------------