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