]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/dialog.h
Small optical changes for MSW
[wxWidgets.git] / include / wx / gtk / 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{
bfc6fde4 40 DECLARE_DYNAMIC_CLASS(wxDialog)
c801d85f 41
43a18898 42public:
68995f26 43 wxDialog() { Init(); }
bfc6fde4 44 wxDialog( wxWindow *parent, wxWindowID id,
43a18898 45 const wxString &title,
2b854a32
VZ
46 const wxPoint &pos = wxDefaultPosition,
47 const wxSize &size = wxDefaultSize,
48 long style = wxDEFAULT_DIALOG_STYLE,
49 const wxString &name = wxDialogNameStr );
bfc6fde4
VZ
50 bool Create( wxWindow *parent, wxWindowID id,
51 const wxString &title,
52 const wxPoint &pos = wxDefaultPosition,
53 const wxSize &size = wxDefaultSize,
54 long style = wxDEFAULT_DIALOG_STYLE,
55 const wxString &name = wxDialogNameStr );
56 ~wxDialog();
57
58 void SetTitle(const wxString& title);
59 wxString GetTitle() const;
60
61 void OnApply( wxCommandEvent &event );
62 void OnCancel( wxCommandEvent &event );
63 void OnOK( wxCommandEvent &event );
64 void OnPaint( wxPaintEvent& event );
65 void OnSize( wxSizeEvent &event );
66 void OnCloseWindow( wxCloseEvent& event );
67 /*
68 void OnCharHook( wxKeyEvent& event );
69 */
70
71 bool Destroy();
72
73 virtual bool Show( bool show );
74 virtual int ShowModal();
75 virtual void EndModal( int retCode );
76 virtual bool IsModal() const;
77 void SetModal( bool modal );
78
79 virtual void InitDialog(void);
80
81 virtual void Centre( int direction = wxHORIZONTAL );
82
83 virtual void SetIcon( const wxIcon &icon );
84 virtual void Iconize( bool WXUNUSED(iconize)) { }
85 virtual bool IsIconized() const { return FALSE; }
86 bool Iconized() const { return IsIconized(); }
87 virtual void Maximize() { }
88 virtual void Restore() { }
89
90 // implementation
91
92 virtual void GtkOnSize( int x, int y, int width, int height );
93 virtual void OnInternalIdle();
94
95 bool m_modalShowing;
96 wxString m_title;
97 wxIcon m_icon;
98
99protected:
68995f26
VZ
100 // common part of all ctors
101 void Init();
102
bfc6fde4
VZ
103 virtual void DoSetSize(int x, int y,
104 int width, int height,
105 int sizeFlags = wxSIZE_AUTO);
106
107private:
108 DECLARE_EVENT_TABLE()
c801d85f
KB
109};
110
111#endif // __GTKDIALOGH__