2015-07-07 04:09:03 -07:00
|
|
|
enum Elm.Colorselector.Mode
|
|
|
|
{
|
2015-07-08 07:49:38 -07:00
|
|
|
[[Different modes supported by Colorselector
|
2015-07-07 04:09:03 -07:00
|
|
|
|
2015-07-08 07:49:38 -07:00
|
|
|
See also @Elm.Colorselector.mode.set, @Elm.Colorselector.mode.get.
|
2015-07-07 04:09:03 -07:00
|
|
|
]]
|
|
|
|
legacy: elm_colorselector;
|
|
|
|
palette = 0, [[Only color palette is displayed.]]
|
|
|
|
components, [[Only color selector is displayed.]]
|
|
|
|
both, [[Both Palette and selector is displayed, default.]]
|
|
|
|
picker, [[Only color picker is displayed.]]
|
|
|
|
all [[All possible color selector is displayed.]]
|
|
|
|
}
|
|
|
|
|
2017-09-25 09:01:04 -07:00
|
|
|
class Elm.Colorselector (Efl.Ui.Layout, Efl.Ui.Focus.Composition,
|
2018-01-23 22:50:58 -08:00
|
|
|
Efl.Access.Widget.Action, Efl.Ui.Clickable, Efl.Ui.Legacy)
|
2014-03-20 05:29:12 -07:00
|
|
|
{
|
2016-11-22 05:36:12 -08:00
|
|
|
[[Elementary colorselector class]]
|
2016-05-12 09:06:04 -07:00
|
|
|
legacy_prefix: elm_colorselector;
|
2014-03-20 05:29:12 -07:00
|
|
|
eo_prefix: elm_obj_colorselector;
|
2016-05-17 09:14:47 -07:00
|
|
|
event_prefix: elm_colorselector;
|
2015-05-07 09:32:53 -07:00
|
|
|
methods {
|
|
|
|
@property color {
|
2014-03-20 05:29:12 -07:00
|
|
|
set {
|
2015-07-21 07:01:46 -07:00
|
|
|
[[Set color to colorselector.]]
|
2014-03-20 05:29:12 -07:00
|
|
|
|
|
|
|
}
|
|
|
|
get {
|
2015-07-21 07:01:46 -07:00
|
|
|
[[Get current color from colorselector.]]
|
2014-03-20 05:29:12 -07:00
|
|
|
}
|
|
|
|
values {
|
2016-11-22 05:36:12 -08:00
|
|
|
r: int; [[Red value of color]]
|
|
|
|
g: int; [[Green value of color]]
|
|
|
|
b: int; [[Blue value of color]]
|
|
|
|
a: int; [[Alpha value of color]]
|
2014-03-20 05:29:12 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property palette_name {
|
2014-03-20 05:29:12 -07:00
|
|
|
set {
|
2015-07-21 07:01:46 -07:00
|
|
|
[[Set current palette's name
|
2014-03-20 05:29:12 -07:00
|
|
|
|
2015-07-21 07:01:46 -07:00
|
|
|
When colorpalette name is set, colors will be loaded from and saved to config
|
|
|
|
using the set name. If no name is set then colors will be loaded from or
|
|
|
|
saved to "default" config.
|
|
|
|
]]
|
2014-03-20 05:29:12 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-21 07:01:46 -07:00
|
|
|
[[Get current palette's name
|
2014-03-20 05:29:12 -07:00
|
|
|
|
2015-07-21 07:01:46 -07:00
|
|
|
Returns the currently set palette name using which colors will be
|
|
|
|
saved/loaded in to config.
|
|
|
|
]]
|
2014-03-20 05:29:12 -07:00
|
|
|
}
|
|
|
|
values {
|
2016-05-31 08:02:26 -07:00
|
|
|
palette_name: string; [[Name of palette]]
|
2014-03-20 05:29:12 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property mode {
|
2014-03-20 05:29:12 -07:00
|
|
|
set {
|
2015-07-21 07:01:46 -07:00
|
|
|
[[Set Colorselector's mode.
|
2014-03-20 05:29:12 -07:00
|
|
|
|
2015-07-21 07:01:46 -07:00
|
|
|
Colorselector supports three modes palette only, selector only and both.
|
|
|
|
]]
|
2014-03-20 05:29:12 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-21 07:01:46 -07:00
|
|
|
[[Get Colorselector's mode.]]
|
2014-03-20 05:29:12 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-07-21 07:01:46 -07:00
|
|
|
mode: Elm.Colorselector.Mode; [[Elm_Colorselector_Mode]]
|
2014-03-20 05:29:12 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property palette_items {
|
2014-03-20 05:29:12 -07:00
|
|
|
get {
|
2015-07-21 07:01:46 -07:00
|
|
|
[[Get list of palette items.
|
2014-03-20 05:29:12 -07:00
|
|
|
|
2015-07-21 07:01:46 -07:00
|
|
|
Note That palette item list is internally managed by colorselector widget and
|
|
|
|
it should not be freed/modified by application.
|
2014-03-20 05:29:12 -07:00
|
|
|
|
2015-07-21 07:01:46 -07:00
|
|
|
@since 1.9
|
|
|
|
]]
|
2016-11-22 05:36:12 -08:00
|
|
|
return: const(list<Elm.Widget.Item>); [[The list of color palette items.]]
|
2014-03-20 05:29:12 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property palette_selected_item {
|
2014-03-20 05:29:12 -07:00
|
|
|
get {
|
2015-07-21 07:01:46 -07:00
|
|
|
[[Get the selected item in colorselector palette.
|
2014-03-20 05:29:12 -07:00
|
|
|
|
2015-07-21 07:01:46 -07:00
|
|
|
@since 1.9]]
|
2014-03-20 05:29:12 -07:00
|
|
|
|
2016-11-22 05:36:12 -08:00
|
|
|
return: Elm.Widget.Item; [[The selected item, or $null if none selected.]]
|
2014-03-20 05:29:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
palette_color_add {
|
2015-07-21 07:01:46 -07:00
|
|
|
[[Add a new color item to palette.]]
|
2014-03-20 05:29:12 -07:00
|
|
|
|
2016-11-22 05:36:12 -08:00
|
|
|
return: Elm.Widget.Item; [[A new color palette Item.]]
|
2014-03-20 05:29:12 -07:00
|
|
|
params {
|
2016-11-22 05:36:12 -08:00
|
|
|
@in r: int; [[Red value of color]]
|
|
|
|
@in g: int; [[Green value of color]]
|
|
|
|
@in b: int; [[Blue value of color]]
|
|
|
|
@in a: int; [[Alpha value of color]]
|
2014-03-20 05:29:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
palette_clear {
|
2015-07-21 07:01:46 -07:00
|
|
|
[[Clear the palette items.]]
|
2014-03-20 05:29:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
implements {
|
2014-06-20 02:47:39 -07:00
|
|
|
class.constructor;
|
2016-08-10 07:23:04 -07:00
|
|
|
Efl.Object.constructor;
|
2018-01-07 20:55:35 -08:00
|
|
|
Efl.Ui.Widget.theme_apply;
|
|
|
|
Efl.Ui.Widget.focus_highlight_geometry { get; }
|
|
|
|
Efl.Ui.Widget.on_access_update;
|
|
|
|
Efl.Ui.Widget.widget_event;
|
2017-11-15 18:31:26 -08:00
|
|
|
Efl.Access.Widget.Action.elm_actions { get; }
|
2017-10-18 18:13:54 -07:00
|
|
|
Efl.Access.children { get; }
|
2014-03-20 05:29:12 -07:00
|
|
|
}
|
|
|
|
events {
|
2016-11-22 05:36:12 -08:00
|
|
|
color,item,selected; [[Called when color item was selected]]
|
|
|
|
color,item,longpressed; [[Called when color item got a long press]]
|
|
|
|
changed; [[Called when colorselector changed]]
|
|
|
|
changed,user; [[Called when the object changed due to user interaction]]
|
2014-03-20 05:29:12 -07:00
|
|
|
}
|
|
|
|
}
|