Main Page - Header
Author: The Inti Development Team

Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# stateset.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002-2003 The Inti 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 INTI_ATK_STATE_SET_H
    00025 #define INTI_ATK_STATE_SET_H
    00026
    00027 #ifndef INTI_G_OBJECT_H
    00028 #include <inti/glib/object.h>
    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 Inti {
    00040
    00041 namespace Atk {
    00042
    00043 class StateSetClass;
    00044
    00045 // @enum Atk::StateType
    00047
    00048 enum StateType
    00049 {
    00050         STATE_INVALID = ATK_STATE_INVALID,
    00052
    00053         STATE_ACTIVE = ATK_STATE_ACTIVE,
    00055
    00056         STATE_ARMED = ATK_STATE_ARMED,
    00058
    00059         STATE_BUSY = ATK_STATE_BUSY,
    00061
    00062         STATE_CHECKED = ATK_STATE_CHECKED,
    00064
    00065         STATE_DEFUNCT = ATK_STATE_DEFUNCT,
    00067
    00068         STATE_EDITABLE = ATK_STATE_EDITABLE,
    00070
    00071         STATE_ENABLED = ATK_STATE_ENABLED,
    00073
    00074         STATE_EXPANDABLE = ATK_STATE_EXPANDABLE,
    00076
    00077         STATE_EXPANDED = ATK_STATE_EXPANDED,
    00079
    00080         STATE_FOCUSABLE = ATK_STATE_FOCUSABLE,
    00083
    00084         STATE_FOCUSED = ATK_STATE_FOCUSED,
    00086
    00087         STATE_HORIZONTAL = ATK_STATE_HORIZONTAL,
    00089
    00090         STATE_ICONIFIED = ATK_STATE_ICONIFIED,
    00092
    00093         STATE_MODAL = ATK_STATE_MODAL,
    00096
    00097         STATE_MULTI_LINE = ATK_STATE_MULTI_LINE,
    00099
    00100         STATE_MULTISELECTABLE = ATK_STATE_MULTISELECTABLE,
    00102
    00103         STATE_OPAQUE = ATK_STATE_OPAQUE,
    00105
    00106         STATE_PRESSED = ATK_STATE_PRESSED,
    00108
    00109         STATE_RESIZABLE = ATK_STATE_RESIZABLE,
    00111
    00112         STATE_SELECTABLE = ATK_STATE_SELECTABLE,
    00115
    00116         STATE_SELECTED = ATK_STATE_SELECTED,
    00119
    00120         STATE_SENSITIVE = ATK_STATE_SENSITIVE,
    00122
    00123         STATE_SHOWING = ATK_STATE_SHOWING,
    00125
    00126         STATE_SINGLE_LINE = ATK_STATE_SINGLE_LINE,
    00128
    00129         STATE_STALE = ATK_STATE_STALE,
    00131
    00132         STATE_TRANSIENT = ATK_STATE_TRANSIENT,
    00134
    00135         STATE_VERTICAL = ATK_STATE_VERTICAL,
    00137
    00138         STATE_VISIBLE = ATK_STATE_VISIBLE,
    00140
    00141         STATE_MANAGES_DESCENDANTS = ATK_STATE_MANAGES_DESCENDANTS,
    00145
    00146         STATE_LAST_DEFINED = ATK_STATE_LAST_DEFINED
    00148 };
    00149
    00152
    00153 StateType state_type_register(const String& name);
    00157
    00158 String state_type_get_name(StateType type);
    00162
    00163 StateType state_type_for_name(const String& name);
    00167
    00169
    00174
    00175 class StateSet : public G::Object
    00176 {
    00177         friend class G::Object;
    00178         friend class StateSetClass;
    00179
    00180         StateSet(const StateSet&);
    00181         StateSet& operator=(const StateSet&);
    00182
    00183 protected:
    00186
    00187         explicit StateSet(AtkStateSet *set, bool reference = true);
    00194
    00196
    00197 public:
    00200
    00201         StateSet();
    00203
    00204         virtual ~StateSet();
    00206
    00210
    00211         AtkStateSet* atk_state_set() const { return (AtkStateSet*)instance; }
    00213
    00214         AtkStateSetClass* atk_state_set_class() const;
    00216
    00217         operator AtkStateSet* () const;
    00219
    00220         bool is_empty() const;
    00223
    00224         bool contains_state(StateType type) const;
    00228
    00229         bool contains_states(const std::vector<StateType>& types) const;
    00233
    00237
    00238         bool add_state(StateType type);
    00242
    00243         void add_states(const std::vector<StateType>& types);
    00246
    00247         void clear_states();
    00249
    00250         bool remove_state(StateType type);
    00254
    00255         Pointer<StateSet> and_sets(StateSet& compare_set);
    00259
    00260         Pointer<StateSet> or_sets(StateSet& compare_set);
    00264
    00265         Pointer<StateSet> xor_sets(StateSet& compare_set);
    00272
    00274 };
    00275
    00276 } // namespace Atk
    00277
    00278 } // namespace Inti
    00279
    00280 #endif // INTI_ATK_STATE_SET_H
    00281
    00282

Main Page - Footer