]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: dialog.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Created: 01/02/97 | |
58614078 RR |
6 | // Id: $Id$ |
7 | // Copyright: (c) 1998 Robert Roebling | |
c801d85f KB |
8 | // Licence: wxWindows licence |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | ||
12 | #ifndef __GTKDIALOGH__ | |
13 | #define __GTKDIALOGH__ | |
14 | ||
15 | #ifdef __GNUG__ | |
16 | #pragma interface | |
17 | #endif | |
18 | ||
19 | #include "wx/defs.h" | |
a60c99e6 | 20 | #include "wx/panel.h" |
c33c4050 | 21 | #include "wx/icon.h" |
c801d85f KB |
22 | |
23 | //----------------------------------------------------------------------------- | |
24 | // forward decls | |
25 | //----------------------------------------------------------------------------- | |
26 | ||
27 | class wxRadioBox; | |
28 | ||
29 | //----------------------------------------------------------------------------- | |
30 | // classes | |
31 | //----------------------------------------------------------------------------- | |
32 | ||
33 | class wxDialog; | |
34 | ||
35 | //----------------------------------------------------------------------------- | |
36 | // global data | |
37 | //----------------------------------------------------------------------------- | |
38 | ||
39 | extern const char *wxDialogNameStr; | |
40 | ||
41 | //----------------------------------------------------------------------------- | |
42 | // wxDialog | |
43 | //----------------------------------------------------------------------------- | |
44 | ||
a60c99e6 | 45 | class wxDialog: public wxPanel |
c801d85f KB |
46 | { |
47 | DECLARE_DYNAMIC_CLASS(wxDialog) | |
48 | ||
49 | public: | |
50 | ||
51 | wxDialog(void); | |
52 | wxDialog( wxWindow *parent, wxWindowID id, const wxString &title, | |
53 | const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, | |
debe6624 | 54 | long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); |
c801d85f KB |
55 | bool Create( wxWindow *parent, wxWindowID id, const wxString &title, |
56 | const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, | |
debe6624 | 57 | long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr ); |
c801d85f KB |
58 | ~wxDialog(void); |
59 | void SetTitle(const wxString& title); | |
60 | wxString GetTitle(void) const; | |
61 | bool OnClose(void); | |
62 | void OnApply( wxCommandEvent &event ); | |
63 | void OnCancel( wxCommandEvent &event ); | |
903f689b | 64 | void OnOK( wxCommandEvent &event ); |
c801d85f | 65 | void OnPaint(wxPaintEvent& event); |
e2414cbe | 66 | bool Destroy(void); |
c801d85f KB |
67 | void OnCloseWindow(wxCloseEvent& event); |
68 | /* | |
69 | void OnCharHook(wxKeyEvent& event); | |
70 | */ | |
debe6624 | 71 | virtual bool Show( bool show ); |
c801d85f KB |
72 | virtual int ShowModal(void); |
73 | virtual void EndModal(int retCode); | |
e1e955e1 | 74 | virtual bool IsModal(void) const; |
c33c4050 | 75 | void SetModal( bool modal ); |
c801d85f | 76 | virtual void InitDialog(void); |
903f689b | 77 | virtual void Centre( int direction = wxHORIZONTAL ); |
c801d85f | 78 | |
c33c4050 RR |
79 | virtual void SetIcon( const wxIcon &icon ); |
80 | virtual void Iconize( bool WXUNUSED(iconize)) { } | |
81 | virtual bool IsIconized(void) const { return FALSE; } | |
82 | bool Iconized(void) const { return IsIconized(); } | |
83 | virtual void Maximize(void) { } | |
84 | virtual void Restore(void) { } | |
85 | ||
c801d85f KB |
86 | private: |
87 | ||
88 | friend wxWindow; | |
89 | friend wxDC; | |
90 | friend wxRadioBox; | |
903f689b | 91 | |
c801d85f KB |
92 | bool m_modalShowing; |
93 | wxString m_title; | |
c33c4050 | 94 | wxIcon m_icon; |
c801d85f | 95 | |
903f689b RR |
96 | virtual void ImplementSetPosition(); |
97 | ||
c801d85f KB |
98 | DECLARE_EVENT_TABLE() |
99 | ||
100 | }; | |
101 | ||
102 | #endif // __GTKDIALOGH__ |