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 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.
void elm_colorselector::color_get |
( |
int * |
r_, |
|
|
int * |
g_, |
|
|
int * |
b_, |
|
|
int * |
a_ |
|
) |
| const |
|
inline |
Get current color from colorselector.
- Parameters
-
r | r-value of color |
g | g-value of color |
b | b-value of color |
a | a-value of color |
void elm_colorselector::color_set |
( |
int |
r_, |
|
|
int |
g_, |
|
|
int |
b_, |
|
|
int |
a_ |
|
) |
| const |
|
inline |
Get current color from colorselector.
- Parameters
-
r | r-value of color |
g | g-value of color |
b | b-value of color |
a | a-value of color |
Evas_Object* elm_colorselector_add |
( |
Evas_Object * |
parent | ) |
|
Add a new colorselector to the parent.
- Parameters
-
- Returns
- The new object or NULL if it cannot be created
Elm_Colorselector_Mode elm_colorselector::mode_get |
( |
| ) |
const |
|
inline |
Get Colorselector's mode.
- Returns
- mode The current mode of colorselector
- Parameters
-
mode | Elm_Colorselector_Mode |
void elm_colorselector::mode_set |
( |
Elm_Colorselector_Mode |
mode_ | ) |
const |
|
inline |
Get Colorselector's mode.
- Returns
- mode The current mode of colorselector
- Parameters
-
mode | Elm_Colorselector_Mode |
Elm_Object_Item* elm_colorselector::palette_color_add |
( |
int |
r_, |
|
|
int |
g_, |
|
|
int |
b_, |
|
|
int |
a_ |
|
) |
| const |
|
inline |
Add a new color item to palette.
- Returns
- A new color palette Item.
- Parameters
-
r | r-value of color |
g | g-value of color |
b | b-value of color |
a | a-value of color |
const Eina_List* elm_colorselector::palette_items_get |
( |
| ) |
const |
|
inline |
Get list of palette items.
- Returns
- The list of color palette items.
Note That palette item list is internally managed by colorselector widget and it should not be freed/modified by application.
- Since
- 1.9
std::string elm_colorselector::palette_name_get |
( |
| ) |
const |
|
inline |
Get current palette's name.
- Returns
- Name of palette
Returns the currently set palette name using which colors will be saved/loaded in to config.
- Parameters
-
palette_name | Name of palette |
void elm_colorselector::palette_name_set |
( |
std::string |
palette_name_ | ) |
const |
|
inline |
Get current palette's name.
- Returns
- Name of palette
Returns the currently set palette name using which colors will be saved/loaded in to config.
- Parameters
-
palette_name | Name of palette |
Get the selected item in colorselector palette.
- Returns
- The selected item, or NULL if none is selected.
- Since
- 1.9