Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GuiSpreadsheetCellObjectSelector Class Reference
Inheritance diagram for GuiSpreadsheetCellObjectSelector:
EventObject GuiSpreadsheetCellBasic CoreCustomData GuiSpreadsheetCell CoreBaseObject CoreBaseObject CoreBaseType CoreBaseType

Public Member Functions

 GuiSpreadsheetCellObjectSelector (GuiSpreadsheetRow &row_parent)
 
virtual void init (GuiSpreadsheetRow &row_parent) override
 
virtual void draw (GuiSpreadsheetDrawContext &draw_context) override
 
virtual int get_edit_offset () override
 returns the x-offset to use to popup the cell line edit
 
virtual void refresh_data () override
 
virtual bool on_click (const bool &mouse_down) override
 
virtual bool on_double_click () override
 
virtual bool is_selectable (const bool &mouse_down) const override
 
virtual void on_jump_button ()
 
virtual void set_enable_multi_selection (const bool &value)
 
virtual const CoreVector
< const OfClass * > & 
get_class_filter () const
 
virtual void set_class_filter (const CoreBasicArray< const OfClass * > &array)
 
void set_class_filter (const CoreBasicArray< CoreString > &class_names)
 
OfItemHandle get_item () const
 
void set_item (OfItemHandle item)
 
void hide_selector ()
 
void set_none_object_text (const CoreString &text)
 
void set_unselectable_items_by_browser_picker (const CoreBasicArray< OfItem * > &unselectable_items)
 
virtual CoreString get_text () override
 
virtual CoreVariant get_variant () override
 
const CoreVector< OfItemHandle > & get_selected_items_by_browser_picker () const
 
virtual bool on_edit_content () override
 
- 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
 
- Public Member Functions inherited from GuiSpreadsheetCellBasic
 GuiSpreadsheetCellBasic (GuiSpreadsheetRow &row_parent)
 
void set_background_color (const unsigned char &r, const unsigned char &g, const unsigned char &b)
 
void get_background_color (unsigned char &r, unsigned char &g, unsigned char &b)
 
void hide_background_color ()
 
const bool & is_background_color ()
 
virtual void set_text (const CoreString &text)
 
virtual void set_has_value (const bool &value)
 
virtual bool get_has_value () const
 
void draw_highlight (GuiSpreadsheetDrawContext &draw_context, const CoreString &text, const int &offset_x, const int &offset_y, const bool clamp)
 
void refresh_highlight ()
 
- Public Member Functions inherited from GuiSpreadsheetCell
 GuiSpreadsheetCell (GuiSpreadsheetRow &row_parent)
 
virtual void remove_all_data ()
 
virtual void set_is_selectable (const bool &value)
 
virtual void set_enable (const bool &enable)
 
virtual bool is_enabled () const
 
void start_edit_content (const bool &change_preselection_row=true)
 
void stop_edit_content ()
 
virtual void on_edit_changed (const int &column, const int &row)
 
virtual void on_cursor_enter (const int &column, const int &row)
 
virtual void on_cursor_leave (const int &column, const int &row)
 
virtual GuiWidgetget_edit_field ()
 
const bool & get_is_locked () const
 
void set_is_locked (const bool &locked)
 
const bool & get_is_read_only () const
 
void set_is_read_only (const bool &is_read_only)
 
GuiSpreadsheetRowget_row () const
 
GuiSpreadsheetget_spreadsheet () const
 
virtual CoreString get_pastable_text ()
 
virtual int compare (GuiSpreadsheetCell *other_cell)
 
virtual void on_value_changing ()
 
virtual void on_value_changed ()
 

Protected Member Functions

bool has_valid_item () const
 
GuiImageget_jump_to_image (bool selected, unsigned char c[3])
 
CoreString get_none_object_text () const
 
void assign_with_browser_picker ()
 
void on_object_destroy (EventObject &sender, const EventObject::EventInfo &event, void *data)
 
void on_context_destroy (EventObject &sender, const EventObject::EventInfo &event, void *data)
 
- Protected Member Functions inherited from GuiSpreadsheetCellBasic
void convert_highlight_position_in_pixel (GuiSpreadsheetDrawContext &draw_context, const CoreString &_text, const CoreVector< CoreString > &keyword_list, const int &offset_x, const bool clamp)
 
void compute_highlight (const CoreString &text, const CoreVector< CoreString > &keyword_list, const bool &case_sensitive)
 

Protected Attributes

CoreVector< const OfClass * > m_class_filter
 
OfItemHandle m_item
 
CoreVector< OfItemHandlem_selected_objects_by_browser_picker
 
CoreVector< OfItem * > m_unselectable_items_by_browser_picker
 
CoreString m_null_label
 
int m_jump_rect [4]
 
int m_selector_rect [4]
 
bool m_is_selected_row
 
int m_menu_position [2]
 
bool m_enable_multi_selection
 
bool m_selector_hidden
 
bool m_call_refresh
 
- Protected Attributes inherited from GuiSpreadsheetCellBasic
bool m_show_background_color
 
unsigned char m_background_color [3]
 
bool m_highlight_info_done
 
CoreVector< HighlightInfos > * m_highlight_info
 
- Protected Attributes inherited from GuiSpreadsheetCell
GuiSpreadsheetRowm_row_parent
 
bool m_enable
 
bool m_is_locked
 
bool m_is_selectable
 
bool m_is_read_only
 

Additional Inherited Members

- 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 *)
 
- 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 CoreBaseObject
static const CoreClassInfoclass_info ()
 
template<class T >
static T * cast (CoreBaseObject *object)
 
template<class T >
static const T * cast (const CoreBaseObject *object)
 

Member Function Documentation

void GuiSpreadsheetCellObjectSelector::on_context_destroy ( EventObject sender,
const EventObject::EventInfo event,
void *  data 
)
protected

If the context being destroyed is the context referenced by this cell, m_item must be reset to not reference a dead context

bool GuiSpreadsheetCellObjectSelector::on_edit_content ( void  )
overridevirtual

This is meant to be overridden by child classes. It's called whenever the user requests the edition of a cell.

Returns
true if the child class handle the edition, false otherwise. In this case, a simple and generic GuiLineEdit is used to edit the cell's content as text.

Reimplemented from GuiSpreadsheetCell.

void GuiSpreadsheetCellObjectSelector::on_object_destroy ( EventObject sender,
const EventObject::EventInfo event,
void *  data 
)
protected

If the object being destroyed is the object referenced by this cell, m_item must be reset to not reference a dead object

void GuiSpreadsheetCellObjectSelector::set_class_filter ( const CoreBasicArray< CoreString > &  class_names)

Helper that will get the classes by name and call set_class_filter(const CoreBasicArray<const OfClass*>&) Any unknown class name in class_names is just ignored.