2016-05-24 04:40:18 -07:00
|
|
|
class Elm.Mapbuf (Elm.Widget, Efl.Container, Efl.Part)
|
2014-03-24 23:15:53 -07:00
|
|
|
{
|
2016-05-12 09:06:04 -07:00
|
|
|
legacy_prefix: elm_mapbuf;
|
2016-05-17 05:16:27 -07:00
|
|
|
eo_prefix: elm_private_mapbuf;
|
2015-05-07 09:32:53 -07:00
|
|
|
methods {
|
|
|
|
@property auto {
|
2014-03-24 23:15:53 -07:00
|
|
|
set {
|
2015-08-05 04:01:44 -07:00
|
|
|
[[Set or unset auto flag for map rendering.
|
|
|
|
|
|
|
|
When a ampbuf object has "auto mode" enabled, then it will
|
|
|
|
enable and disable map mode based on current visibility.
|
|
|
|
Mapbuf will track if you show or hide it AND if the object
|
|
|
|
is inside the canvas viewport or not when it is moved or
|
|
|
|
resized. Note that if you turn automode off, then map mode
|
|
|
|
will be in a disabled state at this point. When you turn it
|
|
|
|
on for the first time, the current state will be evaluated
|
|
|
|
base on current properties of the mapbuf object.
|
|
|
|
|
|
|
|
Auto mode is disabled by default.
|
|
|
|
]]
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-08-05 04:01:44 -07:00
|
|
|
[[Get a value whether auto mode is enabled or not.]]
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-08-05 04:01:44 -07:00
|
|
|
on: bool; [[The auto mode state.]]
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property smooth {
|
2014-03-24 23:15:53 -07:00
|
|
|
set {
|
2015-08-05 04:01:44 -07:00
|
|
|
[[Enable or disable smooth map rendering.
|
2014-03-24 23:15:53 -07:00
|
|
|
|
2015-08-05 04:01:44 -07:00
|
|
|
This sets smoothing for map rendering. If the object is a
|
|
|
|
type that has its own smoothing settings, then both the
|
|
|
|
smooth settings for this object and the map must be turned off.
|
2014-03-24 23:15:53 -07:00
|
|
|
|
2015-08-05 04:01:44 -07:00
|
|
|
By default smooth maps are enabled.
|
|
|
|
]]
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-08-05 04:01:44 -07:00
|
|
|
[[Get a value whether smooth map rendering is enabled or not.]]
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-08-05 04:01:44 -07:00
|
|
|
smooth: bool; [[The smooth mode state.]]
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property alpha {
|
2014-03-24 23:15:53 -07:00
|
|
|
set {
|
2015-08-05 04:01:44 -07:00
|
|
|
[[Set or unset alpha flag for map rendering.
|
2014-03-24 23:15:53 -07:00
|
|
|
|
2015-08-05 04:01:44 -07:00
|
|
|
This sets alpha flag for map rendering. If the object is a
|
|
|
|
type that has its own alpha settings, then this will take
|
|
|
|
precedence. Only image objects have this currently. It stops
|
|
|
|
alpha blending of the map area, and is useful if you know the
|
|
|
|
object and/or all sub-objects is 100% solid.
|
2014-03-24 23:15:53 -07:00
|
|
|
|
2015-08-05 04:01:44 -07:00
|
|
|
Alpha is enabled by default.
|
|
|
|
]]
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-08-05 04:01:44 -07:00
|
|
|
[[Get a value whether alpha blending is enabled or not.]]
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-08-05 04:01:44 -07:00
|
|
|
alpha: bool; [[The alpha state.]]
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property enabled {
|
2014-03-24 23:15:53 -07:00
|
|
|
set {
|
2015-08-05 04:01:44 -07:00
|
|
|
[[Enable or disable the map.
|
2014-03-24 23:15:53 -07:00
|
|
|
|
2015-08-05 04:01:44 -07:00
|
|
|
This enables the map that is set or disables it. On enable,
|
|
|
|
the object geometry will be saved, and the new geometry will
|
|
|
|
change (position and size) to reflect the map geometry set.
|
2014-03-24 23:15:53 -07:00
|
|
|
|
2015-08-05 04:01:44 -07:00
|
|
|
Also, when enabled, alpha and smooth states will be used, so
|
|
|
|
if the content isn't solid, alpha should be enabled, for
|
|
|
|
example, otherwise a black rectangle will fill the content.
|
2014-03-24 23:15:53 -07:00
|
|
|
|
2015-08-05 04:01:44 -07:00
|
|
|
When disabled, the stored map will be freed and geometry prior
|
|
|
|
to enabling the map will be restored.
|
2014-03-24 23:15:53 -07:00
|
|
|
|
2015-08-05 04:01:44 -07:00
|
|
|
It's disabled by default.
|
|
|
|
]]
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-08-05 04:01:44 -07:00
|
|
|
[[Get a value whether map is enabled or not.]]
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-08-05 04:01:44 -07:00
|
|
|
enabled: bool; [[The enabled state.]]
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
point_color_set {
|
2015-08-05 04:01:44 -07:00
|
|
|
[[Set the color of a vertex in the mapbuf
|
2014-03-24 23:15:53 -07:00
|
|
|
|
2015-08-05 04:01:44 -07:00
|
|
|
This sets the color of the vertex in the mapbuf. Colors will be
|
|
|
|
linearly interpolated between vertex points through the mapbuf.
|
|
|
|
Color will multiply the "texture" pixels (like GL_MODULATE in
|
|
|
|
OpenGL). The default color of a vertex in a mapbuf is white
|
|
|
|
solid (255, 255, 255, 255) which means it will have no affect
|
|
|
|
on modifying the texture pixels.
|
2014-03-24 23:15:53 -07:00
|
|
|
|
2015-08-05 04:01:44 -07:00
|
|
|
@since 1.9
|
|
|
|
]]
|
2014-03-24 23:15:53 -07:00
|
|
|
params {
|
2015-08-05 04:01:44 -07:00
|
|
|
@in idx: int; [[Index of point to change. Must be smaller than mapbuf size.]]
|
|
|
|
@in r: int; [[Red (0 - 255)]]
|
|
|
|
@in g: int; [[Green (0 - 255)]]
|
|
|
|
@in b: int; [[Blue (0 - 255)]]
|
|
|
|
@in a: int; [[Alpha (0 - 255)]]
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
point_color_get {
|
2015-08-05 04:01:44 -07:00
|
|
|
[[Get the color set on a vertex in the mapbuf
|
2014-03-24 23:15:53 -07:00
|
|
|
|
2015-08-05 04:01:44 -07:00
|
|
|
This gets the color set by @.point_color_set on the given vertex
|
|
|
|
of the mapbuf.
|
2014-03-24 23:15:53 -07:00
|
|
|
|
2015-08-05 04:01:44 -07:00
|
|
|
@since 1.9
|
|
|
|
]]
|
2014-03-24 23:15:53 -07:00
|
|
|
params {
|
2015-08-05 04:01:44 -07:00
|
|
|
@in idx: int; [[Index of point get. Must be smaller than map size.]]
|
|
|
|
@out r: int; [[Pointer to red return.]]
|
|
|
|
@out g: int; [[Pointer to green return.]]
|
|
|
|
@out b: int; [[Pointer to blue return.]]
|
|
|
|
@out a: int; [[Pointer to alpha return.]]
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
implements {
|
2014-06-20 02:47:39 -07:00
|
|
|
class.constructor;
|
2016-08-10 07:23:04 -07:00
|
|
|
Efl.Object.constructor;
|
2016-10-10 02:59:42 -07:00
|
|
|
Efl.Gfx.visible.set;
|
2016-10-10 20:39:05 -07:00
|
|
|
Efl.Gfx.position.set;
|
evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
- intercept
- smart resize (do stuff), super, super, super
- evas object resize
The new code is more like:
- intercept
- super, super, super, evas object resize
- do stuff
But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-11 00:54:31 -07:00
|
|
|
Efl.Gfx.size.set;
|
2016-06-17 01:26:08 -07:00
|
|
|
Efl.Canvas.Group.group_add;
|
|
|
|
Efl.Canvas.Group.group_del;
|
2015-04-22 04:33:10 -07:00
|
|
|
Elm.Widget.theme_apply;
|
|
|
|
Elm.Widget.sub_object_del;
|
2016-04-19 22:55:26 -07:00
|
|
|
Efl.Container.content.get;
|
|
|
|
Efl.Container.content.set;
|
|
|
|
Efl.Container.content_unset;
|
2016-05-24 04:40:18 -07:00
|
|
|
Efl.Part.part;
|
2014-03-24 23:15:53 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|