Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
AppSelection Class Reference

Contains the Application selection and allows to manage it. Defines Slots and Groups to allow several selection channels. More...

Inheritance diagram for AppSelection:
EventObject CoreCustomData CoreBaseObject CoreBaseType

Public Types

typedef CoreHashTable
< CoreString, CoreVector
< OfHandle > > 
GroupSelectionHashTable
 
- Public Types inherited from EventObject
typedef void(* EventInfoFunction )(EventObject &, const EventInfo &, void *)
 event callback signature for free functions / static methods.
 
typedef void(EventObject::* EventInfoMethod )(EventObject &, const EventInfo &, void *)
 event callback signature for methods.
 
typedef void(* EventFunction )(EventObject &, const CoreString &, void *)
 
typedef void(EventObject::* EventMethod )(EventObject &, const CoreString &, void *)
 

Public Member Functions

 AppSelection (AppObject &app)
 
void load_settings (const ParserGroup &settings)
 Restore serialized selection.
 
void save_settings (ParserGroup &settings) const
 Serialize selection.
 
void propagate_selections ()
 
AppObjectget_application () const
 
void reset ()
 
const unsigned int & get_count () const
 
OfItemHandle get_item (const unsigned int &index) const
 
void remove_item (OfItemHandle item)
 Remove item from all groups and slots.
 
void remove_items (const CoreVector< OfItemHandle > &items)
 Remove items from all groups and slots.
 
void remove_items (const CoreBasicArray< OfContext * > &contexts, const CoreBasicArray< OfObjectHandle > &objects)
 
int get_selection_index (OfItemHandle item) const
 
bool is_selected (OfItemHandle item) const
 
const unsigned int & get_count (const CoreString &group) const
 
void add_item (const CoreString &group, OfItemHandle item, const CoreString &slot)
 
OfItemHandle get_item (const CoreString &group, const unsigned int &index) const
 
void remove_item (const CoreString &group, const CoreString &slot, const unsigned int &index)
 Remove item at the given index for given group and slot.
 
void remove_item (const CoreString &group, const CoreString &slot, OfItemHandle item)
 Remove item from given group and slot.
 
void remove_all (const CoreString &group, const CoreString &slot)
 Clear selection for given group and slot.
 
void remove_all ()
 Clear all selections.
 
void select_all (const CoreString &group=GLOBAL_SELECTION, const CoreString &slot=GLOBAL_SLOT)
 
void deselect_all (const CoreString &group=GLOBAL_SELECTION, const CoreString &slot=GLOBAL_SLOT)
 
void set_selection (const CoreString &group, const CoreString &slot, const OfHandle &selection)
 
void set_selection (const CoreString &group, const CoreString &slot, const CoreArray< OfHandle > &selection)
 
void set_selection (const CoreString &group, const CoreString &slot, const CoreVector< OfHandle > &selection)
 
void set_selection (const CoreString &group, const CoreString &slot, OfItemHandle selection)
 
void set_selection (const CoreString &group, const CoreString &slot, const CoreArray< OfItemHandle > &selection)
 
void set_selection (const CoreString &group, const CoreString &slot, const CoreVector< OfItemHandle > &selection)
 
void set_selection_stealth (const CoreString &group, const CoreString &slot, const CoreVector< OfHandle > &selection)
 Set selection without any notification.
 
void set_all_slots_selection (const CoreString &group, const CoreVector< OfHandle > &selection)
 Set the given selection for all existing slots, for the given group.
 
void set_all_slots_selection (const CoreString &group, const OfHandle &selection)
 
void set_all_slots_selection (const CoreString &group, const CoreVector< OfItemHandle > &selection)
 Set the given selection for all existing slots, for the given group.
 
void set_all_slots_selection (const CoreString &group, OfItemHandle selection)
 
bool get_is_slot_selection_empty (const CoreString &slot)
 
void clear_slot_selection (const CoreString &slot)
 
int get_selection_index (const CoreString &group, OfItemHandle item) const
 
bool is_selected (const CoreString &group, OfItemHandle item) const
 
const CoreVector< OfItemHandleget_items (const CoreString &group=GLOBAL_SELECTION) const
 
const CoreVector< OfItemHandleget_items (const CoreString &group, const CoreString &slot) const
 
void get_items (const CoreVector< CoreString > &groups, const CoreString &slot, CoreSet< OfItemHandle > &items) const
 
const CoreVector< OfHandle > & get_base_handles (const CoreString &group=GLOBAL_SELECTION) const
 
const CoreVector< OfHandle > & get_base_handles (const CoreString &group, const CoreString &slot) const
 
const OfHandleget_base_handle (const CoreString &group, const unsigned int &index) const
 
void get_objects (CoreVector< OfObjectHandle > &objects, const CoreString &slot=GLOBAL_SLOT, const CoreString &group=GLOBAL_SELECTION) const
 get selected objects, excluding contexts.
 
void get_contexts (CoreVector< OfContext * > &contexts, const CoreString &slot=GLOBAL_SLOT, const CoreString &group=GLOBAL_SELECTION) const
 get selected contexts, excluding objects.
 
void list_groups (CoreVector< CoreString > &groups) const
 
void list_slots (CoreVector< CoreString > &slots) const
 
const CoreStringget_first_slot () const
 
const CoreStringget_current_changing_group () const
 
const CoreStringget_current_changing_slot () const
 
void set_slot_working_context (const CoreString &slot, const OfContext *of_context)
 
const OfContextget_slot_working_context (const CoreString &slot) const
 
bool get_slot_exists (const CoreString &slot_name)
 
- Public Member Functions inherited from EventObject
 EventObject ()
 Constructor.
 
 EventObject (const EventObject &src)
 Copy Constructor.
 
virtual ~EventObject () override
 Destructor.
 
void connect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0)
 Connects this to an object to listen to a specific event.
 
void connect (EventObject &sender, EventInfoMethod event_cb, void *data=0)
 Connects this to an object to listen any of its events.
 
bool disconnect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0)
 
bool disconnect_all (EventObject &sender)
 Disconnects from all objects sender was listening on.
 
void disconnect_all ()
 Disconnects from all objects we were listening on.
 
void remove_all_connection ()
 Disconnects object from other objects it is listening to, and also disconnects all objects listening to it.
 
void raise_event (const CoreString &event_id) const
 sends an event
 
void raise_event (const EventInfo &event_info) const
 sends an event
 
bool is_connected (EventObject &sender, const CoreString &event_id, void *data)
 
void set_mute (const bool &mute)
 Asks for object muting. This will increase or decrease the muting counter. Unmuting may not be immediat since it will happen only when counter reaches 0.
 
bool is_mute () const
 Returns if object is muted.
 
CoreArray< EventObject * > get_senders () const
 
unsigned int get_sender_count () const
 
unsigned int get_receiver_count () const
 
virtual size_t get_memory_size () const override
 
void connect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0)
 Connects this to an object to listen to a specific event.
 
void connect (EventObject &sender, EventMethod event_cb, void *data=0)
 Connects this to an object to listen any of its events.
 
bool disconnect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0)
 Disconnects this from an object for a specific event.
 
- Public Member Functions inherited from CoreCustomData
 CoreCustomData (const CoreCustomData &src)
 
void add_custom_data (void *key, const bool &data)
 
void add_custom_data (void *key, const int &data)
 
void add_custom_data (void *key, const unsigned int &data)
 
void add_custom_data (void *key, const char *data)
 
void add_custom_data (void *key, const CoreString &data)
 
void add_custom_data (void *key, const double &data)
 
void add_custom_data (void *key, void *data)
 
void remove_custom_data (void *key)
 
void remove_all_custom_data ()
 
void set_custom_data (void *key, const bool &data)
 
void set_custom_data (void *key, const int &data)
 
void set_custom_data (void *key, const unsigned int &data)
 
void set_custom_data (void *key, const double &data)
 
void set_custom_data (void *key, const char *data)
 
void set_custom_data (void *key, const CoreString &data)
 
void set_custom_data (void *key, void *data)
 
void get_custom_data (void *key, bool &data) const
 
void get_custom_data (void *key, int &data) const
 
void get_custom_data (void *key, unsigned int &data) const
 
void get_custom_data (void *key, double &data) const
 
void get_custom_data (void *key, CoreString &data) const
 
void get_custom_data (void *key, void *&data) const
 
- Public Member Functions inherited from CoreBaseObject
bool is_kindof (const CoreBaseObject &object) const
 
CoreString get_class_info_name () const
 
const unsigned long & get_class_info_id () const
 
virtual bool is_kindof (const CoreClassInfo &cinfo) const
 
virtual const CoreClassInfoget_class_info () const
 
template<class T >
T * cast ()
 
template<class T >
const T * cast () const
 
- Public Member Functions inherited from CoreBaseType
bool is_kindof (const CoreClassInfo &cinfo) const
 

Static Public Member Functions

static const CoreStringget_global_group_label ()
 
static const CoreStringget_global_slot_label ()
 
static const CoreStringget_local_slot_label ()
 
- Static Public Member Functions inherited from EventObject
static void connect (EventObject &sender, const CoreString &event_id, EventObject &receiver, EventInfoMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, EventObject &receiver, EventInfoMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0)
 Connects to an object to listen to a specific event.
 
static void connect (EventObject &sender, EventInfoFunction event_cb, void *data=0)
 Connects to an object to listen any of its events.
 
static bool disconnect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0)
 
static void raise_event (EventObject &sender, const CoreString &event_id)
 Sends an event.
 
static void raise_event (EventObject &sender, const EventInfo &event_info)
 Sends an event.
 
static void connect (EventObject &sender, const CoreString &event_id, EventFunction event_cb, void *data=0)
 Connects to an object to listen to a specific event.
 
static void connect (EventObject &sender, EventFunction event_cb, void *data=0)
 Connects to an object to listen any of its events.
 
static void connect (EventObject &sender, const CoreString &event_id, EventObject &receiver, EventMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, EventObject &receiver, EventMethod event_cb, void *data=0)
 Static version of the above function.
 
static bool disconnect (EventObject &sender, const CoreString &event_id, EventFunction event_cb, void *data=0)
 Disconnects this from an object for a specific event.
 
- Static Public Member Functions inherited from CoreCustomData
static void * get_custom_data_key (const CoreString &key)
 
- Static Public Member Functions inherited from CoreBaseObject
static const CoreClassInfoclass_info ()
 
template<class T >
static T * cast (CoreBaseObject *object)
 
template<class T >
static const T * cast (const CoreBaseObject *object)
 
- Static Public Member Functions inherited from CoreBaseType
static const CoreClassInfoclass_info ()
 Get the type descriptor of this instance.
 

Friends

class SetCurrentContextCmd
 

Detailed Description

Contains the Application selection and allows to manage it. Defines Slots and Groups to allow several selection channels.

Member Function Documentation

void AppSelection::get_contexts ( CoreVector< OfContext * > &  contexts,
const CoreString slot = GLOBAL_SLOT,
const CoreString group = GLOBAL_SELECTION 
) const

get selected contexts, excluding objects.

Parameters
[out]contextsoutput contexts present in selection
[in]slot(optional) specified slot
[in]group(optional) specified group
void AppSelection::get_objects ( CoreVector< OfObjectHandle > &  objects,
const CoreString slot = GLOBAL_SLOT,
const CoreString group = GLOBAL_SELECTION 
) const

get selected objects, excluding contexts.

Parameters
[out]objectsoutput objects present in selection
[in]slot(optional) specified slot
[in]group(optional) specified group
void AppSelection::set_all_slots_selection ( const CoreString group,
const CoreVector< OfHandle > &  selection 
)

Set the given selection for all existing slots, for the given group.

Parameters
groupconst CoreString selection group
selectionconst CoreVector<OfItem*>& selected items
void AppSelection::set_all_slots_selection ( const CoreString group,
const CoreVector< OfItemHandle > &  selection 
)

Set the given selection for all existing slots, for the given group.

Parameters
groupconst CoreString selection group
selectionconst CoreVector<OfItem*>& selected items