1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: declaration of wxInfoBarBase defining common API of wxInfoBar
4 // Author: Vadim Zeitlin
6 // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_INFOBAR_H_
11 #define _WX_INFOBAR_H_
17 #include "wx/control.h"
19 // ----------------------------------------------------------------------------
20 // wxInfoBar shows non-critical but important information to the user
21 // ----------------------------------------------------------------------------
23 class WXDLLIMPEXP_CORE wxInfoBarBase
: public wxControl
26 // real ctors are provided by the derived classes, just notice that unlike
27 // most of the other windows, info bar is created hidden and must be
28 // explicitly shown when it is needed (this is done because it is supposed
29 // to be shown only intermittently and hiding it after creating it from the
30 // user code would result in flicker)
34 // show the info bar with the given message and optionally an icon
35 virtual void ShowMessage(const wxString
& msg
,
36 int flags
= wxICON_INFORMATION
) = 0;
39 virtual void Dismiss() = 0;
41 // add an extra button to the bar, near the message (replacing the default
42 // close button which is only shown if no extra buttons are used)
43 virtual void AddButton(wxWindowID btnid
,
44 const wxString
& label
= wxString()) = 0;
46 // remove a button previously added by AddButton()
47 virtual void RemoveButton(wxWindowID btnid
) = 0;
50 wxDECLARE_NO_COPY_CLASS(wxInfoBarBase
);
53 // currently only GTK+ has a native implementation
54 #if defined(__WXGTK218__) && !defined(__WXUNIVERSAL__)
55 #include "wx/gtk/infobar.h"
56 #define wxHAS_NATIVE_INFOBAR
59 // if the generic version is the only one we have, use it
60 #ifndef wxHAS_NATIVE_INFOBAR
61 #include "wx/generic/infobar.h"
62 #define wxInfoBar wxInfoBarGeneric
65 #endif // wxUSE_INFOBAR
67 #endif // _WX_INFOBAR_H_