/////////////////////////////////////////////////////////////////////////////
// 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;
~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);
// 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()
};