X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1408104d04fdea106c8ec288866c4143078ae71b..f0b6a33f4c6242c70cd92238ffb94ddd39eef49b:/include/wx/os2/dialog.h diff --git a/include/wx/os2/dialog.h b/include/wx/os2/dialog.h index 0571fb5c53..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,35 +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); - void SetClientSize(int width, int height) { wxWindow::DoSetClientSize(width, height); }; - void SetClientSize( const wxSize& size ) { wxWindow::DoSetClientSize(size.x, size.y); }; - void SetClientSize(const wxRect& rect) { SetClientSize( rect.width, rect.height ); }; + virtual void GetPosition(int *x, int *y) const; - void GetPosition(int *x, int *y) const; - bool Show(bool show); - void Iconize(bool iconize); + bool Show(bool show); + bool IsShown() const; + void Iconize(bool iconize); - void Fit(); +#if WXWIN_COMPATIBILITY + bool Iconized() const { return IsIconized(); }; +#endif + + 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); @@ -107,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() };