]>
git.saurik.com Git - wxWidgets.git/blob - src/motif/popupwin.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/motif/popupwin.cpp
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"
22 #pragma message disable nosimpint
26 #pragma message enable nosimpint
29 #include "wx/motif/private.h"
31 bool wxPopupWindow::Create( wxWindow
*parent
, int flags
)
33 if( !wxPopupWindowBase::Create( parent
, flags
) )
38 parent
->AddChild( this );
40 Widget popup
= XtVaCreatePopupShell( "shell",
41 overrideShellWidgetClass
,
42 (Widget
)wxTheApp
->GetTopLevelWidget(),
45 m_mainWidget
= (WXWidget
)popup
;
47 SetSize( 100, 100 ); // for child creation to work
49 XtSetMappedWhenManaged( popup
, False
);
50 XtRealizeWidget( popup
);
55 bool wxPopupWindow::Show( bool show
)
57 if( !wxWindowBase::Show( show
) )
62 XtPopup( (Widget
)GetMainWidget(), XtGrabNone
);
66 XtPopdown( (Widget
)GetMainWidget() );