]> git.saurik.com Git - wxWidgets.git/blame - src/os2/popupwin.cpp
* Fix logical error in m_overflow attribute merging
[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>
6aa89a22 9// License: wxWindows licence
63ebec23
DW
10///////////////////////////////////////////////////////////////////////////////
11
12// ============================================================================
13// declarations
14// ============================================================================
15
16// ----------------------------------------------------------------------------
17// headers
18// ----------------------------------------------------------------------------
19
20#ifdef __GNUG__
21 #pragma implementation "popup.h"
22#endif
23
24// For compilers that support precompilation, includes "wx.h".
25#include "wx/wxprec.h"
26
27
28#ifndef WX_PRECOMP
29#endif //WX_PRECOMP
30
31#include "wx/popupwin.h"
32
47df2b8c 33IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
6ed98c6a 34
63ebec23
DW
35// ============================================================================
36// implementation
37// ============================================================================
38
39bool wxPopupWindow::Create(
40 wxWindow* pParent
41, int nFlags
42)
43{
44 return wxPopupWindowBase::Create(pParent) &&
45 wxWindow::Create( pParent
46 ,-1
47 ,wxDefaultPosition
48 ,wxDefaultSize
49 ,nFlags | wxPOPUP_WINDOW
50 );
51} // end of wxPopupWindow::Create
52
53void wxPopupWindow::DoGetPosition(
54 int* pnX
55, int* pnY
56) const
57{
58 //
59 // The position of a "top level" window such as this should be in
60 // screen coordinates, not in the client ones which MSW gives us
61 // (because we are a child window)
62 //
63 wxPopupWindowBase::DoGetPosition(pnX, pnY);
64 GetParent()->ClientToScreen(pnX, pnY);
65} // end of wxPopupWindow::DoGetPosition
66
47df2b8c
DW
67WXHWND wxPopupWindow::OS2GetParent() const
68{
69 // we must be a child of the desktop to be able to extend beyond the parent
70 // window client area (like the comboboxes drop downs do)
71 //
72 return (WXHWND)HWND_DESKTOP;
73} // end of wxPopupWindow::OS2GetParent
74
63ebec23
DW
75WXDWORD wxPopupWindow::OS2GetStyle(
76 long lFlags
77, WXDWORD* dwExstyle
78) const
79{
80 WXDWORD dwStyle = wxWindow::OS2GetStyle( lFlags & wxBORDER_MASK
81 ,dwExstyle
82 );
83
84 return dwStyle;
85} // end of wxPopupWindow::OS2GetStyle
86
6ed98c6a 87