Added wxPopupWindow skeleton (no implementation yet)
[wxWidgets.git] / src / x11 / popupwin.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: popupwin.cpp
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifdef __GNUG__
11 #pragma implementation "popupwin.h"
12 #endif
13
14 #include "wx/defs.h"
15
16 #if wxUSE_POPUPWIN
17
18 #include "wx/popupwin.h"
19 #include "wx/frame.h"
20 #include "wx/app.h"
21 #include "wx/cursor.h"
22
23 #include "wx/x11/private.h"
24
25 //-----------------------------------------------------------------------------
26 // wxPopupWindow
27 //-----------------------------------------------------------------------------
28
29 BEGIN_EVENT_TABLE(wxPopupWindow,wxPopupWindowBase)
30 END_EVENT_TABLE()
31
32 IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
33
34 bool wxPopupWindow::Create( wxWindow *parent, int style )
35 {
36 m_needParent = FALSE;
37
38 if (!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, "popup" ))
39 {
40 wxFAIL_MSG( wxT("wxPopupWindow creation failed") );
41 return FALSE;
42 }
43
44 // All dialogs should really have this style
45 m_windowStyle |= wxTAB_TRAVERSAL;
46
47 if (m_parent) m_parent->AddChild( this );
48
49 // TODO: implementation
50
51 return TRUE;
52 }
53
54 void wxPopupWindow::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width), int WXUNUSED(height) )
55 {
56 wxFAIL_MSG( wxT("DoMoveWindow called for wxPopupWindow") );
57 }
58
59 void wxPopupWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
60 {
61 // TODO
62 }
63 bool wxPopupWindow::Show( bool show )
64 {
65 // TODO?
66 bool ret = wxWindow::Show( show );
67
68 return ret;
69 }
70
71 #endif // wxUSE_POPUPWIN