2007-11-24 01:56:13 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/generic/notifmsg.h
|
2007-12-02 17:02:30 +00:00
|
|
|
// Purpose: generic implementation of wxGenericNotificationMessage
|
2007-11-24 01:56:13 +00: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 17:02:30 +00:00
|
|
|
// wxGenericNotificationMessage
|
2007-11-24 01:56:13 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2007-12-02 17:02:30 +00:00
|
|
|
class WXDLLIMPEXP_ADV wxGenericNotificationMessage : public wxNotificationMessageBase
|
2007-11-24 01:56:13 +00:00
|
|
|
{
|
|
|
|
public:
|
2007-12-02 17:02:30 +00:00
|
|
|
wxGenericNotificationMessage() { Init(); }
|
|
|
|
wxGenericNotificationMessage(const wxString& title,
|
|
|
|
const wxString& message = wxString(),
|
2007-12-02 19:43:04 +00:00
|
|
|
wxWindow *parent = NULL,
|
|
|
|
int flags = wxICON_INFORMATION)
|
|
|
|
: wxNotificationMessageBase(title, message, parent, flags)
|
2007-11-24 01:56:13 +00:00
|
|
|
{
|
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
2007-12-02 17:02:30 +00:00
|
|
|
virtual ~wxGenericNotificationMessage();
|
2007-11-24 01:56:13 +00: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 11:45:59 +00:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxGenericNotificationMessage);
|
2007-11-24 01:56:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_GENERIC_NOTIFMSG_H_
|
|
|
|
|