1
/* $Id: activatable.hg,v 1.3 2006/05/18 17:53:15 murrayc Exp $ */
3
/* Copyright (C) 2009 The gtkmm Development Team
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the Free
17
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
#include <gtkmm/action.h>
21
#include <glibmm/interface.h>
23
_PINCLUDE(glibmm/private/interface_p.h)
25
#ifndef DOXYGEN_SHOULD_SKIP_THIS
28
typedef struct _GtkActivatableIface GtkActivatableIface;
30
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
35
/** Activatable widgets can be connected to a Gtk::Action and reflect the state
36
* of the action. An Activatable can also provide feedback through its action,
37
* as it is responsible for activating the related action.
41
class Activatable : public Glib::Interface
43
_CLASS_INTERFACE(Activatable, GtkActivatable, GTK_ACTIVATABLE, GtkActivatableIface)
46
_WRAP_METHOD(void do_set_related_action(const Glib::RefPtr<Action>& action), gtk_activatable_do_set_related_action)
47
_WRAP_METHOD(Glib::RefPtr<Action> get_related_action(), gtk_activatable_get_related_action, refreturn)
48
_WRAP_METHOD(Glib::RefPtr<const Action> get_related_action() const, gtk_activatable_get_related_action, refreturn, constversion)
49
_WRAP_METHOD(bool get_use_action_appearance() const, gtk_activatable_get_use_action_appearance)
50
_WRAP_METHOD(void sync_action_properties(const Glib::RefPtr<Action>& action), gtk_activatable_sync_action_properties)
51
_WRAP_METHOD(void set_related_action(const Glib::RefPtr<Action>& action), gtk_activatable_set_related_action)
52
_WRAP_METHOD(void set_use_action_appearance(bool use_appearance = true), gtk_activatable_set_use_action_appearance)
54
_WRAP_PROPERTY("related-action", Glib::RefPtr<Action>)
55
_WRAP_PROPERTY("use-action-appearance", bool)
57
#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
58
_WRAP_VFUNC(void update(const Glib::RefPtr<Action>& action, const Glib::ustring& property_name), update)
59
_WRAP_VFUNC(void sync_action_properties(const Glib::RefPtr<Action>& action), sync_action_properties)