]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/extdlgg.h
Added wxExtDialog and sample.
[wxWidgets.git] / include / wx / generic / extdlgg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: extdlgg.h
3 // Purpose: Extended Generic dialogs
4 // Author: Robert Roebling
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Robert Roebling
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __EXTDLGH_G__
13 #define __EXTDLGH_G__
14
15 #ifdef __GNUG__
16 #pragma interface "extdlgg.h"
17 #endif
18
19 #include "wx/setup.h"
20 #include "wx/dialog.h"
21 #include "wx/button.h"
22
23 //-----------------------------------------------------------------------------
24 // classes
25 //-----------------------------------------------------------------------------
26
27 class WXDLLEXPORT wxExtDialog;
28 class WXDLLEXPORT wxStaticLine;
29
30 //-----------------------------------------------------------------------------
31 // global data
32 //-----------------------------------------------------------------------------
33
34 extern const wxChar *wxDialogNameStr;
35
36 //-----------------------------------------------------------------------------
37 // wxExtDialog
38 //-----------------------------------------------------------------------------
39
40 class WXDLLEXPORT wxExtDialog: public wxDialog
41 {
42 DECLARE_DYNAMIC_CLASS(wxExtDialog)
43
44 public:
45 wxExtDialog() {}
46 wxExtDialog( wxWindow *parent, wxWindowID id,
47 const wxString& title,
48 long extraStyle = (wxOK|wxCANCEL|wxCENTRE),
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
51 long style = wxEXT_DIALOG_STYLE,
52 const wxString &name = wxDialogNameStr );
53 bool Create( wxWindow *parent, wxWindowID id,
54 const wxString& title,
55 long extraStyle = (wxOK|wxCANCEL|wxCENTRE),
56 const wxPoint& pos = wxDefaultPosition,
57 const wxSize& size = wxDefaultSize,
58 long style = wxEXT_DIALOG_STYLE,
59 const wxString &name = wxDialogNameStr );
60
61 void SetClientWindow( wxWindow *clientWindow )
62 { m_clientWindow = clientWindow; }
63 wxWindow *GetClientWindow()
64 { return m_clientWindow; }
65
66 void AddButton( wxButton *button );
67
68 void SetDefaultButton( wxWindowID button );
69
70 void EnableButton( wxWindowID button, bool enable=TRUE );
71 bool ButtonIsEnabled( wxWindowID button );
72
73 wxSize GetButtonAreaSize();
74
75 void OnSize( wxSizeEvent &event );
76
77 void OnYes(wxCommandEvent& event);
78 void OnNo(wxCommandEvent& event);
79 void OnCancel(wxCommandEvent& event);
80
81 protected:
82 wxWindow *m_clientWindow;
83 long m_extraStyle;
84 wxList m_buttons;
85 #if wxUSE_STATLINE
86 wxStaticLine *m_statLine;
87 #endif
88
89 wxSize LayoutButtons();
90
91 private:
92 DECLARE_EVENT_TABLE()
93 };
94
95
96 #endif