]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/infobar.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git] / include / wx / infobar.h
... / ...
CommitLineData
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
6// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
7// Licence: wxWindows licence
8///////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_INFOBAR_H_
11#define _WX_INFOBAR_H_
12
13#include "wx/defs.h"
14
15#if wxUSE_INFOBAR
16
17#include "wx/control.h"
18
19// ----------------------------------------------------------------------------
20// wxInfoBar shows non-critical but important information to the user
21// ----------------------------------------------------------------------------
22
23class WXDLLIMPEXP_CORE wxInfoBarBase : public wxControl
24{
25public:
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)
31 wxInfoBarBase() { }
32
33
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;
37
38 // hide the info bar
39 virtual void Dismiss() = 0;
40
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;
45
46 // remove a button previously added by AddButton()
47 virtual void RemoveButton(wxWindowID btnid) = 0;
48
49private:
50 wxDECLARE_NO_COPY_CLASS(wxInfoBarBase);
51};
52
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
57#endif // wxGTK2
58
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
63#endif
64
65#endif // wxUSE_INFOBAR
66
67#endif // _WX_INFOBAR_H_