Still bit fiddling in wxImage.
[wxWidgets.git] / include / wx / gtk / dialog.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dialog.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Created: 01/02/97
6 // Id: $Id$
7 // Copyright: (c) 1998 Robert Roebling
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11
12 #ifndef __GTKDIALOGH__
13 #define __GTKDIALOGH__
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "wx/defs.h"
20 #include "wx/panel.h"
21 #include "wx/icon.h"
22
23 //-----------------------------------------------------------------------------
24 // forward decls
25 //-----------------------------------------------------------------------------
26
27 class wxRadioBox;
28
29 //-----------------------------------------------------------------------------
30 // classes
31 //-----------------------------------------------------------------------------
32
33 class wxDialog;
34
35 //-----------------------------------------------------------------------------
36 // global data
37 //-----------------------------------------------------------------------------
38
39 extern const char *wxDialogNameStr;
40
41 //-----------------------------------------------------------------------------
42 // wxDialog
43 //-----------------------------------------------------------------------------
44
45 class wxDialog: public wxPanel
46 {
47 DECLARE_DYNAMIC_CLASS(wxDialog)
48
49 public:
50
51 wxDialog(void);
52 wxDialog( wxWindow *parent, wxWindowID id, const wxString &title,
53 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
54 long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr );
55 bool Create( 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 ~wxDialog(void);
59 void SetTitle(const wxString& title);
60 wxString GetTitle(void) const;
61 bool OnClose(void);
62 void OnApply( wxCommandEvent &event );
63 void OnCancel( wxCommandEvent &event );
64 void OnOK( wxCommandEvent &event );
65 void OnPaint(wxPaintEvent& event);
66 bool Destroy(void);
67 void OnCloseWindow(wxCloseEvent& event);
68 /*
69 void OnCharHook(wxKeyEvent& event);
70 */
71 virtual void SetSize( int x, int y, int width, int height,
72 int sizeFlags = wxSIZE_AUTO );
73 virtual bool Show( bool show );
74 virtual int ShowModal(void);
75 virtual void EndModal(int retCode);
76 virtual bool IsModal(void) const;
77 void SetModal( bool modal );
78 virtual void InitDialog(void);
79 virtual void Centre( int direction = wxHORIZONTAL );
80
81 virtual void SetIcon( const wxIcon &icon );
82 virtual void Iconize( bool WXUNUSED(iconize)) { }
83 virtual bool IsIconized(void) const { return FALSE; }
84 bool Iconized(void) const { return IsIconized(); }
85 virtual void Maximize(void) { }
86 virtual void Restore(void) { }
87
88 // implementation
89
90 bool m_modalShowing;
91 wxString m_title;
92 wxIcon m_icon;
93
94 DECLARE_EVENT_TABLE()
95
96 };
97
98 #endif // __GTKDIALOGH__