]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/extdlgg.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Extended Generic dialogs
4 // Author: Robert Roebling
8 // Copyright: (c) Robert Roebling
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "extdlgg.h"
20 #include "wx/dialog.h"
21 #include "wx/button.h"
23 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
27 class WXDLLEXPORT wxExtDialog
;
28 class WXDLLEXPORT wxStaticLine
;
30 //-----------------------------------------------------------------------------
32 //-----------------------------------------------------------------------------
34 extern const wxChar
*wxDialogNameStr
;
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 class WXDLLEXPORT wxExtDialog
: public wxDialog
42 DECLARE_DYNAMIC_CLASS(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
);
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
; }
74 void AddButton( wxButton
*button
);
76 void SetDefaultButton( wxWindowID button
);
78 void EnableButton( wxWindowID button
, bool enable
=TRUE
);
79 bool ButtonIsEnabled( wxWindowID button
);
81 wxSize
GetButtonAreaSize();
83 void OnSize( wxSizeEvent
&event
);
85 void OnYes(wxCommandEvent
& event
);
86 void OnNo(wxCommandEvent
& event
);
87 void OnCancel(wxCommandEvent
& event
);
90 wxWindow
*m_clientWindow
;
94 wxStaticLine
*m_statLine
;
96 int m_clientWindowMargin
;
97 wxSize m_spacePerButton
;
99 wxSize
LayoutButtons();
102 DECLARE_EVENT_TABLE()