]>
git.saurik.com Git - wxWidgets.git/blob - src/motif/popupwin.cpp
ffa6837734a941c9a244e1b6f082912fb0b473da
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 wxAddWindowToTable( (Widget
) m_mainWidget
, this );
49 DoSetSizeIntr( -1, -1, 100, 100, 0, true );
51 XtSetMappedWhenManaged( popup
, False
);
52 XtRealizeWidget( popup
);
53 XtManageChild ( popup
);
56 XtOverrideTranslations (popup,
57 ptr = XtParseTranslationTable ("<Configure>: resize()"));
58 XtFree ((char *) ptr);
63 bool wxPopupWindow::Show( bool show
)
65 if( !wxWindowBase::Show( show
) )
70 XtPopup( (Widget
)GetMainWidget(), XtGrabNonexclusive
);
74 XtPopdown( (Widget
)GetMainWidget() );