~ubuntu-branches/ubuntu/precise/atkmm1.6/precise

« back to all changes in this revision

Viewing changes to atk/atkmm/stateset.h

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Klimonda
  • Date: 2010-11-02 20:35:53 UTC
  • Revision ID: james.westby@ubuntu.com-20101102203553-syno2w6yedmcdgk8
Tags: upstream-2.22.1
ImportĀ upstreamĀ versionĀ 2.22.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- c++ -*-
 
2
// Generated by gtkmmproc -- DO NOT MODIFY!
 
3
#ifndef _ATKMM_STATESET_H
 
4
#define _ATKMM_STATESET_H
 
5
 
 
6
 
 
7
#include <glibmm.h>
 
8
 
 
9
/* $Id: stateset.hg,v 1.3 2004/01/02 09:56:43 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
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
30
typedef struct _AtkStateSet AtkStateSet;
 
31
typedef struct _AtkStateSetClass AtkStateSetClass;
 
32
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
33
 
 
34
 
 
35
namespace Atk
 
36
{ class StateSet_Class; } // namespace Atk
 
37
namespace Atk
 
38
{
 
39
 
 
40
 
 
41
/** @addtogroup atkmmEnums atkmm Enums and Flags */
 
42
 
 
43
/**
 
44
 * @ingroup atkmmEnums
 
45
 */
 
46
enum StateType
 
47
{
 
48
  STATE_INVALID,
 
49
  STATE_ACTIVE,
 
50
  STATE_ARMED,
 
51
  STATE_BUSY,
 
52
  STATE_CHECKED,
 
53
  STATE_DEFUNCT,
 
54
  STATE_EDITABLE,
 
55
  STATE_ENABLED,
 
56
  STATE_EXPANDABLE,
 
57
  STATE_EXPANDED,
 
58
  STATE_FOCUSABLE,
 
59
  STATE_FOCUSED,
 
60
  STATE_HORIZONTAL,
 
61
  STATE_ICONIFIED,
 
62
  STATE_MODAL,
 
63
  STATE_MULTI_LINE,
 
64
  STATE_MULTISELECTABLE,
 
65
  STATE_OPAQUE,
 
66
  STATE_PRESSED,
 
67
  STATE_RESIZABLE,
 
68
  STATE_SELECTABLE,
 
69
  STATE_SELECTED,
 
70
  STATE_SENSITIVE,
 
71
  STATE_SHOWING,
 
72
  STATE_SINGLE_LINE,
 
73
  STATE_STALE,
 
74
  STATE_TRANSIENT,
 
75
  STATE_VERTICAL,
 
76
  STATE_VISIBLE,
 
77
  STATE_MANAGES_DESCENDANTS,
 
78
  STATE_INDETERMINATE,
 
79
  STATE_TRUNCATED,
 
80
  STATE_REQUIRED,
 
81
  STATE_LAST_DEFINED
 
82
};
 
83
 
 
84
} // namespace Atk
 
85
 
 
86
 
 
87
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
88
namespace Glib
 
89
{
 
90
 
 
91
template <>
 
92
class Value<Atk::StateType> : public Glib::Value_Enum<Atk::StateType>
 
93
{
 
94
public:
 
95
  static GType value_type() G_GNUC_CONST;
 
96
};
 
97
 
 
98
} // namespace Glib
 
99
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
100
 
 
101
 
 
102
namespace Atk
 
103
{
 
104
 
 
105
 
 
106
/** An AtkStateSet determines a component's state set.
 
107
 * It is composed of a set of Atk::States.
 
108
 */
 
109
 
 
110
class StateSet : public Glib::Object
 
111
{
 
112
  
 
113
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
114
 
 
115
public:
 
116
  typedef StateSet CppObjectType;
 
117
  typedef StateSet_Class CppClassType;
 
118
  typedef AtkStateSet BaseObjectType;
 
119
  typedef AtkStateSetClass BaseClassType;
 
120
 
 
121
private:  friend class StateSet_Class;
 
122
  static CppClassType stateset_class_;
 
123
 
 
124
private:
 
125
  // noncopyable
 
126
  StateSet(const StateSet&);
 
127
  StateSet& operator=(const StateSet&);
 
128
 
 
129
protected:
 
130
  explicit StateSet(const Glib::ConstructParams& construct_params);
 
131
  explicit StateSet(AtkStateSet* castitem);
 
132
 
 
133
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
134
 
 
135
public:
 
136
  virtual ~StateSet();
 
137
 
 
138
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
139
  static GType get_type()      G_GNUC_CONST;
 
140
 
 
141
 
 
142
  static GType get_base_type() G_GNUC_CONST;
 
143
#endif
 
144
 
 
145
  ///Provides access to the underlying C GObject.
 
146
  AtkStateSet*       gobj()       { return reinterpret_cast<AtkStateSet*>(gobject_); }
 
147
 
 
148
  ///Provides access to the underlying C GObject.
 
149
  const AtkStateSet* gobj() const { return reinterpret_cast<AtkStateSet*>(gobject_); }
 
150
 
 
151
  ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
 
152
  AtkStateSet* gobj_copy();
 
153
 
 
154
private:
 
155
 
 
156
 
 
157
protected:
 
158
  StateSet();
 
159
  
 
160
public:
 
161
  
 
162
  static Glib::RefPtr<StateSet> create();
 
163
 
 
164
 
 
165
  /** Checks whether the state set is empty, i.e.\ has no states set.
 
166
   * @return <tt>true</tt> if @a set has no states set, otherwise <tt>false</tt>.
 
167
   */
 
168
  bool is_empty() const;
 
169
 
 
170
  //Note that we use Atk::StateType instead of StateType, because there is a Gtk::StateType too, and Doxygen gets confused.
 
171
  
 
172
  /** Add a new state for the specified type to the current state set if
 
173
   * it is not already present.
 
174
   * @param type An Atk::StateType.
 
175
   * @return <tt>true</tt> if  the state for @a type is not already in @a set.
 
176
   */
 
177
  bool add_state(Atk::StateType type);
 
178
  void add_states(const Glib::ArrayHandle<Atk::StateType>& types);
 
179
  
 
180
  
 
181
  /** Removes all states from the state set.
 
182
   */
 
183
  void clear_states();
 
184
  
 
185
  /** Checks whether the state for the specified type is in the specified set.
 
186
   * @param type An Atk::StateType.
 
187
   * @return <tt>true</tt> if @a type is the state type is in @a set.
 
188
   */
 
189
  bool contains_state(Atk::StateType type);
 
190
   bool contains_states(const Glib::ArrayHandle<Atk::StateType>& types) const;
 
191
  
 
192
  
 
193
  /** Removes the state for the specified type from the state set.
 
194
   * @param type An Atk::Type.
 
195
   * @return <tt>true</tt> if @a type was the state type is in @a set.
 
196
   */
 
197
  bool remove_state(Atk::StateType type);
 
198
  
 
199
  /** Constructs the intersection of the two sets, returning <tt>0</tt> if the
 
200
   * intersection is empty.
 
201
   * @param compare_set Another Atk::StateSet.
 
202
   * @return A new Atk::StateSet which is the intersection of the two sets.
 
203
   */
 
204
  Glib::RefPtr<StateSet> and_sets(const Glib::RefPtr<StateSet>& compare_set);
 
205
  
 
206
  /** Constructs the union of the two sets.
 
207
   * @param compare_set Another Atk::StateSet.
 
208
   * @return A new Atk::StateSet which is the union of the two sets,
 
209
   * returning <tt>0</tt> is empty.
 
210
   */
 
211
  Glib::RefPtr<StateSet> or_sets(const Glib::RefPtr<StateSet>& compare_set);
 
212
  
 
213
  /** Constructs the exclusive-or of the two sets, returning <tt>0</tt> is empty.
 
214
   * The set returned by this operation contains the states in exactly
 
215
   * one of the two sets.
 
216
   * @param compare_set Another Atk::StateSet.
 
217
   * @return A new Atk::StateSet which contains the states which are 
 
218
   * in exactly one of the two sets.
 
219
   */
 
220
  Glib::RefPtr<StateSet> xor_sets(const Glib::RefPtr<StateSet>& compare_set);
 
221
 
 
222
 
 
223
public:
 
224
 
 
225
public:
 
226
  //C++ methods used to invoke GTK+ virtual functions:
 
227
 
 
228
protected:
 
229
  //GTK+ Virtual Functions (override these to change behaviour):
 
230
 
 
231
  //Default Signal Handlers::
 
232
 
 
233
 
 
234
};
 
235
 
 
236
} // namespace Atk
 
237
 
 
238
 
 
239
namespace Glib
 
240
{
 
241
  /** A Glib::wrap() method for this object.
 
242
   * 
 
243
   * @param object The C instance.
 
244
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
 
245
   * @result A C++ instance that wraps this C instance.
 
246
   *
 
247
   * @relates Atk::StateSet
 
248
   */
 
249
  Glib::RefPtr<Atk::StateSet> wrap(AtkStateSet* object, bool take_copy = false);
 
250
}
 
251
 
 
252
 
 
253
#endif /* _ATKMM_STATESET_H */
 
254