]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/dialog.h
calling insert("") would provoke an assert - now it's just ignored
[wxWidgets.git] / include / wx / gtk1 / dialog.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: dialog.h
3// Purpose:
4// Author: Robert Roebling
5// Created: 01/02/97
6// Id:
7// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
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/object.h"
21#include "wx/string.h"
22#include "wx/event.h"
23#include "wx/window.h"
c33c4050 24#include "wx/icon.h"
c801d85f
KB
25
26//-----------------------------------------------------------------------------
27// forward decls
28//-----------------------------------------------------------------------------
29
30class wxRadioBox;
31
32//-----------------------------------------------------------------------------
33// classes
34//-----------------------------------------------------------------------------
35
36class wxDialog;
37
38//-----------------------------------------------------------------------------
39// global data
40//-----------------------------------------------------------------------------
41
42extern const char *wxDialogNameStr;
43
44//-----------------------------------------------------------------------------
45// wxDialog
46//-----------------------------------------------------------------------------
47
48class wxDialog: public wxWindow
49{
50 DECLARE_DYNAMIC_CLASS(wxDialog)
51
52 public:
53
54 wxDialog(void);
55 wxDialog( wxWindow *parent, wxWindowID id, const wxString &title,
56 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
debe6624 57 long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr );
c801d85f
KB
58 bool Create( wxWindow *parent, wxWindowID id, const wxString &title,
59 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
debe6624 60 long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr );
c801d85f
KB
61 ~wxDialog(void);
62 void SetTitle(const wxString& title);
63 wxString GetTitle(void) const;
64 bool OnClose(void);
65 void OnApply( wxCommandEvent &event );
66 void OnCancel( wxCommandEvent &event );
903f689b 67 void OnOK( wxCommandEvent &event );
c801d85f 68 void OnPaint(wxPaintEvent& event);
e2414cbe 69 bool Destroy(void);
c801d85f
KB
70 void OnCloseWindow(wxCloseEvent& event);
71/*
72 void OnCharHook(wxKeyEvent& event);
73*/
debe6624 74 virtual bool Show( bool show );
c801d85f
KB
75 virtual int ShowModal(void);
76 virtual void EndModal(int retCode);
77 virtual bool IsModal(void) const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
c33c4050 78 void SetModal( bool modal );
c801d85f 79 virtual void InitDialog(void);
903f689b 80 virtual void Centre( int direction = wxHORIZONTAL );
c801d85f 81
c33c4050
RR
82 virtual void SetSizeHints( int minW, int minH, int maxW, int maxH, int incW = -1 );
83
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) { }
90
c801d85f
KB
91 private:
92
93 friend wxWindow;
94 friend wxDC;
95 friend wxRadioBox;
903f689b 96
c801d85f
KB
97 bool m_modalShowing;
98 wxString m_title;
c33c4050 99 wxIcon m_icon;
c801d85f 100
903f689b
RR
101 virtual void ImplementSetPosition();
102
c801d85f
KB
103 DECLARE_EVENT_TABLE()
104
105};
106
107#endif // __GTKDIALOGH__