]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/infobar.h
remove unused variables, minor cleanup
[wxWidgets.git] / include / wx / gtk / infobar.h
CommitLineData
ed8efd46
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/gtk/infobar.h
3// Purpose: native implementation of wxInfoBar for GTK+ 2.18 and later
4// Author: Vadim Zeitlin
5// Created: 2009-09-26
6// RCS-ID: $Id: wxhead.h,v 1.11 2009-06-29 10:23:04 zeitlin Exp $
7// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
8// Licence: wxWindows licence
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_GTK_INFOBAR_H_
12#define _WX_GTK_INFOBAR_H_
13
14#include "wx/generic/infobar.h"
15
16// ----------------------------------------------------------------------------
17// wxInfoBar for GTK+
18// ----------------------------------------------------------------------------
19
20// notice that the native GTK+ implementation is only available since
21// (relatively recent) 2.18 so we inherit from the generic one to be able to
22// fall back to it if GTK+ version is determined to be too old during run-time
23class WXDLLIMPEXP_ADV wxInfoBar : public wxInfoBarGeneric
24{
25public:
26 wxInfoBar() { Init(); }
27
28 wxInfoBar(wxWindow *parent, wxWindowID winid = wxID_ANY)
29 {
30 Init();
31 Create(parent, winid);
32 }
33
34 bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY);
35
36 virtual ~wxInfoBar();
37
38 // implement base class methods
39 // ----------------------------
40
41 virtual void ShowMessage(const wxString& msg,
42 int flags = wxICON_INFORMATION);
43
0b1add25
VZ
44 virtual void Dismiss();
45
ed8efd46
VZ
46 virtual void AddButton(wxWindowID btnid,
47 const wxString& label = wxString());
48
e6b2aae1
VZ
49 virtual void RemoveButton(wxWindowID btnid);
50
ed8efd46
VZ
51 // implementation only
52 // -------------------
53
54 void GTKResponse(int btnid);
55
56protected:
57 virtual bool GTKShouldConnectSizeRequest() const { return false; }
4026acf1 58 virtual void DoApplyWidgetStyle(GtkRcStyle *style);
ed8efd46
VZ
59
60private:
e6b2aae1
VZ
61 void Init() { m_impl = NULL; }
62
6a3f8b4f
VZ
63 // add a button with the given id/label and return its widget
64 GtkWidget *GTKAddButton(wxWindowID btnid,
65 const wxString& label = wxString());
66
ed8efd46 67
e6b2aae1
VZ
68 // only used when the native implementation is really being used
69 class wxInfoBarGTKImpl *m_impl;
ed8efd46
VZ
70
71 wxDECLARE_NO_COPY_CLASS(wxInfoBar);
72};
73
74#endif // _WX_GTK_INFOBAR_H_
75