1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dialog.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-11-15 17:57:55 +00:00
|
|
|
// Created:
|
1998-10-29 18:03:18 +00:00
|
|
|
// Id: $Id$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
1999-02-05 14:26:48 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKDIALOGH__
|
|
|
|
#define __GTKDIALOGH__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
1998-09-07 17:23:29 +00:00
|
|
|
#include "wx/panel.h"
|
1998-08-15 10:52:09 +00:00
|
|
|
#include "wx/icon.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxDialog;
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// global data
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
1999-04-14 21:52:38 +00:00
|
|
|
extern const wxChar *wxDialogNameStr;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxDialog
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
1999-06-28 21:39:49 +00:00
|
|
|
class wxDialog: public wxDialogBase
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1998-11-15 17:57:55 +00:00
|
|
|
public:
|
1999-02-24 13:15:42 +00:00
|
|
|
wxDialog() { Init(); }
|
1999-02-22 11:01:13 +00:00
|
|
|
wxDialog( wxWindow *parent, wxWindowID id,
|
1998-11-15 17:57:55 +00:00
|
|
|
const wxString &title,
|
1999-02-05 14:26:48 +00:00
|
|
|
const wxPoint &pos = wxDefaultPosition,
|
|
|
|
const wxSize &size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_DIALOG_STYLE,
|
|
|
|
const wxString &name = wxDialogNameStr );
|
1999-02-22 11:01:13 +00:00
|
|
|
bool Create( wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString &title,
|
|
|
|
const wxPoint &pos = wxDefaultPosition,
|
|
|
|
const wxSize &size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_DIALOG_STYLE,
|
|
|
|
const wxString &name = wxDialogNameStr );
|
|
|
|
~wxDialog();
|
|
|
|
|
|
|
|
void SetTitle(const wxString& title);
|
|
|
|
wxString GetTitle() const;
|
|
|
|
|
|
|
|
void OnApply( wxCommandEvent &event );
|
|
|
|
void OnCancel( wxCommandEvent &event );
|
|
|
|
void OnOK( wxCommandEvent &event );
|
|
|
|
void OnPaint( wxPaintEvent& event );
|
|
|
|
void OnSize( wxSizeEvent &event );
|
|
|
|
void OnCloseWindow( wxCloseEvent& event );
|
|
|
|
/*
|
|
|
|
void OnCharHook( wxKeyEvent& event );
|
|
|
|
*/
|
|
|
|
|
|
|
|
bool Destroy();
|
|
|
|
|
|
|
|
virtual bool Show( bool show );
|
|
|
|
virtual int ShowModal();
|
|
|
|
virtual void EndModal( int retCode );
|
|
|
|
virtual bool IsModal() const;
|
|
|
|
void SetModal( bool modal );
|
|
|
|
|
|
|
|
virtual void InitDialog(void);
|
|
|
|
|
|
|
|
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-11-05 15:54:10 +00:00
|
|
|
virtual bool IsTopLevel() const { return TRUE; }
|
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
// implementation
|
1999-12-29 11:52:51 +00:00
|
|
|
// --------------
|
1999-02-22 11:01:13 +00:00
|
|
|
|
1999-12-29 11:52:51 +00:00
|
|
|
// move the window to the specified location and resize it: this is called
|
|
|
|
// from both DoSetSize() and DoSetClientSize()
|
|
|
|
virtual void DoMoveWindow(int x, int y, int width, int height);
|
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void GtkOnSize( int x, int y, int width, int height );
|
|
|
|
virtual void OnInternalIdle();
|
|
|
|
|
|
|
|
bool m_modalShowing;
|
|
|
|
wxString m_title;
|
|
|
|
wxIcon m_icon;
|
|
|
|
|
|
|
|
protected:
|
1999-02-24 13:15:42 +00:00
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
// common part of Destroy() and ~wxDialog
|
|
|
|
void CleanUp();
|
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void DoSetSize(int x, int y,
|
|
|
|
int width, int height,
|
|
|
|
int sizeFlags = wxSIZE_AUTO);
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
1999-11-22 19:44:25 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxDialog)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKDIALOGH__
|