]>
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
7 // Copyright: (c) Mattia barbon
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
14 #include "wx/popupwin.h"
21 #pragma message disable nosimpint
25 #pragma message enable nosimpint
28 #include "wx/motif/private.h"
30 bool wxPopupWindow::Create( wxWindow
*parent
, int flags
)
32 if( !wxPopupWindowBase::Create( parent
, flags
) )
37 parent
->AddChild( this );
39 Widget popup
= XtVaCreatePopupShell( "shell",
40 overrideShellWidgetClass
,
41 (Widget
)wxTheApp
->GetTopLevelWidget(),
44 m_mainWidget
= (WXWidget
)popup
;
46 wxAddWindowToTable( (Widget
) m_mainWidget
, this );
48 DoSetSizeIntr( -1, -1, 100, 100, 0, true );
50 XtSetMappedWhenManaged( popup
, False
);
51 XtRealizeWidget( popup
);
52 XtManageChild ( popup
);
55 XtOverrideTranslations (popup,
56 ptr = XtParseTranslationTable ("<Configure>: resize()"));
57 XtFree ((char *) ptr);
62 bool wxPopupWindow::Show( bool show
)
64 if( !wxWindowBase::Show( show
) )
69 XtPopup( (Widget
)GetMainWidget(), XtGrabNonexclusive
);
73 XtPopdown( (Widget
)GetMainWidget() );