X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/61243a510fe15e04996a986daaa53ed9fee75484..af01f1ba0d697c07173f436ab661b4c833258a91:/include/wx/os2/window.h diff --git a/include/wx/os2/window.h b/include/wx/os2/window.h index 52399a3a77..a230da8ad2 100644 --- a/include/wx/os2/window.h +++ b/include/wx/os2/window.h @@ -44,18 +44,21 @@ enum // wxWindow declaration for OS/2 PM // --------------------------------------------------------------------------- -class WXDLLEXPORT wxWindow : public wxWindowBase +class WXDLLEXPORT wxWindowOS2 : public wxWindowBase { public: - wxWindow() { Init(); } - - wxWindow( wxWindow* pParent - ,wxWindowID vId - ,const wxPoint& rPos = wxDefaultPosition - ,const wxSize& rSize = wxDefaultSize - ,long lStyle = 0 - ,const wxString& rName = wxPanelNameStr - ) + wxWindowOS2() + { + Init(); + } + + wxWindowOS2( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxString& rName = wxPanelNameStr + ) { Init(); Create( pParent @@ -67,7 +70,7 @@ public: ); } - virtual ~wxWindow(); + virtual ~wxWindowOS2(); bool Create( wxWindow* pParent ,wxWindowID vId @@ -106,10 +109,12 @@ public: ,int* pExternalLeading = (int *)NULL ,const wxFont* pTheFont = (const wxFont *)NULL ) const; +#if wxUSE_MENUS_NATIVE virtual bool DoPopupMenu( wxMenu* pMenu ,int nX ,int nY ); +#endif // wxUSE_MENUS_NATIVE virtual void SetScrollbar( int nOrient ,int nPos @@ -177,6 +182,7 @@ public: ) const; #endif // wxUSE_CARET +#ifndef __WXUNIVERSAL__ // Native resource loading (implemented in src/os2/nativdlg.cpp) // FIXME: should they really be all virtual? virtual bool LoadNativeDialog( wxWindow* pParent @@ -187,6 +193,7 @@ public: ); wxWindow* GetWindowChild1(wxWindowID vId); wxWindow* GetWindowChild(wxWindowID vId); +#endif //__WXUNIVERSAL__ // implementation from now on // -------------------------- @@ -212,13 +219,6 @@ public: // smaller virtual wxPoint GetClientAreaOrigin(void) const; - // Makes an adjustment to the window position (for example, a frame that has - // a toolbar that it manages itself). - virtual void AdjustForParentClientOrigin( int& rX - ,int& rY - ,int nSizeFlags - ); - // Windows subclassing void SubclassWin(WXHWND hWnd); void UnsubclassWin(void); @@ -244,18 +244,20 @@ public: virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return FALSE; }; // returns TRUE if the window has been created - bool OS2Create( int nId - ,wxWindow* pParent - ,const wxChar* zWclass - ,wxWindow* pWxWin + bool OS2Create( WXHWND hParent + ,PSZ zClass ,const wxChar* zTitle - ,int nX - ,int nY - ,int nWidth - ,int nHeight ,WXDWORD dwStyle - ,const wxChar* zDialogTemplate = NULL - ,WXDWORD dwExendedStyle = 0 + ,long lX + ,long lY + ,long lWidth + ,long lHeight + ,WXHWND hOwner + ,WXHWND hZOrder + ,unsigned long lId + ,void* pCtlData = NULL + ,void* pPresParams = NULL + ,WXDWORD dwExStyle = 0L ); virtual bool OS2Command( WXUINT uParam ,WXWORD nId @@ -268,6 +270,7 @@ public: ) const; #endif // WXWIN_COMPATIBILITY +#ifndef __WXUNIVERSAL__ // Create an appropriate wxWindow from a HWND virtual wxWindow* CreateWindowFromHWND( wxWindow* pParent ,WXHWND hWnd @@ -275,6 +278,7 @@ public: // Make sure the window style reflects the HWND style (roughly) virtual void AdoptAttributesFromHWND(void); +#endif // Setup background and foreground colours correctly virtual void SetupColours(void); @@ -364,11 +368,7 @@ public: bool HandleSysCommand( WXWPARAM wParam ,WXLPARAM lParam ); - bool HandleWindowParams( PWNDPARAMS pParams - ,WXLPARAM lParam - ); bool HandlePaletteChanged(); - bool HandlePresParamChanged(WXWPARAM wParam); bool HandleSysColorChange(void); bool HandleCtlColor(WXHBRUSH* hBrush); bool HandleSetFocus(WXHWND hWnd); @@ -383,14 +383,14 @@ public: ,int nY ,WXUINT uFlags ); - bool HandleChar( WXWORD wParam + bool HandleChar( WXDWORD wParam ,WXLPARAM lParam ,bool bIsASCII = FALSE ); bool HandleKeyDown( WXWORD wParam ,WXLPARAM lParam ); - bool HandleKeyUp( WXWORD wParam + bool HandleKeyUp( WXDWORD wParam ,WXLPARAM lParam ); bool HandleQueryDragIcon(WXHICON* phIcon); @@ -459,12 +459,13 @@ protected: // the old window proc (we subclass all windows) WXFARPROC m_fnOldWndProc; - // additional (MSW specific) flags + // additional (OS2 specific) flags bool m_bUseCtl3D:1; // Using CTL3D for this control bool m_bBackgroundTransparent:1; bool m_bMouseInWindow:1; bool m_bDoubleClickAllowed:1; bool m_bWinCaptured:1; + WXDWORD m_dwExStyle; // the size of one page for scrolling int m_nXThumbSize; @@ -511,7 +512,7 @@ protected: // move the window to the specified location and resize it: this is called // from both DoSetSize() and DoSetClientSize() and would usually just call - // ::MoveWindow() except for composite controls which will want to arrange + // ::WinSetWindowPos() except for composite controls which will want to arrange // themselves inside the given rectangle virtual void DoMoveWindow( int nX ,int nY @@ -544,10 +545,13 @@ private: // the helper functions used by HandleChar/KeyXXX methods wxKeyEvent CreateKeyEvent(wxEventType evType, int id, WXLPARAM lp) const; - DECLARE_DYNAMIC_CLASS(wxWindow); - DECLARE_NO_COPY_CLASS(wxWindow); + DECLARE_DYNAMIC_CLASS(wxWindowOS2); + DECLARE_NO_COPY_CLASS(wxWindowOS2) DECLARE_EVENT_TABLE() private: + HWND m_hWndScrollBarHorz; + HWND m_hWndScrollBarVert; + // Virtual function hiding supression inline virtual bool Reparent(wxWindowBase* pNewParent) { return(wxWindowBase::Reparent(pNewParent));};