Tizen Native API  4.0

colorselector_inheritance_tree.png

A ColorSelector is a color selection widget. It allows application to set a series of colors.It also allows to load/save colors from/to config with a unique identifier, by default, the colors are loaded/saved from/to config using "default" identifier. The colors can be picked by user from the color set by clicking on individual color item on the palette or by selecting it from selector.

This widget inherits from the Layout one, so that all the functions acting on it also work for check objects.

This widget emits the following signals, besides the ones sent from Elm_Layout:

  • "changed" - When the color value changes on selector event_info is NULL.
  • "color,item,selected" - When user clicks on color item. The event_info parameter of the callback will be the selected color item.
  • "color,item,longpressed" - When user long presses on color item. The event info parameter of the callback contains selected color item.
  • "focused" - When the colorselector has received focus. (since 1.8)
  • "unfocused" - When the colorselector has lost focus. (since 1.8)
  • "language,changed" - the program's language changed (since 1.9)

See Color selector example.

Functions

void elm_colorselector_palette_item_color_get (const Elm_Object_Item *it, int *r, int *g, int *b, int *a)
 Get Palette item's color.
void elm_colorselector_palette_item_color_set (Elm_Object_Item *it, int r, int g, int b, int a)
 Set palette item's color.
Eina_Bool elm_colorselector_palette_item_selected_get (const Elm_Object_Item *it)
 Get the selected state of color palette item.
void elm_colorselector_palette_item_selected_set (Elm_Object_Item *it, Eina_Bool selected)
 Set the selected state of color palette item.

Enumeration Type Documentation

Enumerator:
ELM_COLORSELECTOR_PALETTE 

Only color palette is displayed, default

ELM_COLORSELECTOR_COMPONENTS 

Only color selector is displayed

ELM_COLORSELECTOR_BOTH 

Both Palette and selector is displayed

ELM_COLORSELECTOR_PICKER 

Only color picker is displayed

ELM_COLORSELECTOR_PLANE 
Deprecated:
This mode is not supported. If you use this, nothing will be shown
ELM_COLORSELECTOR_PALETTE_PLANE 
Deprecated:
This mode is not supported. If you use this, it will be shown same with ELM_COLORSELECTOR_PALETTE mode
ELM_COLORSELECTOR_ALL 
Deprecated:
This mode is not supported. If you use this, it will be shown same with ELM_COLORSELECTOR_PALETTE mode

Function Documentation

void elm_colorselector_palette_item_color_get ( const Elm_Object_Item it,
int *  r,
int *  g,
int *  b,
int *  a 
)

Get Palette item's color.

Since :
2.3.1
Parameters:
[in]itThe color palette item.
[out]rinteger pointer for r-value of color
[out]ginteger pointer for g-value of color
[out]binteger pointer for b-value of color
[out]ainteger pointer for a-value of color
void elm_colorselector_palette_item_color_set ( Elm_Object_Item it,
int  r,
int  g,
int  b,
int  a 
)

Set palette item's color.

Since :
2.3.1
Parameters:
[in]itThe color palette item.
[in]rr-value of color
[in]gg-value of color
[in]bb-value of color
[in]aa-value of color

Get the selected state of color palette item.

Parameters:
[in]itThe Colorpalette item
Returns:
EINA_TRUE if the item is selected, EINA_FALSE otherwise.

Set the selected state of color palette item.

Parameters:
[in]itThe Colorpalette item
[in]selectedThe selected state