]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/private/list.h
Improve wxAuiNotebook appearance when using some GTK themes.
[wxWidgets.git] / include / wx / gtk / private / list.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/private/list.h
3 // Purpose: wxGtkList class.
4 // Author: Vadim Zeitlin
5 // Created: 2011-08-21
6 // RCS-ID: $Id$
7 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_GTK_PRIVATE_LIST_H_
12 #define _WX_GTK_PRIVATE_LIST_H_
13
14 // ----------------------------------------------------------------------------
15 // Convenience class for calling g_list_free() automatically
16 // ----------------------------------------------------------------------------
17
18 class wxGtkList
19 {
20 public:
21 explicit wxGtkList(GList* list) : m_list(list) { }
22 ~wxGtkList() { g_list_free(m_list); }
23
24 operator GList *() const { return m_list; }
25 GList * operator->() const { return m_list; }
26
27 protected:
28 GList* const m_list;
29
30 wxDECLARE_NO_COPY_CLASS(wxGtkList);
31 };
32
33 #endif // _WX_GTK_PRIVATE_LIST_H_