X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/54da4255a20216b070ec044ae2b8af75e9f2681f..04701dd94f691292563a1f0eb19933819b1c5fe9:/include/wx/os2/dialog.h?ds=sidebyside diff --git a/include/wx/os2/dialog.h b/include/wx/os2/dialog.h index f5609682f5..5bdea1a1d4 100644 --- a/include/wx/os2/dialog.h +++ b/include/wx/os2/dialog.h @@ -1,21 +1,17 @@ ///////////////////////////////////////////////////////////////////////////// // Name: dialog.h // Purpose: wxDialog class -// Author: AUTHOR +// Author: David Webster // Modified by: -// Created: ??/??/98 +// Created: 10/14/99 // RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence +// Copyright: (c) David Webster +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_DIALOG_H_ #define _WX_DIALOG_H_ -#ifdef __GNUG__ -#pragma interface "dialog.h" -#endif - #include "wx/panel.h" WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr; @@ -69,32 +65,40 @@ public: ~wxDialog(); -// --------------------------------------------------------------------------- -// Virtuals -// --------------------------------------------------------------------------- - virtual bool Destroy(); - virtual bool IsIconized() const; - virtual void Centre(int direction = wxBOTH); - virtual bool IsModal() const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); } - virtual int ShowModal(); - virtual void EndModal(int retCode); + virtual void DoSetClientSize(int width, int height); + + virtual void GetPosition(int *x, int *y) const; + + bool Show(bool show); + bool IsShown() const; + void Iconize(bool iconize); - void SetClientSize(int width, int height); - void GetPosition(int *x, int *y) const; - bool Show(bool show); - void Iconize(bool iconize); +#if WXWIN_COMPATIBILITY + bool Iconized() const { return IsIconized(); }; +#endif - void Fit(); + virtual bool IsIconized() const; + void Fit(); void SetTitle(const wxString& title); wxString GetTitle() const ; - void OnCharHook(wxKeyEvent& event); - void OnCloseWindow(wxCloseEvent& event); + void OnSize(wxSizeEvent& event); + bool OnClose(); + void OnCharHook(wxKeyEvent& event); + void OnPaint(wxPaintEvent& event); + void OnCloseWindow(wxCloseEvent& event); - void SetModal(bool flag); + void SetModal(bool flag); + + virtual void Centre(int direction = wxBOTH); + virtual bool IsModal() const; + + // For now, same as Show(TRUE) but returns return code + virtual int ShowModal(); + virtual void EndModal(int retCode); // Standard buttons void OnOK(wxCommandEvent& event); @@ -104,6 +108,32 @@ public: // Responds to colour changes void OnSysColourChanged(wxSysColourChangedEvent& event); + // implementation + // -------------- + virtual MRESULT OS2WindowProc(HWND hwnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, + WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + + bool IsModalShowing() const { return m_modalShowing; } + + // tooltip management +#if wxUSE_TOOLTIPS + WXHWND GetToolTipCtrl() const { return m_hwndToolTip; } + void SetToolTipCtrl(WXHWND hwndTT) { m_hwndToolTip = hwndTT; } +#endif // tooltips + +protected: + bool m_modalShowing; + WXHWND m_hwndOldFocus; // the window which had focus before we were shown + +private: +#if wxUSE_TOOLTIPS + WXHWND m_hwndToolTip; +#endif // tooltips + +private: + DECLARE_EVENT_TABLE() };