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

« back to all changes in this revision

Viewing changes to gtk/gtkmm/iconfactory.h

  • 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
// -*- c++ -*-
 
2
// Generated by gtkmmproc -- DO NOT MODIFY!
 
3
#ifndef _GTKMM_ICONFACTORY_H
 
4
#define _GTKMM_ICONFACTORY_H
 
5
 
 
6
 
 
7
#include <glibmm.h>
 
8
 
 
9
/* $Id: iconfactory.hg,v 1.1 2003/01/21 13:40:26 murrayc Exp $ */
 
10
 
 
11
/* Copyright (C) 1998-2002 The gtkmm Development Team
 
12
 *
 
13
 * This library is free software; you can redistribute it and/or
 
14
 * modify it under the terms of the GNU Lesser General Public
 
15
 * License as published by the Free Software Foundation; either
 
16
 * version 2.1 of the License, or (at your option) any later version.
 
17
 *
 
18
 * This library is distributed in the hope that it will be useful,
 
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
21
 * Lesser General Public License for more details.
 
22
 *
 
23
 * You should have received a copy of the GNU Lesser General Public
 
24
 * License along with this library; if not, write to the Free
 
25
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
26
 */
 
27
 
 
28
 
 
29
#include <gtkmm/enums.h>
 
30
#include <glibmm/object.h>
 
31
#include <gtkmm/enums.h>
 
32
#include <gtkmm/iconset.h>
 
33
#include <gtkmm/stockid.h>
 
34
 
 
35
 
 
36
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
37
typedef struct _GtkIconFactory GtkIconFactory;
 
38
typedef struct _GtkIconFactoryClass GtkIconFactoryClass;
 
39
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
40
 
 
41
 
 
42
namespace Gtk
 
43
{ class IconFactory_Class; } // namespace Gtk
 
44
namespace Gtk
 
45
{
 
46
 
 
47
 
 
48
class IconFactory : public Glib::Object
 
49
{
 
50
   
 
51
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
52
 
 
53
public:
 
54
  typedef IconFactory CppObjectType;
 
55
  typedef IconFactory_Class CppClassType;
 
56
  typedef GtkIconFactory BaseObjectType;
 
57
  typedef GtkIconFactoryClass BaseClassType;
 
58
 
 
59
private:  friend class IconFactory_Class;
 
60
  static CppClassType iconfactory_class_;
 
61
 
 
62
private:
 
63
  // noncopyable
 
64
  IconFactory(const IconFactory&);
 
65
  IconFactory& operator=(const IconFactory&);
 
66
 
 
67
protected:
 
68
  explicit IconFactory(const Glib::ConstructParams& construct_params);
 
69
  explicit IconFactory(GtkIconFactory* castitem);
 
70
 
 
71
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
72
 
 
73
public:
 
74
  virtual ~IconFactory();
 
75
 
 
76
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
77
  static GType get_type()      G_GNUC_CONST;
 
78
 
 
79
 
 
80
  static GType get_base_type() G_GNUC_CONST;
 
81
#endif
 
82
 
 
83
  ///Provides access to the underlying C GObject.
 
84
  GtkIconFactory*       gobj()       { return reinterpret_cast<GtkIconFactory*>(gobject_); }
 
85
 
 
86
  ///Provides access to the underlying C GObject.
 
87
  const GtkIconFactory* gobj() const { return reinterpret_cast<GtkIconFactory*>(gobject_); }
 
88
 
 
89
  ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
 
90
  GtkIconFactory* gobj_copy();
 
91
 
 
92
private:
 
93
 
 
94
   
 
95
protected:
 
96
 
 
97
  IconFactory();
 
98
 
 
99
public:
 
100
  
 
101
  static Glib::RefPtr<IconFactory> create();
 
102
 
 
103
 
 
104
  /** Adds the given @a icon_set to the icon factory, under the name
 
105
   *  @a stock_id.  @a stock_id should be namespaced for your application,
 
106
   * e.g. "myapp-whatever-icon".  Normally applications create a
 
107
   * Gtk::IconFactory, then add it to the list of default factories with
 
108
   * add_default(). Then they pass the @a stock_id to
 
109
   * widgets such as Gtk::Image to display the icon. Themes can provide
 
110
   * an icon with the same name (such as "myapp-whatever-icon") to
 
111
   * override your application's default icons. If an icon already
 
112
   * existed in @a factory for @a stock_id, it is unreferenced and replaced
 
113
   * with the new @a icon_set.
 
114
   * @param stock_id Icon name.
 
115
   * @param icon_set Icon set.
 
116
   */
 
117
  void add(const Gtk::StockID& stock_id, const Glib::RefPtr<IconSet>& icon_set);
 
118
  
 
119
  /** Adds an icon factory to the list of icon factories searched by
 
120
   *     Gtk::Style::lookup_icon_set(). This means that, for example,
 
121
   *     the Image::Image(const Gtk::StockID& stock_id, IconSize size) constructor will be able to find icons in @a factory.
 
122
   *     There will normally be an icon factory added for each library or
 
123
   *     application that comes with icons. The default icon factories
 
124
   *     can be overridden by themes.
 
125
   */
 
126
  void add_default();
 
127
  
 
128
  /** Removes an icon factory from the list of default icon
 
129
   * factories. Not normally used; you might use it for a library that
 
130
   * can be unloaded or shut down.
 
131
   */
 
132
  void remove_default();
 
133
 
 
134
 
 
135
public:
 
136
 
 
137
public:
 
138
  //C++ methods used to invoke GTK+ virtual functions:
 
139
 
 
140
protected:
 
141
  //GTK+ Virtual Functions (override these to change behaviour):
 
142
 
 
143
  //Default Signal Handlers::
 
144
 
 
145
 
 
146
};
 
147
 
 
148
} // namespace Gtk
 
149
 
 
150
 
 
151
namespace Glib
 
152
{
 
153
  /** A Glib::wrap() method for this object.
 
154
   * 
 
155
   * @param object The C instance.
 
156
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
 
157
   * @result A C++ instance that wraps this C instance.
 
158
   *
 
159
   * @relates Gtk::IconFactory
 
160
   */
 
161
  Glib::RefPtr<Gtk::IconFactory> wrap(GtkIconFactory* object, bool take_copy = false);
 
162
}
 
163
 
 
164
 
 
165
#endif /* _GTKMM_ICONFACTORY_H */
 
166