1999-06-29 12:34:18 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/dialog.h
|
|
|
|
// Purpose: wxDialogBase class
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 29.06.99
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Vadim Zeitlin
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-15 00:23:28 +00:00
|
|
|
#ifndef _WX_DIALOG_H_BASE_
|
|
|
|
#define _WX_DIALOG_H_BASE_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
1999-10-12 21:52:17 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "dialogbase.h"
|
|
|
|
#endif
|
|
|
|
|
1999-06-28 22:04:40 +00:00
|
|
|
#include "wx/defs.h"
|
2001-09-15 22:13:08 +00:00
|
|
|
#include "wx/containr.h"
|
|
|
|
#include "wx/toplevel.h"
|
1999-06-28 22:04:40 +00:00
|
|
|
|
2001-09-15 22:13:08 +00:00
|
|
|
// FIXME - temporary hack in absence of wxTLW !!
|
|
|
|
#ifndef wxTopLevelWindowNative
|
|
|
|
#include "wx/panel.h"
|
1999-06-28 21:39:49 +00:00
|
|
|
class WXDLLEXPORT wxDialogBase : public wxPanel
|
2001-09-15 22:13:08 +00:00
|
|
|
#else
|
|
|
|
class WXDLLEXPORT wxDialogBase : public wxTopLevelWindow
|
|
|
|
#endif
|
1999-06-28 21:39:49 +00:00
|
|
|
{
|
1999-06-29 12:34:18 +00:00
|
|
|
public:
|
2001-09-15 22:13:08 +00:00
|
|
|
wxDialogBase() { Init(); }
|
2001-09-24 00:34:14 +00:00
|
|
|
virtual ~wxDialogBase() { }
|
|
|
|
|
2001-09-15 22:13:08 +00:00
|
|
|
void Init();
|
2001-09-24 00:34:14 +00:00
|
|
|
|
1999-06-29 12:34:18 +00:00
|
|
|
// the modal dialogs have a return code - usually the id of the last
|
|
|
|
// pressed button
|
|
|
|
void SetReturnCode(int returnCode) { m_returnCode = returnCode; }
|
|
|
|
int GetReturnCode() const { return m_returnCode; }
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#if wxUSE_STATTEXT && wxUSE_TEXTCTRL
|
1999-08-11 11:53:40 +00:00
|
|
|
// splits text up at newlines and places the
|
|
|
|
// lines into a vertical wxBoxSizer
|
|
|
|
wxSizer *CreateTextSizer( const wxString &message );
|
2001-06-26 20:59:19 +00:00
|
|
|
#endif // wxUSE_STATTEXT && wxUSE_TEXTCTRL
|
2001-09-24 00:34:14 +00:00
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#if wxUSE_BUTTON
|
1999-08-11 11:53:40 +00:00
|
|
|
// places buttons into a horizontal wxBoxSizer
|
|
|
|
wxSizer *CreateButtonSizer( long flags );
|
2001-06-26 20:59:19 +00:00
|
|
|
#endif // wxUSE_BUTTON
|
1999-06-29 12:34:18 +00:00
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
protected:
|
1999-06-29 12:34:18 +00:00
|
|
|
// the return code from modal dialog
|
|
|
|
int m_returnCode;
|
2001-09-15 22:13:08 +00:00
|
|
|
|
|
|
|
// FIXME - temporary hack in absence of wxTLW !!
|
2001-09-24 00:34:14 +00:00
|
|
|
#ifdef wxTopLevelWindowNative
|
2001-09-15 22:13:08 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
WX_DECLARE_CONTROL_CONTAINER();
|
2001-09-24 00:34:14 +00:00
|
|
|
#endif
|
1999-06-28 21:39:49 +00:00
|
|
|
};
|
|
|
|
|
2001-09-15 22:13:08 +00:00
|
|
|
|
2001-11-28 18:22:16 +00:00
|
|
|
#if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
|
2001-09-18 22:33:38 +00:00
|
|
|
#include "wx/univ/dialog.h"
|
|
|
|
#else
|
|
|
|
#if defined(__WXMSW__)
|
|
|
|
#include "wx/msw/dialog.h"
|
|
|
|
#elif defined(__WXMOTIF__)
|
|
|
|
#include "wx/motif/dialog.h"
|
|
|
|
#elif defined(__WXGTK__)
|
|
|
|
#include "wx/gtk/dialog.h"
|
|
|
|
#elif defined(__WXMAC__)
|
|
|
|
#include "wx/mac/dialog.h"
|
|
|
|
#elif defined(__WXPM__)
|
|
|
|
#include "wx/os2/dialog.h"
|
|
|
|
#elif defined(__WXSTUBS__)
|
|
|
|
#include "wx/stubs/dialog.h"
|
|
|
|
#endif
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
1998-08-15 00:23:28 +00:00
|
|
|
// _WX_DIALOG_H_BASE_
|