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

Cell dedicated to edit a string value with a limited set of values, controlled by a GuiListButton. More...

Inheritance diagram for GuiSpreadsheetCellListButton:
GuiSpreadsheetCellBasicText GuiSpreadsheetCellBasic GuiSpreadsheetCell CoreBaseObject CoreBaseType

Public Member Functions

 GuiSpreadsheetCellListButton (GuiSpreadsheetRow &parent)
 
virtual ~GuiSpreadsheetCellListButton (void) override
 
virtual void draw (GuiSpreadsheetDrawContext &draw_context) final
 
virtual bool on_edit_content (void) final
 
virtual bool on_click (const bool &mouse_down) final
 
virtual GuiWidgetget_edit_field () final
 
void set_values (const CoreBasicArray< CoreString > &values)
 
void set_selected_value (const CoreString &value)
 
void set_hinted_values (const CoreBasicArray< CorePair< CoreString, long > > &values)
 
void set_selected_hinted_value (long value)
 
long get_selected_hinted_value () const
 Returns the long data associated with current cell value.
 
virtual CoreVariant get_variant () override
 
- Public Member Functions inherited from GuiSpreadsheetCellBasicText
 GuiSpreadsheetCellBasicText (GuiSpreadsheetRow &row_parent, CoreString text)
 
virtual bool on_double_click () override
 
void set_text_color (const unsigned char &r, const unsigned char &g, const unsigned char &b)
 
void get_text_color (unsigned char &r, unsigned char &g, unsigned char &b)
 
virtual void set_text (const CoreString &text) override
 
virtual CoreString get_text () override
 
void set_text_filter (const TextFilter &filter)
 
const TextFilterget_text_filter () const
 
bool is_text_valid (const CoreString &text)
 
void set_override_text_color (const bool &value)
 
bool is_override_text_color ()
 
virtual int get_edit_offset () override
 returns the x-offset to use to popup the cell line edit
 
void enable_clamp_text_on_left (const bool &enable)
 
void set_justify_on_right (const bool &enable)
 
virtual void set_has_value (const bool &value) override
 
virtual bool get_has_value () const override
 
virtual bool is_selectable (const bool &mouse_down) const override
 
const bool & get_is_text_editable () const
 
void set_is_text_editable (const bool &b)
 
- 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 ()
 
void draw_highlight (GuiSpreadsheetDrawContext &draw_context, const CoreString &text, const int &offset_x, const int &offset_y, const bool clamp)
 
void refresh_highlight ()
 
virtual void refresh_data () override
 
- Public Member Functions inherited from GuiSpreadsheetCell
 GuiSpreadsheetCell (GuiSpreadsheetRow &row_parent)
 
virtual void init (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)
 
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 ()
 
- Public Member Functions inherited from CoreBaseObject
bool is_kindof (const CoreBaseObject &object) const
 
virtual size_t get_memory_size () 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
 

Additional Inherited Members

- Public Types inherited from GuiSpreadsheetCellBasicText
enum  TextFilter {
  FILTER_ALL,
  FILTER_NUMERIC,
  FILTER_FLOATING
}
 Text filter. Defines which characters are allowed.
 
- 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)
 
- Protected Member Functions inherited from GuiSpreadsheetCellBasicText
void start_edit_cell_content ()
 
- Protected Attributes inherited from GuiSpreadsheetCellBasicText
TextFilter m_text_filter
 
CoreString m_text
 
bool m_has_value
 
bool m_override_text_color
 
unsigned char m_text_color [3]
 
bool m_clamp_text_on_left
 
bool m_justify_on_right
 
bool m_text_editable
 
int m_edit_btn_rect [4]
 

Detailed Description

Cell dedicated to edit a string value with a limited set of values, controlled by a GuiListButton.

Constructor & Destructor Documentation

GuiSpreadsheetCellListButton::GuiSpreadsheetCellListButton ( GuiSpreadsheetRow parent)

Constructor.

GuiSpreadsheetCellListButton::~GuiSpreadsheetCellListButton ( void  )
overridevirtual

Destructor

Member Function Documentation

void GuiSpreadsheetCellListButton::draw ( GuiSpreadsheetDrawContext draw_context)
finalvirtual

Draw.

Reimplemented from GuiSpreadsheetCellBasicText.

bool GuiSpreadsheetCellListButton::on_click ( const bool &  mouse_down)
finalvirtual

Called on mouse click: enables edit mode on single-click (instead of double-click, which is the default behavior).

Reimplemented from GuiSpreadsheetCellBasicText.

bool GuiSpreadsheetCellListButton::on_edit_content ( void  )
finalvirtual

Called when the cell enters in edit mode: shows the GuiListButton and gives focus to it.

Reimplemented from GuiSpreadsheetCell.

void GuiSpreadsheetCellListButton::set_hinted_values ( const CoreBasicArray< CorePair< CoreString, long > > &  values)

Set list button items with long data (to be used for presets). All current items are removed.

void GuiSpreadsheetCellListButton::set_selected_hinted_value ( long  value)

Sets the item specified by its data as cell value and selects it in the list button. do NOT raise an event

void GuiSpreadsheetCellListButton::set_selected_value ( const CoreString value)

Sets the specified item value as cell value and selects it in the list button.

void GuiSpreadsheetCellListButton::set_values ( const CoreBasicArray< CoreString > &  values)

Set list button items. All current items are removed.