2007-11-23 20:56:13 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/generic/notifmsg.h
|
2007-12-02 12:02:30 -05:00
|
|
|
// Purpose: generic implementation of wxGenericNotificationMessage
|
2007-11-23 20:56:13 -05:00
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Created: 2007-11-24
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_GENERIC_NOTIFMSG_H_
|
|
|
|
#define _WX_GENERIC_NOTIFMSG_H_
|
|
|
|
|
|
|
|
class wxNotificationMessageDialog;
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2007-12-02 12:02:30 -05:00
|
|
|
// wxGenericNotificationMessage
|
2007-11-23 20:56:13 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2007-12-02 12:02:30 -05:00
|
|
|
class WXDLLIMPEXP_ADV wxGenericNotificationMessage : public wxNotificationMessageBase
|
2007-11-23 20:56:13 -05:00
|
|
|
{
|
|
|
|
public:
|
2007-12-02 12:02:30 -05:00
|
|
|
wxGenericNotificationMessage() { Init(); }
|
|
|
|
wxGenericNotificationMessage(const wxString& title,
|
|
|
|
const wxString& message = wxString(),
|
2007-12-02 14:43:04 -05:00
|
|
|
wxWindow *parent = NULL,
|
|
|
|
int flags = wxICON_INFORMATION)
|
|
|
|
: wxNotificationMessageBase(title, message, parent, flags)
|
2007-11-23 20:56:13 -05:00
|
|
|
{
|
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
2007-12-02 12:02:30 -05:00
|
|
|
virtual ~wxGenericNotificationMessage();
|
2007-11-23 20:56:13 -05:00
|
|
|
|
|
|
|
|
|
|
|
virtual bool Show(int timeout = Timeout_Auto);
|
|
|
|
virtual bool Close();
|
|
|
|
|
|
|
|
// generic implementation-specific methods
|
|
|
|
|
|
|
|
// get/set the default timeout (used if Timeout_Auto is specified)
|
|
|
|
static int GetDefaultTimeout() { return ms_timeout; }
|
|
|
|
static void SetDefaultTimeout(int timeout);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void Init();
|
|
|
|
|
|
|
|
|
|
|
|
// default timeout
|
|
|
|
static int ms_timeout;
|
|
|
|
|
|
|
|
// notification message is represented by a modeless dialog in this
|
|
|
|
// implementation
|
|
|
|
wxNotificationMessageDialog *m_dialog;
|
|
|
|
|
|
|
|
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxGenericNotificationMessage);
|
2007-11-23 20:56:13 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_GENERIC_NOTIFMSG_H_
|
|
|
|
|