1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dialog.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-11-15 12:57:55 -05:00
|
|
|
// Created:
|
1998-10-29 13:03:18 -05:00
|
|
|
// Id: $Id$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
1999-02-05 09:26:48 -05:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKDIALOGH__
|
|
|
|
#define __GTKDIALOGH__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
1998-09-07 13:23:29 -04:00
|
|
|
#include "wx/panel.h"
|
1998-08-15 06:52:09 -04:00
|
|
|
#include "wx/icon.h"
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxDialog;
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// global data
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
extern const char *wxDialogNameStr;
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxDialog
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
1998-09-07 13:23:29 -04:00
|
|
|
class wxDialog: public wxPanel
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxDialog)
|
|
|
|
|
1998-11-15 12:57:55 -05:00
|
|
|
public:
|
|
|
|
wxDialog();
|
1999-02-05 09:26:48 -05:00
|
|
|
wxDialog( wxWindow *parent, wxWindowID id,
|
1998-11-15 12:57:55 -05:00
|
|
|
const wxString &title,
|
1999-02-05 09:26:48 -05:00
|
|
|
const wxPoint &pos = wxDefaultPosition,
|
|
|
|
const wxSize &size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_DIALOG_STYLE,
|
|
|
|
const wxString &name = wxDialogNameStr );
|
|
|
|
bool Create( wxWindow *parent, wxWindowID id,
|
1998-11-15 12:57:55 -05:00
|
|
|
const wxString &title,
|
1999-02-05 09:26:48 -05:00
|
|
|
const wxPoint &pos = wxDefaultPosition,
|
|
|
|
const wxSize &size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_DIALOG_STYLE,
|
|
|
|
const wxString &name = wxDialogNameStr );
|
1998-11-15 12:57:55 -05:00
|
|
|
~wxDialog();
|
1999-02-05 09:26:48 -05:00
|
|
|
|
1998-11-15 12:57:55 -05:00
|
|
|
void SetTitle(const wxString& title);
|
|
|
|
wxString GetTitle() const;
|
1999-02-05 09:26:48 -05:00
|
|
|
|
1998-11-15 12:57:55 -05:00
|
|
|
void OnApply( wxCommandEvent &event );
|
|
|
|
void OnCancel( wxCommandEvent &event );
|
|
|
|
void OnOK( wxCommandEvent &event );
|
1998-11-23 07:43:57 -05:00
|
|
|
void OnPaint( wxPaintEvent& event );
|
|
|
|
void OnSize( wxSizeEvent &event );
|
1999-02-05 11:12:43 -05:00
|
|
|
void OnCloseWindow( wxCloseEvent& event );
|
1998-05-20 10:01:55 -04:00
|
|
|
/*
|
1998-11-15 12:57:55 -05:00
|
|
|
void OnCharHook( wxKeyEvent& event );
|
1998-05-20 10:01:55 -04:00
|
|
|
*/
|
1999-02-05 09:26:48 -05:00
|
|
|
|
1998-11-15 12:57:55 -05:00
|
|
|
bool Destroy();
|
1999-02-05 09:26:48 -05:00
|
|
|
|
1998-11-15 12:57:55 -05:00
|
|
|
virtual void SetSize( int x, int y, int width, int height,
|
1998-11-11 09:19:46 -05:00
|
|
|
int sizeFlags = wxSIZE_AUTO );
|
1998-11-15 12:57:55 -05:00
|
|
|
virtual void SetSize( int width, int height );
|
1999-02-05 09:26:48 -05:00
|
|
|
|
1998-11-15 12:57:55 -05:00
|
|
|
virtual bool Show( bool show );
|
|
|
|
virtual int ShowModal();
|
|
|
|
virtual void EndModal( int retCode );
|
|
|
|
virtual bool IsModal() const;
|
|
|
|
void SetModal( bool modal );
|
1999-02-05 09:26:48 -05:00
|
|
|
|
1998-11-15 12:57:55 -05:00
|
|
|
virtual void InitDialog(void);
|
1999-02-05 09:26:48 -05:00
|
|
|
|
1998-11-15 12:57:55 -05:00
|
|
|
virtual void Centre( int direction = wxHORIZONTAL );
|
1999-02-05 09:26:48 -05:00
|
|
|
|
1998-11-15 12:57:55 -05:00
|
|
|
virtual void SetIcon( const wxIcon &icon );
|
|
|
|
virtual void Iconize( bool WXUNUSED(iconize)) { }
|
|
|
|
virtual bool IsIconized() const { return FALSE; }
|
|
|
|
bool Iconized() const { return IsIconized(); }
|
|
|
|
virtual void Maximize() { }
|
|
|
|
virtual void Restore() { }
|
1999-02-05 09:26:48 -05:00
|
|
|
|
1998-11-15 12:57:55 -05:00
|
|
|
// implementation
|
1999-02-05 09:26:48 -05:00
|
|
|
|
1998-11-23 07:43:57 -05:00
|
|
|
virtual void GtkOnSize( int x, int y, int width, int height );
|
1999-02-17 11:42:36 -05:00
|
|
|
virtual void OnInternalIdle();
|
1999-02-05 09:26:48 -05:00
|
|
|
|
1998-11-15 12:57:55 -05:00
|
|
|
bool m_modalShowing;
|
|
|
|
wxString m_title;
|
|
|
|
wxIcon m_icon;
|
1999-02-05 09:26:48 -05:00
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKDIALOGH__
|