]>
git.saurik.com Git - wxWidgets.git/blob - src/motif/popupwin.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxPopupWindow implementation
4 // Author: Mattia barbon
8 // Copyright: (c) Mattia barbon
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
15 #include "wx/popupwin.h"
19 #pragma message disable nosimpint
23 #pragma message enable nosimpint
26 #include "wx/motif/private.h"
28 bool wxPopupWindow::Create( wxWindow
*parent
, int flags
)
30 if( !wxPopupWindowBase::Create( parent
, flags
) )
35 parent
->AddChild( this );
37 Widget popup
= XtVaCreatePopupShell( "shell",
38 overrideShellWidgetClass
,
39 (Widget
)wxTheApp
->GetTopLevelWidget(),
42 m_mainWidget
= (WXWidget
)popup
;
44 SetSize( 100, 100 ); // for child creation to work
46 XtSetMappedWhenManaged( popup
, False
);
47 XtRealizeWidget( popup
);
52 bool wxPopupWindow::Show( bool show
)
54 if( !wxWindowBase::Show( show
) )
59 XtPopup( (Widget
)GetMainWidget(), XtGrabNone
);
63 XtPopdown( (Widget
)GetMainWidget() );