]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/dialog.h
made some wxHtmlEntitiesParser's methods public -- turned out they are useful
[wxWidgets.git] / include / wx / gtk1 / dialog.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: dialog.h
3// Purpose:
4// Author: Robert Roebling
43a18898 5// Created:
58614078
RR
6// Id: $Id$
7// Copyright: (c) 1998 Robert Roebling
2b854a32 8// Licence: wxWindows licence
c801d85f
KB
9/////////////////////////////////////////////////////////////////////////////
10
c801d85f
KB
11#ifndef __GTKDIALOGH__
12#define __GTKDIALOGH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/defs.h"
a60c99e6 19#include "wx/panel.h"
c33c4050 20#include "wx/icon.h"
c801d85f 21
c801d85f
KB
22//-----------------------------------------------------------------------------
23// classes
24//-----------------------------------------------------------------------------
25
26class wxDialog;
27
28//-----------------------------------------------------------------------------
29// global data
30//-----------------------------------------------------------------------------
31
578c2081 32extern const wxChar *wxDialogNameStr;
c801d85f
KB
33
34//-----------------------------------------------------------------------------
35// wxDialog
36//-----------------------------------------------------------------------------
37
c50f1fb9 38class wxDialog: public wxDialogBase
c801d85f 39{
43a18898 40public:
68995f26 41 wxDialog() { Init(); }
bfc6fde4 42 wxDialog( wxWindow *parent, wxWindowID id,
43a18898 43 const wxString &title,
2b854a32
VZ
44 const wxPoint &pos = wxDefaultPosition,
45 const wxSize &size = wxDefaultSize,
46 long style = wxDEFAULT_DIALOG_STYLE,
47 const wxString &name = wxDialogNameStr );
bfc6fde4
VZ
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 );
54 ~wxDialog();
55
56 void SetTitle(const wxString& title);
57 wxString GetTitle() const;
58
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 );
65 /*
66 void OnCharHook( wxKeyEvent& event );
67 */
68
69 bool Destroy();
70
8db37e06 71 virtual bool Show( bool show = TRUE );
bfc6fde4
VZ
72 virtual int ShowModal();
73 virtual void EndModal( int retCode );
74 virtual bool IsModal() const;
75 void SetModal( bool modal );
76
77 virtual void InitDialog(void);
78
bfc6fde4
VZ
79 virtual void SetIcon( const wxIcon &icon );
80 virtual void Iconize( bool WXUNUSED(iconize)) { }
81 virtual bool IsIconized() const { return FALSE; }
82 bool Iconized() const { return IsIconized(); }
83 virtual void Maximize() { }
84 virtual void Restore() { }
85
8487f887
RR
86 virtual bool IsTopLevel() const { return TRUE; }
87
bfc6fde4 88 // implementation
23efdd02 89 // --------------
bfc6fde4 90
23efdd02
RR
91 // move the window to the specified location and resize it: this is called
92 // from both DoSetSize() and DoSetClientSize()
93 virtual void DoMoveWindow(int x, int y, int width, int height);
94
bfc6fde4
VZ
95 virtual void GtkOnSize( int x, int y, int width, int height );
96 virtual void OnInternalIdle();
97
98 bool m_modalShowing;
99 wxString m_title;
100 wxIcon m_icon;
101
102protected:
68995f26
VZ
103 // common part of all ctors
104 void Init();
105
f6bcfd97
BP
106 // common part of Destroy() and ~wxDialog
107 void CleanUp();
108
bfc6fde4
VZ
109 virtual void DoSetSize(int x, int y,
110 int width, int height,
111 int sizeFlags = wxSIZE_AUTO);
112
113private:
114 DECLARE_EVENT_TABLE()
20e05ffb 115 DECLARE_DYNAMIC_CLASS(wxDialog)
c801d85f
KB
116};
117
118#endif // __GTKDIALOGH__