]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/dialog.h
Clarify documentation for wxPropertyGridEvent::GetProperty()
[wxWidgets.git] / include / wx / osx / dialog.h
CommitLineData
6762286d
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: dialog.h
3// Purpose: wxDialog class
4// Author: Stefan Csomor
5// Modified by:
6// Created: 1998-01-01
7// RCS-ID: $Id$
8// Copyright: (c) Stefan Csomor
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_DIALOG_H_
13#define _WX_DIALOG_H_
14
15#include "wx/panel.h"
16
17WXDLLIMPEXP_DATA_CORE(extern const char) wxDialogNameStr[];
18
19class WXDLLIMPEXP_FWD_CORE wxMacToolTip ;
20
21// Dialog boxes
22class WXDLLIMPEXP_CORE wxDialog : public wxDialogBase
23{
24 DECLARE_DYNAMIC_CLASS(wxDialog)
25
26public:
27 wxDialog() { Init(); }
28
29 // Constructor with no modal flag - the new convention.
30 wxDialog(wxWindow *parent, wxWindowID id,
31 const wxString& title,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 long style = wxDEFAULT_DIALOG_STYLE,
35 const wxString& name = wxDialogNameStr)
36 {
37 Init();
38 Create(parent, id, title, pos, size, style, name);
39 }
40
41 bool Create(wxWindow *parent, wxWindowID id,
42 const wxString& title,
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize,
45 long style = wxDEFAULT_DIALOG_STYLE,
46 const wxString& name = wxDialogNameStr);
47
48 virtual ~wxDialog();
49
50// virtual bool Destroy();
51 virtual bool Show(bool show = true);
52
4d572a2c 53 // return true if we're showing the dialog modally
6762286d
SC
54 virtual bool IsModal() const;
55
4d572a2c 56 // show the dialog modally and return the value passed to EndModal()
6762286d 57 virtual int ShowModal();
9482c644
KO
58
59 virtual void ShowWindowModal();
6762286d
SC
60
61 // may be called to terminate the dialog with the given return code
62 virtual void EndModal(int retCode);
63
64 // implementation
65 // --------------
66
4d572a2c
SC
67 wxDialogModality GetModality() const;
68
bfa92264
KO
69#if wxOSX_USE_COCOA
70 virtual void ModalFinishedCallback(void* WXUNUSED(panel), int WXUNUSED(returnCode)) {}
71#endif
72
4d572a2c 73protected:
6762286d
SC
74 // show modal dialog and enter modal loop
75 void DoShowModal();
4d572a2c
SC
76
77 // show modal dialog and enter modal loop
78 void DoShowWindowModal();
6762286d 79
6762286d
SC
80 // mac also takes command-period as cancel
81 virtual bool IsEscapeKey(const wxKeyEvent& event);
82
9482c644
KO
83 // needed for cleanup on the Cocoa side.
84 void EndWindowModal();
85
bfa92264
KO
86 wxDialogModality m_modality;
87
6762286d
SC
88private:
89 void Init();
6762286d
SC
90};
91
5c6eb3a8 92#endif
6762286d 93 // _WX_DIALOG_H_