]>
Commit | Line | Data |
---|---|---|
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> | |
9 | // License: wxWindows license | |
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 | ||
33 | // ============================================================================ | |
34 | // implementation | |
35 | // ============================================================================ | |
36 | ||
37 | bool wxPopupWindow::Create( | |
38 | wxWindow* pParent | |
39 | , int nFlags | |
40 | ) | |
41 | { | |
42 | return wxPopupWindowBase::Create(pParent) && | |
43 | wxWindow::Create( pParent | |
44 | ,-1 | |
45 | ,wxDefaultPosition | |
46 | ,wxDefaultSize | |
47 | ,nFlags | wxPOPUP_WINDOW | |
48 | ); | |
49 | } // end of wxPopupWindow::Create | |
50 | ||
51 | void wxPopupWindow::DoGetPosition( | |
52 | int* pnX | |
53 | , int* pnY | |
54 | ) const | |
55 | { | |
56 | // | |
57 | // The position of a "top level" window such as this should be in | |
58 | // screen coordinates, not in the client ones which MSW gives us | |
59 | // (because we are a child window) | |
60 | // | |
61 | wxPopupWindowBase::DoGetPosition(pnX, pnY); | |
62 | GetParent()->ClientToScreen(pnX, pnY); | |
63 | } // end of wxPopupWindow::DoGetPosition | |
64 | ||
65 | WXDWORD wxPopupWindow::OS2GetStyle( | |
66 | long lFlags | |
67 | , WXDWORD* dwExstyle | |
68 | ) const | |
69 | { | |
70 | WXDWORD dwStyle = wxWindow::OS2GetStyle( lFlags & wxBORDER_MASK | |
71 | ,dwExstyle | |
72 | ); | |
73 | ||
74 | return dwStyle; | |
75 | } // end of wxPopupWindow::OS2GetStyle | |
76 |