]> git.saurik.com Git - wxWidgets.git/blame - include/wx/infobar.h
Always NUL-terminate wxPrintfConvSpec::m_szFlags.
[wxWidgets.git] / include / wx / infobar.h
CommitLineData
a92b5dfe
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/infobar.h
3// Purpose: declaration of wxInfoBarBase defining common API of wxInfoBar
4// Author: Vadim Zeitlin
5// Created: 2009-07-28
e33253d1 6// RCS-ID: $Id$
a92b5dfe
VZ
7// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
8// Licence: wxWindows licence
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_INFOBAR_H_
12#define _WX_INFOBAR_H_
13
14#include "wx/defs.h"
15
16#if wxUSE_INFOBAR
17
e33253d1 18#include "wx/control.h"
a92b5dfe
VZ
19
20// ----------------------------------------------------------------------------
21// wxInfoBar shows non-critical but important information to the user
22// ----------------------------------------------------------------------------
23
742df992 24class WXDLLIMPEXP_CORE wxInfoBarBase : public wxControl
a92b5dfe
VZ
25{
26public:
27 // real ctors are provided by the derived classes, just notice that unlike
28 // most of the other windows, info bar is created hidden and must be
29 // explicitly shown when it is needed (this is done because it is supposed
30 // to be shown only intermittently and hiding it after creating it from the
31 // user code would result in flicker)
32 wxInfoBarBase() { }
33
34
35 // show the info bar with the given message and optionally an icon
ed8efd46
VZ
36 virtual void ShowMessage(const wxString& msg,
37 int flags = wxICON_INFORMATION) = 0;
a92b5dfe 38
0b1add25
VZ
39 // hide the info bar
40 virtual void Dismiss() = 0;
41
6a3f8b4f
VZ
42 // add an extra button to the bar, near the message (replacing the default
43 // close button which is only shown if no extra buttons are used)
374ae80f
VZ
44 virtual void AddButton(wxWindowID btnid,
45 const wxString& label = wxString()) = 0;
46
e6b2aae1
VZ
47 // remove a button previously added by AddButton()
48 virtual void RemoveButton(wxWindowID btnid) = 0;
49
a92b5dfe
VZ
50private:
51 wxDECLARE_NO_COPY_CLASS(wxInfoBarBase);
52};
53
ed8efd46 54// currently only GTK+ has a native implementation
d85aece1
VZ
55#if defined(__WXGTK218__) && !defined(__WXUNIVERSAL__)
56 #include "wx/gtk/infobar.h"
57 #define wxHAS_NATIVE_INFOBAR
ed8efd46
VZ
58#endif // wxGTK2
59
60// if the generic version is the only one we have, use it
61#ifndef wxHAS_NATIVE_INFOBAR
62 #include "wx/generic/infobar.h"
63 #define wxInfoBar wxInfoBarGeneric
64#endif
a92b5dfe
VZ
65
66#endif // wxUSE_INFOBAR
67
68#endif // _WX_INFOBAR_H_