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

« back to all changes in this revision

Viewing changes to gtk/gtkmm/stockitem.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_STOCKITEM_H
 
4
#define _GTKMM_STOCKITEM_H
 
5
 
 
6
 
 
7
#include <glibmm.h>
 
8
 
 
9
/* $Id: stockitem.hg,v 1.2 2004/04/11 21:00:53 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
#include <gdkmm/types.h>
 
29
#include <gtkmm/stockid.h>
 
30
 
 
31
 
 
32
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
33
extern "C"
 
34
{
 
35
  typedef struct _GtkStockItem GtkStockItem;
 
36
}
 
37
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
38
 
 
39
namespace Gtk
 
40
{
 
41
 
 
42
class StockItem
 
43
{
 
44
  public:
 
45
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
46
  typedef StockItem CppObjectType;
 
47
  typedef GtkStockItem BaseObjectType;
 
48
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
49
 
 
50
  StockItem();
 
51
 
 
52
  // Use make_a_copy=true when getting it directly from a struct.
 
53
  explicit StockItem(GtkStockItem* castitem, bool make_a_copy = false);
 
54
 
 
55
  StockItem(const StockItem& src);
 
56
  StockItem& operator=(const StockItem& src);
 
57
 
 
58
  ~StockItem();
 
59
 
 
60
  GtkStockItem*       gobj()       { return gobject_; }
 
61
  const GtkStockItem* gobj() const { return gobject_; }
 
62
 
 
63
  ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
 
64
  GtkStockItem* gobj_copy() const;
 
65
 
 
66
protected:
 
67
  GtkStockItem* gobject_;
 
68
 
 
69
private:
 
70
 
 
71
 
 
72
public:
 
73
  StockItem(const Gtk::StockID& stock_id, const Glib::ustring& label,
 
74
            Gdk::ModifierType modifier = Gdk::ModifierType(0), unsigned int keyval = 0,
 
75
            const Glib::ustring& translation_domain = Glib::ustring());
 
76
 
 
77
   StockID get_stock_id() const;
 
78
    Glib::ustring get_label() const;
 
79
    Gdk::ModifierType get_modifier() const;
 
80
    guint get_keyval() const;
 
81
    Glib::ustring get_translation_domain() const;
 
82
 
 
83
  static bool lookup(const Gtk::StockID& stock_id, Gtk::StockItem& item);
 
84
 
 
85
 
 
86
};
 
87
 
 
88
} // namespace Gtk
 
89
 
 
90
 
 
91
namespace Glib
 
92
{
 
93
 
 
94
  /** A Glib::wrap() method for this object.
 
95
   * 
 
96
   * @param object The C instance.
 
97
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
 
98
   * @result A C++ instance that wraps this C instance.
 
99
   *
 
100
   * @relates Gtk::StockItem
 
101
   */
 
102
Gtk::StockItem wrap(GtkStockItem* object, bool take_copy = false);
 
103
 
 
104
} // namespace Glib
 
105
 
 
106
 
 
107
#endif /* _GTKMM_STOCKITEM_H */
 
108