]> git.saurik.com Git - wxWidgets.git/blame - src/os2/popupwin.cpp
added HAVE_FSYNC and wxHAVE_PTHREAD_CLEANUP (replacing HAVE_THREAD_CLEANUP_FUNCTIONS)
[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>
65571936 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
496959eb 31#if wxUSE_POPUPWIN
63ebec23
DW
32#include "wx/popupwin.h"
33
34// ============================================================================
35// implementation
36// ============================================================================
37
6670f564
WS
38bool wxPopupWindow::Create( wxWindow* pParent,
39 int nFlags )
63ebec23
DW
40{
41 return wxPopupWindowBase::Create(pParent) &&
42 wxWindow::Create( pParent
43 ,-1
44 ,wxDefaultPosition
45 ,wxDefaultSize
46 ,nFlags | wxPOPUP_WINDOW
47 );
48} // end of wxPopupWindow::Create
49
6670f564
WS
50void wxPopupWindow::DoGetPosition( int* pnX,
51 int* pnY ) const
63ebec23
DW
52{
53 //
54 // The position of a "top level" window such as this should be in
55 // screen coordinates, not in the client ones which MSW gives us
56 // (because we are a child window)
57 //
58 wxPopupWindowBase::DoGetPosition(pnX, pnY);
59 GetParent()->ClientToScreen(pnX, pnY);
60} // end of wxPopupWindow::DoGetPosition
61
47df2b8c
DW
62WXHWND wxPopupWindow::OS2GetParent() const
63{
64 // we must be a child of the desktop to be able to extend beyond the parent
65 // window client area (like the comboboxes drop downs do)
66 //
67 return (WXHWND)HWND_DESKTOP;
68} // end of wxPopupWindow::OS2GetParent
69
6670f564
WS
70WXDWORD wxPopupWindow::OS2GetStyle( long lFlags,
71 WXDWORD* dwExstyle ) const
63ebec23 72{
6670f564
WS
73 WXDWORD dwStyle = wxWindow::OS2GetStyle( lFlags & wxBORDER_MASK
74 ,dwExstyle
75 );
63ebec23
DW
76
77 return dwStyle;
78} // end of wxPopupWindow::OS2GetStyle
496959eb 79#endif