]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/dialog.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __GTKDIALOGH__
13 #define __GTKDIALOGH__
20 #include "wx/object.h"
21 #include "wx/string.h"
23 #include "wx/window.h"
26 //-----------------------------------------------------------------------------
28 //-----------------------------------------------------------------------------
32 //-----------------------------------------------------------------------------
34 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 //-----------------------------------------------------------------------------
42 extern const char *wxDialogNameStr
;
44 //-----------------------------------------------------------------------------
46 //-----------------------------------------------------------------------------
48 class wxDialog
: public wxWindow
50 DECLARE_DYNAMIC_CLASS(wxDialog
)
55 wxDialog( wxWindow
*parent
, wxWindowID id
, const wxString
&title
,
56 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
57 long style
= wxDEFAULT_DIALOG_STYLE
, const wxString
&name
= wxDialogNameStr
);
58 bool Create( wxWindow
*parent
, wxWindowID id
, const wxString
&title
,
59 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
60 long style
= wxDEFAULT_DIALOG_STYLE
, const wxString
&name
= wxDialogNameStr
);
62 void SetTitle(const wxString
& title
);
63 wxString
GetTitle(void) const;
65 void OnApply( wxCommandEvent
&event
);
66 void OnCancel( wxCommandEvent
&event
);
67 void OnOK( wxCommandEvent
&event
);
68 void OnPaint(wxPaintEvent
& event
);
70 void OnCloseWindow(wxCloseEvent
& event
);
72 void OnCharHook(wxKeyEvent& event);
74 virtual bool Show( bool show
);
75 virtual int ShowModal(void);
76 virtual void EndModal(int retCode
);
77 virtual bool IsModal(void) const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL
) == wxDIALOG_MODAL
); }
78 void SetModal( bool modal
);
79 virtual void InitDialog(void);
80 virtual void Centre( int direction
= wxHORIZONTAL
);
82 virtual void SetSizeHints( int minW
, int minH
, int maxW
, int maxH
, int incW
= -1 );
84 virtual void SetIcon( const wxIcon
&icon
);
85 virtual void Iconize( bool WXUNUSED(iconize
)) { }
86 virtual bool IsIconized(void) const { return FALSE
; }
87 bool Iconized(void) const { return IsIconized(); }
88 virtual void Maximize(void) { }
89 virtual void Restore(void) { }
101 virtual void ImplementSetPosition();
103 DECLARE_EVENT_TABLE()
107 #endif // __GTKDIALOGH__