X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1408104d04fdea106c8ec288866c4143078ae71b..07818da861a28c5f20919766756a6d94834455fe:/include/wx/os2/window.h diff --git a/include/wx/os2/window.h b/include/wx/os2/window.h index 457339052a..842c32785a 100644 --- a/include/wx/os2/window.h +++ b/include/wx/os2/window.h @@ -195,7 +195,7 @@ public: // title; for items, this is the label or button text. inline virtual wxString GetLabel() const { return GetTitle(); } - +#if wxUSE_CARET && WXWIN_COMPATIBILITY // Caret manipulation virtual void CreateCaret(int w, int h); virtual void CreateCaret(const wxBitmap *bitmap); @@ -203,7 +203,7 @@ public: virtual void ShowCaret(bool show); virtual void SetCaretPos(int x, int y); virtual void GetCaretPos(int *x, int *y) const; - +#endif // Handle a control command virtual void OnCommand(wxWindow& win, wxCommandEvent& event); @@ -216,6 +216,7 @@ public: // on a listbox) virtual void OnDefaultAction(wxControl *initiatingItem); + // EventHandlers void OnEraseBackground(wxEraseEvent& event); void OnChar(wxKeyEvent& event); void OnKeyDown(wxKeyEvent& event); @@ -223,6 +224,11 @@ public: void OnPaint(wxPaintEvent& event); void OnIdle(wxIdleEvent& event); + // Accessors + + WXHWND GetHWND() const { return m_hWnd; } + void SetHWND(WXHWND hWnd) { m_hWnd = hWnd; } + virtual WXWidget GetHandle() const { return GetHWND(); } public: // --------------------------------------------------------------------------- @@ -237,14 +243,25 @@ public: // a toolbar that it manages itself). virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags); + // Windows subclassing + void SubclassWin(WXHWND hWnd); + void UnsubclassWin(); + + WXFARPROC OS2GetOldWndProc() const { return m_oldWndProc; } + void OS2SetOldWndProc(WXFARPROC proc) { m_oldWndProc = proc; } + + wxWindow *FindItem(long id) const; + wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = FALSE) const; + + // Determine whether 3D effects are wanted + WXDWORD Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D) const; + + // PM only: TRUE if this control is part of the main control + virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return FALSE; }; + // Executes the default message virtual long Default(); -/* TODO: you may need something like this - // Determine whether 3D effects are wanted - virtual WXDWORD Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D); -*/ - // Constraint implementation void UnsetConstraints(wxLayoutConstraints *c); // Back-pointer to other windows we're involved with, so if we delete @@ -255,6 +272,9 @@ public: // Transfers data to any child controls void OnInitDialog(wxInitDialogEvent& event); + virtual MRESULT OS2WindowProc(HWND hwnd, WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + + protected: // Caret data @@ -266,11 +286,26 @@ protected: wxButton * m_defaultItem; public: + WXFARPROC m_oldWndProc; int m_returnCode; + bool m_isBeingDeleted; + bool m_isShown; + bool m_winCaptured; + bool m_mouseInWindow; + bool m_backgroundTransparent; + // handles + WXHWND m_hWnd; + WXHMENU m_hMenu; // Menu, if any + + // the size of one page for scrolling + int m_xThumbSize; + int m_yThumbSize; + long m_lDlgCode; DECLARE_EVENT_TABLE() private: - void Init(); + void Init(); + void PMDetachWindowMenu(); }; ////////////////////////////////////////////////////////////////////////