/////////////////////////////////////////////////////////////////////////////
// Name: dialog.h
// Purpose: wxDialog class
-// Author: AUTHOR
+// Author: Stefan Csomor
// Modified by:
-// Created: ??/??/98
+// Created: 1998-01-01
// RCS-ID: $Id$
-// Copyright: (c) AUTHOR
-// Licence: wxWindows licence
+// Copyright: (c) Stefan Csomor
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DIALOG_H_
#define _WX_DIALOG_H_
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dialog.h"
#endif
#include "wx/panel.h"
-WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr;
+WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr;
WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr;
~wxDialog();
- virtual bool Destroy();
-
- virtual void DoSetClientSize(int width, int height);
+// virtual bool Destroy();
+ bool Show(bool show = true);
- virtual void GetPosition(int *x, int *y) const;
+ void SetModal(bool flag);
+ virtual bool IsModal() const;
- bool Show(bool show);
- bool IsShown() const;
- void Iconize(bool iconize);
+ // For now, same as Show(TRUE) but returns return code
+ virtual int ShowModal();
-#if WXWIN_COMPATIBILITY
- bool Iconized() const { return IsIconized(); };
-#endif
+ // may be called to terminate the dialog with the given return code
+ virtual void EndModal(int retCode);
- virtual bool IsIconized() const;
- void Fit();
+ // returns TRUE if we're in a modal loop
+ bool IsModalShowing() const;
- void SetTitle(const wxString& title);
- wxString GetTitle() const ;
+ // implementation
+ // --------------
- void OnSize(wxSizeEvent& event);
- bool OnClose();
+ // event handlers
void OnCharHook(wxKeyEvent& event);
- void OnPaint(wxPaintEvent& event);
void OnCloseWindow(wxCloseEvent& event);
- 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);
void OnApply(wxCommandEvent& event);
// Responds to colour changes
void OnSysColourChanged(wxSysColourChangedEvent& event);
- // implementation
- // --------------
-
- bool IsModalShowing() const { return m_modalShowing; }
- virtual bool IsTopLevel() const { return TRUE; }
-
- // tooltip management
-#if wxUSE_TOOLTIPS
- wxMacToolTip* GetToolTipCtrl() const { return m_hwndToolTip; }
- void SetToolTipCtrl(wxMacToolTip *tt) { m_hwndToolTip = tt; }
- wxMacToolTip* m_hwndToolTip ;
-#endif // tooltips
-
-protected:
- bool m_modalShowing;
- WXHWND m_hwndOldFocus; // the window which had focus before we were shown
+ // show modal dialog and enter modal loop
+ void DoShowModal();
private:
DECLARE_EVENT_TABLE()