]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/extdlgg.h
1. changed spelling error in wxTR_HAS_VARIABLE_HEIGHT (missing 'E')
[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 void SetClientWindowMargin( int margin )
66 { m_clientWindowMargin = margin; }
67 int GetClientWindowMargin()
68 { return m_clientWindowMargin; }
69 void SetSpacePerButton( wxSize space )
70 { m_spacePerButton = space; }
71 wxSize GetSpacePerButton()
72 { return m_spacePerButton; }
73
74 void AddButton( wxButton *button );
75
76 void SetDefaultButton( wxWindowID button );
77
78 void EnableButton( wxWindowID button, bool enable=TRUE );
79 bool ButtonIsEnabled( wxWindowID button );
80
81 wxSize GetButtonAreaSize();
82
83 void OnSize( wxSizeEvent &event );
84
85 void OnYes(wxCommandEvent& event);
86 void OnNo(wxCommandEvent& event);
87 void OnCancel(wxCommandEvent& event);
88
89 protected:
90 wxWindow *m_clientWindow;
91 long m_extraStyle;
92 wxList m_buttons;
93 #if wxUSE_STATLINE
94 wxStaticLine *m_statLine;
95 #endif
96 int m_clientWindowMargin;
97 wxSize m_spacePerButton;
98
99 wxSize LayoutButtons();
100
101 private:
102 DECLARE_EVENT_TABLE()
103 };
104
105
106 #endif