GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

object.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2002-2004 The GFC Development Team. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00023 00024 #ifndef GFC_ATK_OBJECT_HH 00025 #define GFC_ATK_OBJECT_HH 00026 00027 #ifndef GFC_G_OBJECT_HH 00028 #include <gfc/glib/object.hh> 00029 #endif 00030 00031 #ifndef GFC_ATK_UTIL_HH 00032 #include <gfc/atk/util.hh> 00033 #endif 00034 00035 #ifndef __ATK_OBJECT_H__ 00036 #include <atk/atkobject.h> 00037 #endif 00038 00039 namespace GFC { 00040 00041 namespace Atk { 00042 00043 class RelationSet; 00044 class StateSet; 00045 00048 00049 enum Role 00050 { 00051 ROLE_INVALID = ATK_ROLE_INVALID, 00053 00054 ROLE_ACCEL_LABEL = ATK_ROLE_ACCEL_LABEL, 00056 00057 ROLE_ALERT = ATK_ROLE_ALERT, 00059 00060 ROLE_ANIMATION = ATK_ROLE_ANIMATION, 00062 00063 ROLE_ARROW = ATK_ROLE_ARROW, 00065 00066 ROLE_CALENDAR = ATK_ROLE_CALENDAR, 00068 00069 ROLE_CANVAS = ATK_ROLE_CANVAS, 00071 00072 ROLE_CHECK_BOX = ATK_ROLE_CHECK_BOX, 00074 00075 ROLE_CHECK_MENU_ITEM = ATK_ROLE_CHECK_MENU_ITEM, 00077 00078 ROLE_COLOR_CHOOSER = ATK_ROLE_COLOR_CHOOSER, 00080 00081 ROLE_COLUMN_HEADER = ATK_ROLE_COLUMN_HEADER, 00083 00084 ROLE_COMBO_BOX = ATK_ROLE_COMBO_BOX, 00086 00087 ROLE_DATE_EDITOR = ATK_ROLE_DATE_EDITOR, 00089 00090 ROLE_DESKTOP_ICON = ATK_ROLE_DESKTOP_ICON, 00092 00093 ROLE_DESKTOP_FRAME = ATK_ROLE_DESKTOP_FRAME, 00095 00096 ROLE_DIAL = ATK_ROLE_DIAL, 00098 00099 ROLE_DIALOG = ATK_ROLE_DIALOG, 00101 00102 ROLE_DIRECTORY_PANE = ATK_ROLE_DIRECTORY_PANE, 00104 00105 ROLE_DRAWING_AREA = ATK_ROLE_DRAWING_AREA, 00107 00108 ROLE_FILE_CHOOSER = ATK_ROLE_FILE_CHOOSER, 00110 00111 ROLE_FILLER = ATK_ROLE_FILLER, 00113 00114 ROLE_FONT_CHOOSER = ATK_ROLE_FONT_CHOOSER, 00116 00117 ROLE_FRAME = ATK_ROLE_FRAME, 00119 00120 ROLE_GLASS_PANE = ATK_ROLE_GLASS_PANE, 00122 00123 ROLE_HTML_CONTAINER = ATK_ROLE_HTML_CONTAINER, 00125 00126 ROLE_ICON = ATK_ROLE_ICON, 00128 00129 ROLE_IMAGE = ATK_ROLE_IMAGE, 00131 00132 ROLE_INTERNAL_FRAME = ATK_ROLE_INTERNAL_FRAME, 00134 00135 ROLE_LABEL = ATK_ROLE_LABEL, 00137 00138 ROLE_LAYERED_PANE = ATK_ROLE_LAYERED_PANE, 00140 00141 ROLE_LIST = ATK_ROLE_LIST, 00143 00144 ROLE_LIST_ITEM = ATK_ROLE_LIST_ITEM, 00146 00147 ROLE_MENU = ATK_ROLE_MENU, 00149 00150 ROLE_MENU_BAR = ATK_ROLE_MENU_BAR, 00153 00154 ROLE_MENU_ITEM = ATK_ROLE_MENU_ITEM, 00156 00157 ROLE_OPTION_PANE = ATK_ROLE_OPTION_PANE, 00159 00160 ROLE_PAGE_TAB = ATK_ROLE_PAGE_TAB, 00162 00163 ROLE_PAGE_TAB_LIST = ATK_ROLE_PAGE_TAB_LIST, 00166 00167 ROLE_PANEL = ATK_ROLE_PANEL, 00169 00170 ROLE_PASSWORD_TEXT = ATK_ROLE_PASSWORD_TEXT, 00172 00173 ROLE_POPUP_MENU = ATK_ROLE_POPUP_MENU, 00176 00177 ROLE_PROGRESS_BAR = ATK_ROLE_PROGRESS_BAR, 00179 00180 ROLE_PUSH_BUTTON = ATK_ROLE_PUSH_BUTTON, 00182 00183 ROLE_RADIO_BUTTON = ATK_ROLE_RADIO_BUTTON, 00186 00187 ROLE_RADIO_MENU_ITEM = ATK_ROLE_RADIO_MENU_ITEM, 00190 00191 OLE_ROOT_PANE = ATK_ROLE_ROOT_PANE, 00193 00194 ROLE_ROW_HEADER = ATK_ROLE_ROW_HEADER, 00196 00197 ROLE_SCROLL_BAR = ATK_ROLE_SCROLL_BAR, 00199 00200 ROLE_SCROLL_PANE = ATK_ROLE_SCROLL_PANE, 00202 00203 ROLE_SEPARATOR = ATK_ROLE_SEPARATOR, 00205 00206 ROLE_SLIDER = ATK_ROLE_SLIDER, 00208 00209 ROLE_SPLIT_PANE = ATK_ROLE_SPLIT_PANE, 00211 00212 ROLE_SPIN_BUTTON = ATK_ROLE_SPIN_BUTTON, 00214 00215 ROLE_STATUSBAR = ATK_ROLE_STATUSBAR, 00217 00218 ROLE_TABLE = ATK_ROLE_TABLE, 00220 00221 ROLE_TABLE_CELL = ATK_ROLE_TABLE_CELL, 00223 00224 ROLE_TABLE_COLUMN_HEADER = ATK_ROLE_TABLE_COLUMN_HEADER, 00226 00227 ROLE_TABLE_ROW_HEADER = ATK_ROLE_TABLE_ROW_HEADER, 00229 00230 ROLE_TEAR_OFF_MENU_ITEM = ATK_ROLE_TEAR_OFF_MENU_ITEM, 00232 00233 ROLE_TERMINAL = ATK_ROLE_TERMINAL, 00235 00236 ROLE_TEXT = ATK_ROLE_TEXT, 00238 00239 ROLE_TOGGLE_BUTTON = ATK_ROLE_TOGGLE_BUTTON, 00242 00243 ROLE_TOOL_BAR = ATK_ROLE_TOOL_BAR, 00245 00246 ROLE_TOOL_TIP = ATK_ROLE_TOOL_TIP, 00248 00249 ROLE_TREE = ATK_ROLE_TREE, 00251 00252 ROLE_TREE_TABLE = ATK_ROLE_TREE_TABLE, 00254 00255 ROLE_UNKNOWN = ATK_ROLE_UNKNOWN, 00257 00258 ROLE_VIEWPORT = ATK_ROLE_VIEWPORT, 00260 00261 ROLE_WINDOW = ATK_ROLE_WINDOW, 00263 00264 ROLE_HEADER = ATK_ROLE_HEADER, 00266 00267 ROLE_FOOTER = ATK_ROLE_FOOTER, 00269 00270 ROLE_PARAGRAPH = ATK_ROLE_PARAGRAPH, 00272 00273 ROLE_RULER = ATK_ROLE_RULER, 00276 00277 ROLE_APPLICATION = ATK_ROLE_APPLICATION, 00279 00280 ROLE_AUTOCOMPLETE = ATK_ROLE_AUTOCOMPLETE, 00283 00284 ROLE_EDITBAR = ATK_ROLE_EDITBAR, 00286 00287 ROLE_LAST_DEFINED = ATK_ROLE_LAST_DEFINED 00289 }; 00290 00293 00294 Role role_register(const String& name); 00298 00299 String role_get_name(Role role); 00303 00304 String role_get_localized_name(Role role); 00308 00309 Role role_for_name(const String& name); 00313 00315 00331 00332 class Object : public G::Object 00333 { 00334 friend class G::Object; 00335 00336 Object(const Object&); 00337 Object& operator=(const Object&); 00338 00339 protected: 00342 00343 explicit Object(AtkObject *object, bool owns_reference = true); 00350 00354 00355 typedef G::Signal<void, unsigned int, void*> ChildrenChangedSignalType; 00356 typedef G::SignalProxy<TypeInstance, ChildrenChangedSignalType> ChildrenChangedSignalProxy; 00357 static const ChildrenChangedSignalType children_changed_signal; 00364 00365 typedef G::Signal<void, bool> FocusEventSignalType; 00366 typedef G::SignalProxy<TypeInstance, FocusEventSignalType> FocusEventSignalProxy; 00367 static const FocusEventSignalType focus_event_signal; 00373 00374 typedef G::Signal<void, AtkPropertyValues*> PropertyChangeSignalType; 00375 typedef G::SignalProxy<TypeInstance, PropertyChangeSignalType> PropertyChangeSignalProxy; 00376 static const PropertyChangeSignalType property_change_signal; 00382 00383 typedef G::Signal<void, const String&, bool> StateChangeSignalType; 00384 typedef G::SignalProxy<TypeInstance, StateChangeSignalType> StateChangeSignalProxy; 00385 static const StateChangeSignalType state_change_signal; 00392 00393 typedef G::Signal<void> VisibleDataChangedSignalType; 00394 typedef G::SignalProxy<TypeInstance, VisibleDataChangedSignalType> VisibleDataChangedSignalProxy; 00395 static const VisibleDataChangedSignalType visible_data_changed_signal; 00400 00401 typedef G::Signal<void, void**> ActiveDescendantChangedSignalType; 00402 typedef G::SignalProxy<TypeInstance, ActiveDescendantChangedSignalType> ActiveDescendantChangedSignalProxy; 00403 static const ActiveDescendantChangedSignalType active_descendant_changed_signal; 00409 00411 00412 public: 00415 00416 virtual ~Object(); 00418 00422 00423 AtkObject* atk_object() const; 00425 00426 operator AtkObject* () const; 00428 00429 String get_name() const; 00432 00433 String get_description() const; 00436 00437 Object* get_parent() const; 00440 00441 int get_n_accessible_children() const; 00444 00445 Object* ref_accessible_child(int index) const; 00452 00453 RelationSet* ref_relation_set() const; 00456 00457 Role get_role() const; 00460 00461 Pointer<StateSet> ref_state_set() const; 00464 00465 int get_index_in_parent() const; 00469 00473 00474 void set_name(const char *name); 00475 void set_name(const String& name); 00478 00479 void set_description(const char *description); 00480 void set_description(const String& description); 00483 00484 void set_parent(Object& parent); 00487 00488 void set_role(Role role); 00491 00492 void notify_state_change(State state, bool value); 00496 00497 bool add_relationship(RelationType relationship, const Object& target); 00502 00503 bool remove_relationship(RelationType relationship, const Object& target); 00508 00512 00513 const ChildrenChangedSignalProxy sig_children_changed(); 00515 00516 const FocusEventSignalProxy sig_focus_event(); 00518 00519 const PropertyChangeSignalProxy sig_property_change(); 00521 00522 const StateChangeSignalProxy sig_state_change(); 00524 00525 const VisibleDataChangedSignalProxy sig_visible_data_changed(); 00528 00529 const ActiveDescendantChangedSignalProxy sig_active_descendant_changed(); 00534 00536 }; 00537 00538 } // namespace Atk 00539 00540 } // namespace GFC 00541 00542 #include <gfc/atk/inline/object.inl> 00543 00544 #endif // GFC_ATK_OBJECT_HH 00545

Generated on Tue Aug 24 00:34:31 2004 for GFC-UI by doxygen 1.3.8