]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/dialog.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKDIALOGH__
12 #define __GTKDIALOGH__
22 //-----------------------------------------------------------------------------
24 //-----------------------------------------------------------------------------
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 extern const wxChar
*wxDialogNameStr
;
34 //-----------------------------------------------------------------------------
36 //-----------------------------------------------------------------------------
38 class wxDialog
: public wxDialogBase
41 wxDialog() { Init(); }
42 wxDialog( wxWindow
*parent
, wxWindowID id
,
43 const wxString
&title
,
44 const wxPoint
&pos
= wxDefaultPosition
,
45 const wxSize
&size
= wxDefaultSize
,
46 long style
= wxDEFAULT_DIALOG_STYLE
,
47 const wxString
&name
= wxDialogNameStr
);
48 bool Create( wxWindow
*parent
, wxWindowID id
,
49 const wxString
&title
,
50 const wxPoint
&pos
= wxDefaultPosition
,
51 const wxSize
&size
= wxDefaultSize
,
52 long style
= wxDEFAULT_DIALOG_STYLE
,
53 const wxString
&name
= wxDialogNameStr
);
56 void SetTitle(const wxString
& title
);
57 wxString
GetTitle() const;
59 void OnApply( wxCommandEvent
&event
);
60 void OnCancel( wxCommandEvent
&event
);
61 void OnOK( wxCommandEvent
&event
);
62 void OnPaint( wxPaintEvent
& event
);
63 void OnSize( wxSizeEvent
&event
);
64 void OnCloseWindow( wxCloseEvent
& event
);
66 void OnCharHook( wxKeyEvent& event );
71 virtual bool Show( bool show
= TRUE
);
72 virtual int ShowModal();
73 virtual void EndModal( int retCode
);
74 virtual bool IsModal() const;
75 void SetModal( bool modal
);
77 virtual void SetIcon( const wxIcon
&icon
);
78 virtual void Iconize( bool WXUNUSED(iconize
)) { }
79 virtual bool IsIconized() const { return FALSE
; }
80 bool Iconized() const { return IsIconized(); }
81 virtual void Maximize() { }
82 virtual void Restore() { }
84 virtual bool IsTopLevel() const { return TRUE
; }
89 // move the window to the specified location and resize it: this is called
90 // from both DoSetSize() and DoSetClientSize()
91 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
93 virtual void GtkOnSize( int x
, int y
, int width
, int height
);
94 virtual void OnInternalIdle();
101 // common part of all ctors
104 // common part of Destroy() and ~wxDialog
107 virtual void DoSetSize(int x
, int y
,
108 int width
, int height
,
109 int sizeFlags
= wxSIZE_AUTO
);
112 DECLARE_EVENT_TABLE()
113 DECLARE_DYNAMIC_CLASS(wxDialog
)
116 #endif // __GTKDIALOGH__