~ubuntu-branches/ubuntu/precise/gtkmm3.0/precise

« back to all changes in this revision

Viewing changes to gtk/src/activatable.hg

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2011-06-17 00:12:44 UTC
  • Revision ID: james.westby@ubuntu.com-20110617001244-9hl5an15hiaaahi6
Tags: upstream-3.0.1
ImportĀ upstreamĀ versionĀ 3.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: activatable.hg,v 1.3 2006/05/18 17:53:15 murrayc Exp $ */
 
2
 
 
3
/* Copyright (C) 2009 The gtkmm Development Team
 
4
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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.
 
18
 */
 
19
 
 
20
#include <gtkmm/action.h>
 
21
#include <glibmm/interface.h>
 
22
_DEFS(gtkmm,gtk)
 
23
_PINCLUDE(glibmm/private/interface_p.h)
 
24
 
 
25
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
26
extern "C"
 
27
{
 
28
typedef struct _GtkActivatableIface GtkActivatableIface;
 
29
}
 
30
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
31
 
 
32
namespace Gtk
 
33
{
 
34
 
 
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.
 
38
 *
 
39
 * @newin{2,16}
 
40
 */
 
41
class Activatable : public Glib::Interface
 
42
{
 
43
  _CLASS_INTERFACE(Activatable, GtkActivatable, GTK_ACTIVATABLE, GtkActivatableIface)
 
44
 
 
45
public:
 
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)
 
53
 
 
54
  _WRAP_PROPERTY("related-action", Glib::RefPtr<Action>)
 
55
  _WRAP_PROPERTY("use-action-appearance", bool)
 
56
 
 
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)
 
60
};
 
61
 
 
62
} // namespace Gtk
 
63