]>
git.saurik.com Git - wxWidgets.git/blob - src/osx/carbon/popupwin.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/popupwin.cpp
3 // Purpose: implements wxPopupWindow for wxMac
4 // Author: Stefan Csomor
8 // Copyright: (c) 2006 Stefan Csomor
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // CAUTION : This is only experimental stuff right now
18 // ----------------------------------------------------------------------------
20 // ----------------------------------------------------------------------------
22 // For compilers that support precompilation, includes "wx.h".
23 #include "wx/wxprec.h"
34 #include "wx/popupwin.h"
35 #include "wx/tooltip.h"
37 #include "wx/osx/private.h"
39 // ============================================================================
41 // ============================================================================
43 wxPopupWindow::~wxPopupWindow()
47 bool wxPopupWindow::Create(wxWindow
*parent
, int flags
)
49 // popup windows are created hidden by default
52 return wxPopupWindowBase::Create(parent
) &&
53 wxNonOwnedWindow::Create(parent
, wxID_ANY
,
54 wxDefaultPosition
, wxDefaultSize
,
55 flags
| wxPOPUP_WINDOW
);
59 bool wxPopupWindow::Show(bool show
)
61 if ( !wxWindow::Show(show
) )
64 if ( m_nowpeer
&& show
)
65 m_nowpeer
->ShowWithoutActivating();
67 m_nowpeer
->Show(false);
71 // because apps expect a size event to occur at this moment
72 wxSizeEvent
event(GetSize() , m_windowId
);
73 event
.SetEventObject(this);
74 HandleWindowEvent(event
);
80 #endif // #if wxUSE_POPUPWIN