]>
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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
13 #pragma implementation "popup.h"
16 #include "wx/popupwin.h"
20 #pragma message disable nosimpint
24 #pragma message enable nosimpint
27 #include "wx/motif/private.h"
29 IMPLEMENT_DYNAMIC_CLASS( wxPopupWindow
, wxWindow
);
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() );