2
// Generated by gtkmmproc -- DO NOT MODIFY!
3
#ifndef _ATKMM_SELECTION_H
4
#define _ATKMM_SELECTION_H
9
/* $Id: selection.hg,v 1.2 2004/01/02 09:56:43 murrayc Exp $ */
11
/* Copyright (C) 2002 The gtkmm Development Team
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.
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.
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.
29
#ifndef DOXYGEN_SHOULD_SKIP_THIS
32
typedef struct _AtkSelectionIface AtkSelectionIface;
33
typedef struct _AtkSelection AtkSelection;
35
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
38
#ifndef DOXYGEN_SHOULD_SKIP_THIS
39
typedef struct _AtkSelection AtkSelection;
40
typedef struct _AtkSelectionClass AtkSelectionClass;
41
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
45
{ class Selection_Class; } // namespace Atk
51
/** The ATK interface implemented by container objects whose Atk::Object children can be selected.
52
* This should be implemented by UI components with children which are exposed by Atk::Object::ref_child and
53
* Atk::Object::get_n_children, if the use of the parent UI component ordinarily involves selection of one or
54
* more of the objects corresponding to those AtkObject children - for example, selectable lists.
56
* Note that other types of "selection" (for instance text selection) are accomplished a other ATK interfaces -
57
* Atk::Selection is limited to the selection/deselection of children.
60
class Selection : public Glib::Interface
63
#ifndef DOXYGEN_SHOULD_SKIP_THIS
66
typedef Selection CppObjectType;
67
typedef Selection_Class CppClassType;
68
typedef AtkSelection BaseObjectType;
69
typedef AtkSelectionIface BaseClassType;
72
friend class Selection_Class;
73
static CppClassType selection_class_;
76
Selection(const Selection&);
77
Selection& operator=(const Selection&);
80
Selection(); // you must derive from this class
82
/** Called by constructors of derived classes. Provide the result of
83
* the Class init() function to ensure that it is properly
86
* @param interface_class The Class object for the derived type.
88
explicit Selection(const Glib::Interface_Class& interface_class);
91
// This is public so that C++ wrapper instances can be
92
// created for C instances of unwrapped types.
93
// For instance, if an unexpected C type implements the C interface.
94
explicit Selection(AtkSelection* castitem);
97
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
100
virtual ~Selection();
102
static void add_interface(GType gtype_implementer);
104
#ifndef DOXYGEN_SHOULD_SKIP_THIS
105
static GType get_type() G_GNUC_CONST;
106
static GType get_base_type() G_GNUC_CONST;
109
///Provides access to the underlying C GObject.
110
AtkSelection* gobj() { return reinterpret_cast<AtkSelection*>(gobject_); }
112
///Provides access to the underlying C GObject.
113
const AtkSelection* gobj() const { return reinterpret_cast<AtkSelection*>(gobject_); }
120
/** Adds the specified accessible child of the object to the
121
* object's selection.
122
* @param i A <tt>int</tt> specifying the child index.
123
* @return <tt>true</tt> if success, <tt>false</tt> otherwise.
125
bool add_selection(int i);
127
/** Clears the selection in the object so that no children in the object
129
* @return <tt>true</tt> if success, <tt>false</tt> otherwise.
131
bool clear_selection();
133
/** Gets a reference to the accessible object representing the specified
134
* selected child of the object.
135
* @note callers should not rely on <tt>0</tt> or on a zero value for
136
* indication of whether AtkSelectionIface is implemented, they should
137
* use type checking/interface checking macros or the
138
* atk_get_accessible_value() convenience method.
139
* @param i A <tt>int</tt> specifying the index in the selection set. (e.g. the
140
* ith selection as opposed to the ith child).
141
* @return An Atk::Object representing the selected accessible , or <tt>0</tt>
142
* if @a selection does not implement this interface.
144
Glib::RefPtr<Atk::Object> get_selection(int i);
146
/** Gets the number of accessible children currently selected.
147
* @note callers should not rely on <tt>0</tt> or on a zero value for
148
* indication of whether AtkSelectionIface is implemented, they should
149
* use type checking/interface checking macros or the
150
* atk_get_accessible_value() convenience method.
151
* @return A <tt>int</tt> representing the number of items selected, or 0
152
* if @a selection does not implement this interface.
154
int get_selection_count() const;
156
/** Determines if the current child of this object is selected
157
* @note callers should not rely on <tt>0</tt> or on a zero value for
158
* indication of whether AtkSelectionIface is implemented, they should
159
* use type checking/interface checking macros or the
160
* atk_get_accessible_value() convenience method.
161
* @param i A <tt>int</tt> specifying the child index.
162
* @return A <tt>bool</tt> representing the specified child is selected, or 0
163
* if @a selection does not implement this interface.
165
bool is_child_selected(int i) const;
167
/** Removes the specified child of the object from the object's selection.
168
* @param i A <tt>int</tt> specifying the index in the selection set. (e.g. the
169
* ith selection as opposed to the ith child).
170
* @return <tt>true</tt> if success, <tt>false</tt> otherwise.
172
bool remove_selection(int i);
174
/** Causes every child of the object to be selected if the object
175
* supports multiple selections.
176
* @return <tt>true</tt> if success, <tt>false</tt> otherwise.
178
bool select_all_selection();
183
* <tt>void on_my_%selection_changed()</tt>
186
Glib::SignalProxy0< void > signal_selection_changed();
190
virtual bool add_selection_vfunc(int i);
192
virtual bool clear_selection_vfunc();
194
virtual Glib::RefPtr<Atk::Object> get_selection_vfunc(int i);
196
virtual int get_selection_count_vfunc() const;
198
virtual bool is_child_selected_vfunc(int i) const;
200
virtual bool remove_selection_vfunc(int i);
202
virtual bool select_all_selection_vfunc();
208
//C++ methods used to invoke GTK+ virtual functions:
211
//GTK+ Virtual Functions (override these to change behaviour):
213
//Default Signal Handlers::
214
virtual void on_selection_changed();
224
/** A Glib::wrap() method for this object.
226
* @param object The C instance.
227
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
228
* @result A C++ instance that wraps this C instance.
230
* @relates Atk::Selection
232
Glib::RefPtr<Atk::Selection> wrap(AtkSelection* object, bool take_copy = false);
237
#endif /* _ATKMM_SELECTION_H */