]> git.saurik.com Git - wxWidgets.git/blame - src/os2/popupwin.cpp
Add "GTK" prefix to wxChoice::{Dis,En}ableEvents() methods in wxGTK.
[wxWidgets.git] / src / os2 / popupwin.cpp
CommitLineData
63ebec23
DW
1///////////////////////////////////////////////////////////////////////////////
2// Name: os2/popupwin.cpp
3// Purpose: implements wxPopupWindow for OS2
4// Author: Dave Webster
5// Modified by:
6// Created: 13.05.02
7// RCS-ID: $Id$
8// Copyright: (c) 2002 Dave Webster <dwebster@bhmi.com>
526954c5 9// Licence: wxWindows licence
63ebec23
DW
10///////////////////////////////////////////////////////////////////////////////
11
12// ============================================================================
13// declarations
14// ============================================================================
15
16// ----------------------------------------------------------------------------
17// headers
18// ----------------------------------------------------------------------------
19
63ebec23
DW
20// For compilers that support precompilation, includes "wx.h".
21#include "wx/wxprec.h"
22
23
24#ifndef WX_PRECOMP
25#endif //WX_PRECOMP
26
496959eb 27#if wxUSE_POPUPWIN
63ebec23
DW
28#include "wx/popupwin.h"
29
30// ============================================================================
31// implementation
32// ============================================================================
33
6670f564
WS
34bool wxPopupWindow::Create( wxWindow* pParent,
35 int nFlags )
63ebec23
DW
36{
37 return wxPopupWindowBase::Create(pParent) &&
38 wxWindow::Create( pParent
39 ,-1
40 ,wxDefaultPosition
41 ,wxDefaultSize
42 ,nFlags | wxPOPUP_WINDOW
43 );
44} // end of wxPopupWindow::Create
45
6670f564
WS
46void wxPopupWindow::DoGetPosition( int* pnX,
47 int* pnY ) const
63ebec23
DW
48{
49 //
50 // The position of a "top level" window such as this should be in
51 // screen coordinates, not in the client ones which MSW gives us
52 // (because we are a child window)
53 //
54 wxPopupWindowBase::DoGetPosition(pnX, pnY);
55 GetParent()->ClientToScreen(pnX, pnY);
56} // end of wxPopupWindow::DoGetPosition
57
47df2b8c
DW
58WXHWND wxPopupWindow::OS2GetParent() const
59{
60 // we must be a child of the desktop to be able to extend beyond the parent
61 // window client area (like the comboboxes drop downs do)
62 //
63 return (WXHWND)HWND_DESKTOP;
64} // end of wxPopupWindow::OS2GetParent
65
6670f564
WS
66WXDWORD wxPopupWindow::OS2GetStyle( long lFlags,
67 WXDWORD* dwExstyle ) const
63ebec23 68{
6670f564
WS
69 WXDWORD dwStyle = wxWindow::OS2GetStyle( lFlags & wxBORDER_MASK
70 ,dwExstyle
71 );
63ebec23
DW
72
73 return dwStyle;
74} // end of wxPopupWindow::OS2GetStyle
496959eb 75#endif