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

stateset.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_STATE_SET_HH 00025 #define GFC_ATK_STATE_SET_HH 00026 00027 #ifndef GFC_G_OBJECT_HH 00028 #include <gfc/glib/object.hh> 00029 #endif 00030 00031 #ifndef __ATK_STATE_SET_H__ 00032 #include <atk/atkstateset.h> 00033 #endif 00034 00035 #ifndef _CPP_VECTOR 00036 #include <vector> 00037 #endif 00038 00039 namespace GFC { 00040 00041 namespace Atk { 00042 00043 // @enum Atk::StateType 00045 00046 enum StateType 00047 { 00048 STATE_INVALID = ATK_STATE_INVALID, 00050 00051 STATE_ACTIVE = ATK_STATE_ACTIVE, 00053 00054 STATE_ARMED = ATK_STATE_ARMED, 00056 00057 STATE_BUSY = ATK_STATE_BUSY, 00059 00060 STATE_CHECKED = ATK_STATE_CHECKED, 00062 00063 STATE_DEFUNCT = ATK_STATE_DEFUNCT, 00065 00066 STATE_EDITABLE = ATK_STATE_EDITABLE, 00068 00069 STATE_ENABLED = ATK_STATE_ENABLED, 00071 00072 STATE_EXPANDABLE = ATK_STATE_EXPANDABLE, 00074 00075 STATE_EXPANDED = ATK_STATE_EXPANDED, 00077 00078 STATE_FOCUSABLE = ATK_STATE_FOCUSABLE, 00081 00082 STATE_FOCUSED = ATK_STATE_FOCUSED, 00084 00085 STATE_HORIZONTAL = ATK_STATE_HORIZONTAL, 00087 00088 STATE_ICONIFIED = ATK_STATE_ICONIFIED, 00090 00091 STATE_MODAL = ATK_STATE_MODAL, 00094 00095 STATE_MULTI_LINE = ATK_STATE_MULTI_LINE, 00097 00098 STATE_MULTISELECTABLE = ATK_STATE_MULTISELECTABLE, 00100 00101 STATE_OPAQUE = ATK_STATE_OPAQUE, 00103 00104 STATE_PRESSED = ATK_STATE_PRESSED, 00106 00107 STATE_RESIZABLE = ATK_STATE_RESIZABLE, 00109 00110 STATE_SELECTABLE = ATK_STATE_SELECTABLE, 00113 00114 STATE_SELECTED = ATK_STATE_SELECTED, 00117 00118 STATE_SENSITIVE = ATK_STATE_SENSITIVE, 00120 00121 STATE_SHOWING = ATK_STATE_SHOWING, 00123 00124 STATE_SINGLE_LINE = ATK_STATE_SINGLE_LINE, 00126 00127 STATE_STALE = ATK_STATE_STALE, 00129 00130 STATE_TRANSIENT = ATK_STATE_TRANSIENT, 00132 00133 STATE_VERTICAL = ATK_STATE_VERTICAL, 00135 00136 STATE_VISIBLE = ATK_STATE_VISIBLE, 00138 00139 STATE_MANAGES_DESCENDANTS = ATK_STATE_MANAGES_DESCENDANTS, 00143 00144 STATE_INDETERMINATE = ATK_STATE_INDETERMINATE, 00146 00147 STATE_LAST_DEFINED = ATK_STATE_LAST_DEFINED 00149 }; 00150 00153 00154 StateType state_type_register(const String& name); 00158 00159 String state_type_get_name(StateType type); 00163 00164 StateType state_type_for_name(const String& name); 00168 00170 00175 00176 class StateSet : public G::Object 00177 { 00178 friend class G::Object; 00179 00180 StateSet(const StateSet&); 00181 StateSet& operator=(const StateSet&); 00182 00183 protected: 00186 00187 explicit StateSet(AtkStateSet *set, bool owns_reference = true); 00194 00196 00197 public: 00200 00201 StateSet(); 00203 00204 virtual ~StateSet(); 00206 00210 00211 AtkStateSet* atk_state_set() const; 00213 00214 operator AtkStateSet* () const; 00216 00217 bool is_empty() const; 00220 00221 bool contains_state(StateType type) const; 00225 00226 bool contains_states(const std::vector<StateType>& types) const; 00230 00234 00235 bool add_state(StateType type); 00239 00240 void add_states(const std::vector<StateType>& types); 00243 00244 void clear_states(); 00246 00247 bool remove_state(StateType type); 00251 00252 Pointer<StateSet> and_sets(StateSet& compare_set); 00256 00257 Pointer<StateSet> or_sets(StateSet& compare_set); 00261 00262 Pointer<StateSet> xor_sets(StateSet& compare_set); 00269 00271 }; 00272 00273 } // namespace Atk 00274 00275 } // namespace GFC 00276 00277 #include <gfc/atk/inline/stateset.inl> 00278 00279 #endif // GFC_ATK_STATE_SET_HH 00280 00281

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