~wxDialog();
- virtual bool Destroy();
+// virtual bool Destroy();
+ bool Show(bool show);
- virtual void DoSetClientSize(int width, int height);
+ void SetModal(bool flag);
+ virtual bool IsModal() const;
- virtual void GetPosition(int *x, int *y) const;
+ // For now, same as Show(TRUE) but returns return code
+ virtual int ShowModal();
- bool Show(bool show);
- bool IsShown() const;
- void Iconize(bool iconize);
+ // may be called to terminate the dialog with the given return code
+ virtual void EndModal(int retCode);
+
+ // returns TRUE if we're in a modal loop
+ bool IsModalShowing() const;
#if WXWIN_COMPATIBILITY
bool Iconized() const { return IsIconized(); };
#endif
- virtual bool IsIconized() const;
- void Fit();
-
- void SetTitle(const wxString& title);
- wxString GetTitle() const ;
+ // implementation
+ // --------------
- void OnSize(wxSizeEvent& event);
- bool OnClose();
+ // event handlers
+// bool OnClose();
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()