Macros | Typedefs | Functions
Layout

Macros

#define elm_layout_icon_set(_ly, _obj)
 Convenience macro to set the icon object in a layout that follows the Elementary naming convention for its parts.
 
#define elm_layout_icon_get(_ly)   elm_layout_content_get((_ly), "elm.swallow.icon")
 Convenience macro to get the icon object from a layout that follows the Elementary naming convention for its parts.
 
#define elm_layout_end_set(_ly, _obj)
 Convenience macro to set the end object in a layout that follows the Elementary naming convention for its parts.
 
#define elm_layout_end_get(_ly)   elm_layout_content_get((_ly), "elm.swallow.end")
 Convenience macro to get the end object in a layout that follows the Elementary naming convention for its parts.
 

Typedefs

typedef struct _Elm_Layout_Part_Alias_Description Elm_Layout_Part_Alias_Description
 A layout part aliasing (proxying) description, used to get part names aliasing independently of a widgets theme.
 

Functions

EOAPI Eina_Bool elm_obj_layout_edje_object_can_access_set (Eina_Bool can_access)
 Set accessibility to all texblock(text) parts in the layout object. More...
 
EOAPI Eina_Bool elm_obj_layout_edje_object_can_access_get (void)
 Get accessibility state of texblock(text) parts in the layout object. More...
 
EOAPI Eina_Bool elm_obj_layout_theme_set (const char *klass, const char *group, const char *style)
 Set the edje group from the elementary theme that will be used as layout. More...
 
EOAPI Evas_Object * elm_obj_layout_edje_get (void)
 Get the edje layout. More...
 
EOAPI Eina_Bool elm_obj_layout_box_remove_all (const char *part, Eina_Bool clear)
 Remove all children of the given part box. More...
 
EOAPI Eina_Bool elm_obj_layout_part_cursor_engine_only_set (const char *part_name, Eina_Bool engine_only)
 Sets if the cursor set should be searched on the theme or should use the provided by the engine, only. More...
 
EOAPI Eina_Bool elm_obj_layout_part_cursor_engine_only_get (const char *part_name)
 Get a specific cursor engine_only for an edje part. More...
 
EOAPI Evas_Object * elm_obj_layout_table_unpack (const char *part, Evas_Object *child)
 Unpack (remove) a child of the given part table. More...
 
EOAPI void elm_obj_layout_sizing_eval (void)
 Eval sizing. More...
 
EOAPI Evas_Object * elm_obj_layout_box_remove (const char *part, Evas_Object *child)
 Remove a child of the given part box. More...
 
EOAPI void elm_obj_layout_sizing_restricted_eval (Eina_Bool width, Eina_Bool height)
 Request sizing reevaluation, restricted to current width and/or height. More...
 
EOAPI Eina_Bool elm_obj_layout_part_cursor_style_set (const char *part_name, const char *style)
 Sets a specific cursor style for an edje part. More...
 
EOAPI const char * elm_obj_layout_part_cursor_style_get (const char *part_name)
 Get a specific cursor style for an edje part. More...
 
EOAPI Eina_Bool elm_obj_layout_text_set (const char *part, const char *text)
 Set the text of the given part. More...
 
EOAPI const char * elm_obj_layout_text_get (const char *part)
 Get the text set in the given part. More...
 
EOAPI void elm_obj_layout_signal_callback_add (const char *emission, const char *source, Edje_Signal_Cb func, void *data)
 Add a callback for a (Edje) signal emitted by a layout widget's underlying Edje object. More...
 
EOAPI Eina_Bool elm_obj_layout_part_cursor_set (const char *part_name, const char *cursor)
 Sets a specific cursor for an edje part. More...
 
EOAPI const char * elm_obj_layout_part_cursor_get (const char *part_name)
 Get the cursor to be shown when mouse is over an edje part. More...
 
EOAPI Eina_Bool elm_obj_layout_box_insert_before (const char *part, Evas_Object *child, const Evas_Object *reference)
 Insert child to layout box part before a reference object. More...
 
EOAPI Eina_Bool elm_obj_layout_box_insert_at (const char *part, Evas_Object *child, unsigned int pos)
 Insert child to layout box part at a given position. More...
 
EOAPI const char * elm_obj_layout_data_get (const char *key)
 Get the edje data from the given layout. More...
 
EOAPI Eina_Bool elm_obj_layout_box_append (const char *part, Evas_Object *child)
 Append child to layout box part. More...
 
EOAPI void * elm_obj_layout_signal_callback_del (const char *emission, const char *source, Edje_Signal_Cb func)
 Remove a signal-triggered callback from a given layout widget. More...
 
EOAPI Eina_Bool elm_obj_layout_box_prepend (const char *part, Evas_Object *child)
 Prepend child to layout box part. More...
 
EOAPI void elm_obj_layout_signal_emit (const char *emission, const char *source)
 Send a (Edje) signal to a given layout widget's underlying Edje object. More...
 
EOAPI Eina_Bool elm_obj_layout_table_pack (const char *part, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
 Insert child to layout table part. More...
 
EOAPI Eina_Bool elm_obj_layout_part_cursor_unset (const char *part_name)
 Unsets a cursor previously set with elm_layout_part_cursor_set(). More...
 
EOAPI Eina_Bool elm_obj_layout_table_clear (const char *part, Eina_Bool clear)
 Remove all the child objects of the given part table. More...
 
bool elm_layout::box_remove_all (std::string part_, bool clear_) const
 Remove all children of the given part box. More...
 
bool elm_layout::part_cursor_engine_only_set (std::string part_name_, bool engine_only_) const
 Sets if the cursor set should be searched on the theme or should use the provided by the engine, only. More...
 
bool elm_layout::part_cursor_engine_only_get (std::string part_name_) const
 Get a specific cursor engine_only for an edje part. More...
 
evas::object elm_layout::table_unpack (std::string part_, evas::object child_) const
 Unpack (remove) a child of the given part table. More...
 
void elm_layout::sizing_eval () const
 Eval sizing. More...
 
evas::object elm_layout::box_remove (std::string part_, evas::object child_) const
 Remove a child of the given part box. More...
 
void elm_layout::sizing_restricted_eval (bool width_, bool height_) const
 Request sizing reevaluation, restricted to current width and/or height. More...
 
bool elm_layout::part_cursor_style_set (std::string part_name_, std::string style_) const
 Sets a specific cursor style for an edje part. More...
 
std::string elm_layout::part_cursor_style_get (std::string part_name_) const
 Get a specific cursor style for an edje part. More...
 
bool elm_layout::text_set (std::string part_, std::string text_) const
 Set the text of the given part. More...
 
std::string elm_layout::text_get (std::string part_) const
 Get the text set in the given part. More...
 
void elm_layout::signal_callback_add (std::string emission_, std::string source_, Edje_Signal_Cb func_, void *data_) const
 Add a callback for a (Edje) signal emitted by a layout widget's underlying Edje object. More...
 
bool elm_layout::part_cursor_set (std::string part_name_, std::string cursor_) const
 Sets a specific cursor for an edje part. More...
 
std::string elm_layout::part_cursor_get (std::string part_name_) const
 Get the cursor to be shown when mouse is over an edje part. More...
 
bool elm_layout::box_insert_before (std::string part_, evas::object child_, const Evas_Object *reference_) const
 Insert child to layout box part before a reference object. More...
 
bool elm_layout::box_insert_at (std::string part_, evas::object child_, unsigned int pos_) const
 Insert child to layout box part at a given position. More...
 
std::string elm_layout::data_get (std::string key_) const
 Get the edje data from the given layout. More...
 
bool elm_layout::box_append (std::string part_, evas::object child_) const
 Append child to layout box part. More...
 
void * elm_layout::signal_callback_del (std::string emission_, std::string source_, Edje_Signal_Cb func_) const
 Remove a signal-triggered callback from a given layout widget. More...
 
bool elm_layout::box_prepend (std::string part_, evas::object child_) const
 Prepend child to layout box part. More...
 
void elm_layout::signal_emit (std::string emission_, std::string source_) const
 Send a (Edje) signal to a given layout widget's underlying Edje object. More...
 
bool elm_layout::table_pack (std::string part_, evas::object child_, unsigned short col_, unsigned short row_, unsigned short colspan_, unsigned short rowspan_) const
 Insert child to layout table part. More...
 
bool elm_layout::part_cursor_unset (std::string part_name_) const
 Unsets a cursor previously set with elm_layout_part_cursor_set(). More...
 
bool elm_layout::table_clear (std::string part_, bool clear_) const
 Remove all the child objects of the given part table. More...
 
bool elm_layout::edje_object_can_access_get () const
 Get accessibility state of texblock(text) parts in the layout object. More...
 
bool elm_layout::edje_object_can_access_set (bool can_access_) const
 Get accessibility state of texblock(text) parts in the layout object. More...
 
evas::object elm_layout::edje_get () const
 Get the edje layout. More...
 
Eina_Bool elm_layout_edje_object_can_access_set (Elm_Layout *obj, Eina_Bool can_access)
 Set accessibility to all texblock(text) parts in the layout object. More...
 
Eina_Bool elm_layout_edje_object_can_access_get (const Elm_Layout *obj)
 Get accessibility state of texblock(text) parts in the layout object. More...
 
Eina_Bool elm_layout_theme_set (Elm_Layout *obj, const char *klass, const char *group, const char *style)
 Set the edje group from the elementary theme that will be used as layout. More...
 
Evas_Object * elm_layout_edje_get (const Elm_Layout *obj)
 Get the edje layout. More...
 
Eina_Bool elm_layout_box_remove_all (Elm_Layout *obj, const char *part, Eina_Bool clear)
 Remove all children of the given part box. More...
 
Eina_Bool elm_layout_part_cursor_engine_only_set (Elm_Layout *obj, const char *part_name, Eina_Bool engine_only)
 Sets if the cursor set should be searched on the theme or should use the provided by the engine, only. More...
 
Eina_Bool elm_layout_part_cursor_engine_only_get (const Elm_Layout *obj, const char *part_name)
 Get a specific cursor engine_only for an edje part. More...
 
Evas_Object * elm_layout_table_unpack (Elm_Layout *obj, const char *part, Evas_Object *child)
 Unpack (remove) a child of the given part table. More...
 
void elm_layout_sizing_eval (Elm_Layout *obj)
 Eval sizing. More...
 
Evas_Object * elm_layout_box_remove (Elm_Layout *obj, const char *part, Evas_Object *child)
 Remove a child of the given part box. More...
 
void elm_layout_sizing_restricted_eval (Elm_Layout *obj, Eina_Bool width, Eina_Bool height)
 Request sizing reevaluation, restricted to current width and/or height. More...
 
Eina_Bool elm_layout_part_cursor_style_set (Elm_Layout *obj, const char *part_name, const char *style)
 Sets a specific cursor style for an edje part. More...
 
const char * elm_layout_part_cursor_style_get (const Elm_Layout *obj, const char *part_name)
 Get a specific cursor style for an edje part. More...
 
Eina_Bool elm_layout_text_set (Elm_Layout *obj, const char *part, const char *text)
 Set the text of the given part. More...
 
const char * elm_layout_text_get (const Elm_Layout *obj, const char *part)
 Get the text set in the given part. More...
 
void elm_layout_signal_callback_add (Elm_Layout *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data)
 Add a callback for a (Edje) signal emitted by a layout widget's underlying Edje object. More...
 
Eina_Bool elm_layout_part_cursor_set (Elm_Layout *obj, const char *part_name, const char *cursor)
 Sets a specific cursor for an edje part. More...
 
const char * elm_layout_part_cursor_get (const Elm_Layout *obj, const char *part_name)
 Get the cursor to be shown when mouse is over an edje part. More...
 
Eina_Bool elm_layout_box_insert_before (Elm_Layout *obj, const char *part, Evas_Object *child, const Evas_Object *reference)
 Insert child to layout box part before a reference object. More...
 
Eina_Bool elm_layout_box_insert_at (Elm_Layout *obj, const char *part, Evas_Object *child, unsigned int pos)
 Insert child to layout box part at a given position. More...
 
const char * elm_layout_data_get (const Elm_Layout *obj, const char *key)
 Get the edje data from the given layout. More...
 
Eina_Bool elm_layout_box_append (Elm_Layout *obj, const char *part, Evas_Object *child)
 Append child to layout box part. More...
 
void * elm_layout_signal_callback_del (Elm_Layout *obj, const char *emission, const char *source, Edje_Signal_Cb func)
 Remove a signal-triggered callback from a given layout widget. More...
 
Eina_Bool elm_layout_box_prepend (Elm_Layout *obj, const char *part, Evas_Object *child)
 Prepend child to layout box part. More...
 
void elm_layout_signal_emit (Elm_Layout *obj, const char *emission, const char *source)
 Send a (Edje) signal to a given layout widget's underlying Edje object. More...
 
Eina_Bool elm_layout_table_pack (Elm_Layout *obj, const char *part, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
 Insert child to layout table part. More...
 
Eina_Bool elm_layout_part_cursor_unset (Elm_Layout *obj, const char *part_name)
 Unsets a cursor previously set with elm_layout_part_cursor_set(). More...
 
Eina_Bool elm_layout_table_clear (Elm_Layout *obj, const char *part, Eina_Bool clear)
 Remove all the child objects of the given part table. More...
 
Evas_Object * elm_layout_add (Evas_Object *parent)
 Add a new layout to the parent. More...
 
Eina_List * elm_layout_content_swallow_list_get (const Evas_Object *obj)
 Get the list of swallow parts of a given container widget. More...
 
Eina_Bool elm_layout_content_set (Evas_Object *obj, const char *swallow, Evas_Object *content)
 Set the layout content. More...
 
Evas_Object * elm_layout_content_get (const Evas_Object *obj, const char *swallow)
 Get the child object in the given content part. More...
 
Evas_Object * elm_layout_content_unset (Evas_Object *obj, const char *swallow)
 Unset the layout content. More...
 
Eina_Bool elm_layout_file_set (Eo *obj, const char *file, const char *group)
 Set the file that will be used as layout. More...
 
void elm_layout_file_get (Eo *obj, const char **file, const char **group)
 Get the loaded file. More...
 

Detailed Description

layout_inheritance_tree.png
preview-00.png
layout-predefined.png

A Layout is a direct realization of The Elementary Layout Class.

This is a container widget that takes a standard Edje design file and wraps it very thinly in a widget.

An Edje design (theme) file has a very wide range of possibilities to describe the behavior of elements forming a layout. Check out the Edje documentation and the EDC reference to get more information about what can be done with Edje.

Just like List, Box, and other container widgets, any object added to the Layout will become its child, meaning that it will be deleted if the Layout is deleted, moved if the Layout is moved, and so on.

The layout widget may contain as many parts/children as described in its theme file. Some of these children can have special types, such as content holder ones (swallow spots), boxes or tables. These are parts meant to contain others. For instance, objects can be added to different table parts by specifying the respective table part names. The same is valid for swallows and boxes.

The objects added as children of a layout will behave as described in the part description where they were added. There are 3 possible types of parts where a child can be added:

Content (@c SWALLOW part)

Only one object can be added to the SWALLOW part at a time (but you still can have many SWALLOW parts and one object on each of them). Use the elm_layout_content_set()/get/unset functions to set, retrieve and unset objects as content of the SWALLOW. After being set to this part, the object's size, position, visibility, clipping and other description properties will be totally controlled by the description of the given part (inside the Edje theme file).

One can use evas_object_size_hint_* functions on the child to have some kind of control over its behavior, but the resulting behavior will still depend heavily on the SWALLOW part's description.

The Edje theme also can change the part description, based on signals or scripts running inside the theme. This change can also be animated. All of this will affect the child object set as content accordingly. The object's size will be changed if the part size is changed, it will animate moving accordingly if the part is moving, and so on.

The following picture demonstrates a layout widget with a child object added to its SWALLOW:

layout_swallow.png

Box (@c BOX part)

An Edje BOX part is very similar to the Elementary Box widget. It allows one to add objects to the box and have them distributed along its area, accordingly to the specified layout property (now by layout we mean the chosen layouting design of the Box, not the layout widget itself).

A similar effect for having a box with its position, size and other things controlled by the layout theme would be to create an Elementary Box widget and add it as content in a SWALLOW part.

The main difference to that, by using the layout box instead, is that its behavior, like layouting format, padding, align, etc., will all be controlled by the theme. This means, for example, that a signal could be sent to the layout's theme (with elm_layout_signal_emit()) and the signal be handled by changing the box's padding, or alignment, or both. Using the Elementary Box widget is not necessarily harder or easier, it just depends on the circumstances and requirements.

The layout box can be used through the elm_layout_box_* set of functions.

The following picture demonstrates a Layout widget with many child objects added to its BOX part:

layout_box.png

Table (@c TABLE part)

Just like the Box (BOX part), the layout table is very similar to the Elementary Table widget. It allows one to add objects to the table by specifying the row and column where the object should be added, and any column or row span, if necessary.

Again, we could have this design by adding a table widget to a SWALLOW part, using elm_layout_content_set(). The same difference happens here when choosing to use the layout table (a TABLE part) instead of the table in a SWALLOW part. It's just a matter of convenience.

The layout table can be used through the elm_layout_table_* set of functions.

The following picture demonstrates a layout widget with many child objects added to its TABLE part:

layout_table.png

Predefined Layouts

Another interesting thing about the layout widget is that it offers some predefined themes that come with the default Elementary theme. These themes can be set by the call elm_layout_theme_set(), and provide some basic functionality depending on the theme used.

Most of them already send some signals, some already provide a toolbar or back and next buttons.

These are the available predefined theme layouts. All of them have class = layout, group = application, and style = one of the following options:

Emitted signals

This widget emits the following signals:

Examples

Some examples of the Layout widget can be found here:

Function Documentation

bool elm_layout::box_append ( std::string  part_,
evas::object  child_ 
) const
inline

Append child to layout box part.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is appended, it will become child of the layout. Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically. One should use elm_layout_box_remove() to make this layout forget about the object.

See also
elm_layout_box_prepend()
elm_layout_box_insert_before()
elm_layout_box_insert_at()
elm_layout_box_remove()
Parameters
partthe box part to which the object will be appended.
childthe child object to append to box.

References elm_obj_layout_box_append().

bool elm_layout::box_insert_at ( std::string  part_,
evas::object  child_,
unsigned int  pos_ 
) const
inline

Insert child to layout box part at a given position.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is inserted, it will become child of the layout. Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically. One should use elm_layout_box_remove() to make this layout forget about the object.

See also
elm_layout_box_append()
elm_layout_box_prepend()
elm_layout_box_insert_before()
elm_layout_box_remove()
Parameters
partthe box part to insert.
childthe child object to insert into box.
posthe numeric position >=0 to insert the child.

References elm_obj_layout_box_insert_at().

bool elm_layout::box_insert_before ( std::string  part_,
evas::object  child_,
const Evas_Object *  reference_ 
) const
inline

Insert child to layout box part before a reference object.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is inserted, it will become child of the layout. Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically. One should use elm_layout_box_remove() to make this layout forget about the object.

See also
elm_layout_box_append()
elm_layout_box_prepend()
elm_layout_box_insert_before()
elm_layout_box_remove()
Parameters
partthe box part to insert.
childthe child object to insert into box.
referenceanother reference object to insert before in box.

References elm_obj_layout_box_insert_before().

bool elm_layout::box_prepend ( std::string  part_,
evas::object  child_ 
) const
inline

Prepend child to layout box part.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is prepended, it will become child of the layout. Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically. One should use elm_layout_box_remove() to make this layout forget about the object.

See also
elm_layout_box_append()
elm_layout_box_insert_before()
elm_layout_box_insert_at()
elm_layout_box_remove()
Parameters
partthe box part to prepend.
childthe child object to prepend to box.

References elm_obj_layout_box_prepend().

evas::object elm_layout::box_remove ( std::string  part_,
evas::object  child_ 
) const
inline

Remove a child of the given part box.

Returns
The object that was being used, or NULL if not found.

The object will be removed from the box part and its lifetime will not be handled by the layout anymore. This is equivalent to elm_layout_content_unset() for box.

See also
elm_layout_box_append()
elm_layout_box_remove_all()
Parameters
partThe box part name to remove child.
childThe object to remove from box.

References elm_obj_layout_box_remove().

bool elm_layout::box_remove_all ( std::string  part_,
bool  clear_ 
) const
inline

Remove all children of the given part box.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

The objects will be removed from the box part and their lifetime will not be handled by the layout anymore. This is equivalent to elm_layout_box_remove() for all box children.

See also
elm_layout_box_append()
elm_layout_box_remove()
Parameters
partThe box part name to remove child.
clearIf EINA_TRUE, then all objects will be deleted as well, otherwise they will just be removed and will be dangling on the canvas.

References elm_obj_layout_box_remove_all().

std::string elm_layout::data_get ( std::string  key_) const
inline

Get the edje data from the given layout.

Returns
The edje data string

This function fetches data specified inside the edje theme of this layout. This function return NULL if data is not found.

In EDC this comes from a data block within the group block that obj was loaded from. E.g.

collections {
group {
name: "a_group";
data {
item: "key1" "value1";
item: "key2" "value2";
}
}
}
Parameters
keyThe data key

References elm_obj_layout_data_get().

evas::object elm_layout::edje_get ( ) const
inline

Get the edje layout.

Returns
A Evas_Object with the edje layout settings loaded with function elm_layout_file_set

This returns the edje object. It is not expected to be used to then swallow objects via edje_object_part_swallow() for example. Use elm_layout_content_set() instead so child object handling and sizing is done properly.

Note
This function should only be used if you really need to call some low level Edje function on this edje object. All the common stuff (setting text, emitting signals, hooking callbacks to signals, etc.) can be done with proper elementary functions.
See also
elm_layout_signal_callback_add()
elm_layout_signal_emit()
elm_layout_text_set()
elm_layout_content_set()
elm_layout_box_append()
elm_layout_table_pack()
elm_layout_data_get()

References elm_obj_layout_edje_get().

bool elm_layout::edje_object_can_access_get ( ) const
inline

Get accessibility state of texblock(text) parts in the layout object.

Returns
EINA_TRUE, if all textblock(text) parts in the layout can be accessible EINA_FALSET if those cannot be accessible. If obj is not a proper layout object, EINA_FALSE is returned.
See also
elm_layout_edje_object_access_set()
Since
1.7
Parameters
can_accessmakes all textblock(text) parts in the layout obj possible to have accessibility. EINA_TRUE means textblock(text) parts can be accessible

References elm_obj_layout_edje_object_can_access_get().

bool elm_layout::edje_object_can_access_set ( bool  can_access_) const
inline

Get accessibility state of texblock(text) parts in the layout object.

Returns
EINA_TRUE, if all textblock(text) parts in the layout can be accessible EINA_FALSET if those cannot be accessible. If obj is not a proper layout object, EINA_FALSE is returned.
See also
elm_layout_edje_object_access_set()
Since
1.7
Parameters
can_accessmakes all textblock(text) parts in the layout obj possible to have accessibility. EINA_TRUE means textblock(text) parts can be accessible

References elm_obj_layout_edje_object_can_access_set().

Evas_Object* elm_layout_add ( Evas_Object *  parent)

Add a new layout to the parent.

Parameters
parentThe parent object
Returns
The new object or NULL if it cannot be created
See also
elm_layout_file_set()
elm_layout_theme_set()
Eina_Bool elm_layout_box_append ( Elm_Layout *  obj,
const char *  part,
Evas_Object *  child 
)

Append child to layout box part.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is appended, it will become child of the layout. Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically. One should use elm_layout_box_remove() to make this layout forget about the object.

See also
elm_layout_box_prepend()
elm_layout_box_insert_before()
elm_layout_box_insert_at()
elm_layout_box_remove()
Parameters
[in]partthe box part to which the object will be appended.
[in]childthe child object to append to box.

References elm_obj_layout_box_append().

Eina_Bool elm_layout_box_insert_at ( Elm_Layout *  obj,
const char *  part,
Evas_Object *  child,
unsigned int  pos 
)

Insert child to layout box part at a given position.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is inserted, it will become child of the layout. Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically. One should use elm_layout_box_remove() to make this layout forget about the object.

See also
elm_layout_box_append()
elm_layout_box_prepend()
elm_layout_box_insert_before()
elm_layout_box_remove()
Parameters
[in]partthe box part to insert.
[in]childthe child object to insert into box.
[in]posthe numeric position >=0 to insert the child.

References elm_obj_layout_box_insert_at().

Eina_Bool elm_layout_box_insert_before ( Elm_Layout *  obj,
const char *  part,
Evas_Object *  child,
const Evas_Object *  reference 
)

Insert child to layout box part before a reference object.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is inserted, it will become child of the layout. Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically. One should use elm_layout_box_remove() to make this layout forget about the object.

See also
elm_layout_box_append()
elm_layout_box_prepend()
elm_layout_box_insert_before()
elm_layout_box_remove()
Parameters
[in]partthe box part to insert.
[in]childthe child object to insert into box.
[in]referenceanother reference object to insert before in box.

References elm_obj_layout_box_insert_before().

Eina_Bool elm_layout_box_prepend ( Elm_Layout *  obj,
const char *  part,
Evas_Object *  child 
)

Prepend child to layout box part.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is prepended, it will become child of the layout. Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically. One should use elm_layout_box_remove() to make this layout forget about the object.

See also
elm_layout_box_append()
elm_layout_box_insert_before()
elm_layout_box_insert_at()
elm_layout_box_remove()
Parameters
[in]partthe box part to prepend.
[in]childthe child object to prepend to box.

References elm_obj_layout_box_prepend().

Evas_Object* elm_layout_box_remove ( Elm_Layout *  obj,
const char *  part,
Evas_Object *  child 
)

Remove a child of the given part box.

Returns
The object that was being used, or NULL if not found.

The object will be removed from the box part and its lifetime will not be handled by the layout anymore. This is equivalent to elm_layout_content_unset() for box.

See also
elm_layout_box_append()
elm_layout_box_remove_all()
Parameters
[in]partThe box part name to remove child.
[in]childThe object to remove from box.

References elm_obj_layout_box_remove().

Eina_Bool elm_layout_box_remove_all ( Elm_Layout *  obj,
const char *  part,
Eina_Bool  clear 
)

Remove all children of the given part box.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

The objects will be removed from the box part and their lifetime will not be handled by the layout anymore. This is equivalent to elm_layout_box_remove() for all box children.

See also
elm_layout_box_append()
elm_layout_box_remove()
Parameters
[in]partThe box part name to remove child.
[in]clearIf EINA_TRUE, then all objects will be deleted as well, otherwise they will just be removed and will be dangling on the canvas.

References elm_obj_layout_box_remove_all().

Evas_Object* elm_layout_content_get ( const Evas_Object *  obj,
const char *  swallow 
)

Get the child object in the given content part.

Parameters
objThe layout object
swallowThe SWALLOW part to get its content
Returns
The swallowed object or NULL if none or an error occurred
Eina_Bool elm_layout_content_set ( Evas_Object *  obj,
const char *  swallow,
Evas_Object *  content 
)

Set the layout content.

Parameters
objThe layout object
swallowThe swallow part name in the edje file
contentThe child that will be added in this layout object
Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the content object is set, a previously set one will be deleted. If you want to keep that old content object, use the elm_layout_content_unset() function.

Note
In an Edje theme, the part used as a content container is called SWALLOW. This is why the parameter name is called swallow, but it is expected to be a part name just like the second parameter of elm_layout_box_append().
See also
elm_layout_box_append()
elm_layout_content_get()
elm_layout_content_unset()
Box (BOX part)
Eina_List* elm_layout_content_swallow_list_get ( const Evas_Object *  obj)

Get the list of swallow parts of a given container widget.

Parameters
objThe layout object
Returns
list of swallow parts which should be freed by the user program with elm_list_free()
Since
1.9
Evas_Object* elm_layout_content_unset ( Evas_Object *  obj,
const char *  swallow 
)

Unset the layout content.

Parameters
objThe layout object
swallowThe swallow part name in the edje file
Returns
The content that was being used

Unparent and return the content object which was set for this part.

const char* elm_layout_data_get ( const Elm_Layout *  obj,
const char *  key 
)

Get the edje data from the given layout.

Returns
The edje data string

This function fetches data specified inside the edje theme of this layout. This function return NULL if data is not found.

In EDC this comes from a data block within the group block that obj was loaded from. E.g.

1 collections {
2 group {
3 name: "a_group";
4 data {
5 item: "key1" "value1";
6 item: "key2" "value2";
7 }
8 }
9 }
Parameters
[in]keyThe data key

References elm_obj_layout_data_get().

Evas_Object* elm_layout_edje_get ( const Elm_Layout *  obj)

Get the edje layout.

Returns
A Evas_Object with the edje layout settings loaded with function elm_layout_file_set

This returns the edje object. It is not expected to be used to then swallow objects via edje_object_part_swallow() for example. Use elm_layout_content_set() instead so child object handling and sizing is done properly.

Note
This function should only be used if you really need to call some low level Edje function on this edje object. All the common stuff (setting text, emitting signals, hooking callbacks to signals, etc.) can be done with proper elementary functions.
See also
elm_layout_signal_callback_add()
elm_layout_signal_emit()
elm_layout_text_set()
elm_layout_content_set()
elm_layout_box_append()
elm_layout_table_pack()
elm_layout_data_get()

References elm_obj_layout_edje_get().

Eina_Bool elm_layout_edje_object_can_access_get ( const Elm_Layout *  obj)

Get accessibility state of texblock(text) parts in the layout object.

Returns
EINA_TRUE, if all textblock(text) parts in the layout can be accessible EINA_FALSET if those cannot be accessible. If obj is not a proper layout object, EINA_FALSE is returned.
See also
elm_layout_edje_object_access_set()
Since
1.7

References elm_obj_layout_edje_object_can_access_get().

Eina_Bool elm_layout_edje_object_can_access_set ( Elm_Layout *  obj,
Eina_Bool  can_access 
)

Set accessibility to all texblock(text) parts in the layout object.

Returns
EINA_TRUE on success or EINA_FALSE on failure. If obj is not a proper layout object, EINA_FALSE is returned.
Since
1.7
Parameters
[in]can_accessmakes all textblock(text) parts in the layout obj possible to have accessibility. EINA_TRUE means textblock(text) parts can be accessible

References elm_obj_layout_edje_object_can_access_set().

void elm_layout_file_get ( Eo *  obj,
const char **  file,
const char **  group 
)

Get the loaded file.

Parameters
fileThe path to file (edj) used as layout
groupThe group that the layout belongs in edje file
Since
1.14
Eina_Bool elm_layout_file_set ( Eo *  obj,
const char *  file,
const char *  group 
)

Set the file that will be used as layout.

Returns
(1 = success, 0 = error)
Parameters
[in]fileThe path to file (edj) that will be used as layout
[in]groupThe group that the layout belongs in edje file
Eina_Bool elm_layout_part_cursor_engine_only_get ( const Elm_Layout *  obj,
const char *  part_name 
)

Get a specific cursor engine_only for an edje part.

Returns
whenever the cursor is just provided by engine or also from theme.
Parameters
[in]part_namea part from loaded edje group.

References elm_obj_layout_part_cursor_engine_only_get().

Eina_Bool elm_layout_part_cursor_engine_only_set ( Elm_Layout *  obj,
const char *  part_name,
Eina_Bool  engine_only 
)

Sets if the cursor set should be searched on the theme or should use the provided by the engine, only.

Note
before you set if should look on theme you should define a cursor with elm_layout_part_cursor_set(). By default it will only look for cursors provided by the engine.
Returns
EINA_TRUE on success or EINA_FALSE on failure, that may be part not exists or it did not had a cursor set.
Parameters
[in]part_namea part from loaded edje group.
[in]engine_onlyif cursors should be just provided by the engine (EINA_TRUE) or should also search on widget's theme as well (EINA_FALSE)

References elm_obj_layout_part_cursor_engine_only_set().

const char* elm_layout_part_cursor_get ( const Elm_Layout *  obj,
const char *  part_name 
)

Get the cursor to be shown when mouse is over an edje part.

Returns
the cursor name.
Parameters
[in]part_namea part from loaded edje group.

References elm_obj_layout_part_cursor_get().

Eina_Bool elm_layout_part_cursor_set ( Elm_Layout *  obj,
const char *  part_name,
const char *  cursor 
)

Sets a specific cursor for an edje part.

Returns
EINA_TRUE on success or EINA_FALSE on failure, that may be part not exists or it has "mouse_events: 0".
Parameters
[in]part_namea part from loaded edje group.
[in]cursorcursor name to use, see Elementary_Cursor.h

References elm_obj_layout_part_cursor_set().

const char* elm_layout_part_cursor_style_get ( const Elm_Layout *  obj,
const char *  part_name 
)

Get a specific cursor style for an edje part.

Returns
the theme style in use, defaults to "default". If the object does not have a cursor set, then NULL is returned.
Parameters
[in]part_namea part from loaded edje group.

References elm_obj_layout_part_cursor_style_get().

Eina_Bool elm_layout_part_cursor_style_set ( Elm_Layout *  obj,
const char *  part_name,
const char *  style 
)

Sets a specific cursor style for an edje part.

Returns
EINA_TRUE on success or EINA_FALSE on failure, that may be part not exists or it did not had a cursor set.
Parameters
[in]part_namea part from loaded edje group.
[in]stylethe theme style to use (default, transparent, ...)

References elm_obj_layout_part_cursor_style_set().

Eina_Bool elm_layout_part_cursor_unset ( Elm_Layout *  obj,
const char *  part_name 
)

Unsets a cursor previously set with elm_layout_part_cursor_set().

Returns
EINA_TRUE on success, EINA_FALSE otherwise
Parameters
[in]part_namea part from loaded edje group, that had a cursor set with elm_layout_part_cursor_set().

References elm_obj_layout_part_cursor_unset().

void elm_layout_signal_callback_add ( Elm_Layout *  obj,
const char *  emission,
const char *  source,
Edje_Signal_Cb  func,
void *  data 
)

Add a callback for a (Edje) signal emitted by a layout widget's underlying Edje object.

This function connects a callback function to a signal emitted by the underlying Edje object of obj. Globs are accepted in either the emission or source strings (see edje_object_signal_callback_add()).

Parameters
[in]emissionThe signal's name string
[in]sourceThe signal's source string
[in]funcThe callback function to be executed when the signal is emitted.
[in]dataA pointer to data to pass in to the callback function.

References elm_obj_layout_signal_callback_add().

void* elm_layout_signal_callback_del ( Elm_Layout *  obj,
const char *  emission,
const char *  source,
Edje_Signal_Cb  func 
)

Remove a signal-triggered callback from a given layout widget.

Returns
The data pointer of the signal callback (passed on elm_layout_signal_callback_add()) or NULL, on errors.

This function removes the last callback attached to a signal emitted by the undelying Edje object of obj, with parameters emission, source and func matching exactly those passed to a previous call to elm_layout_signal_callback_add(). The data pointer that was passed to this call will be returned.

Parameters
[in]emissionThe signal's name string
[in]sourceThe signal's source string
[in]funcThe callback function being executed when the signal was emitted.

References elm_obj_layout_signal_callback_del().

void elm_layout_signal_emit ( Elm_Layout *  obj,
const char *  emission,
const char *  source 
)

Send a (Edje) signal to a given layout widget's underlying Edje object.

This function sends a signal to the underlying Edje object of obj. An Edje program on that Edje object's definition can respond to a signal by specifying matching 'signal' and 'source' fields.

Parameters
[in]emissionThe signal's name string
[in]sourceThe signal's source string

References elm_obj_layout_signal_emit().

void elm_layout_sizing_eval ( Elm_Layout *  obj)

Eval sizing.

Manually forces a sizing re-evaluation. This is useful when the minimum size required by the edje theme of this layout has changed. The change on the minimum size required by the edje theme is not immediately reported to the elementary layout, so one needs to call this function in order to tell the widget (layout) that it needs to reevaluate its own size.

The minimum size of the theme is calculated based on minimum size of parts, the size of elements inside containers like box and table, etc. All of this can change due to state changes, and that's when this function should be called.

Also note that a standard signal of "size,eval" "elm" emitted from the edje object will cause this to happen too.

References elm_obj_layout_sizing_eval().

Referenced by elm_scroller_loop_set().

void elm_layout_sizing_restricted_eval ( Elm_Layout *  obj,
Eina_Bool  width,
Eina_Bool  height 
)

Request sizing reevaluation, restricted to current width and/or height.

Useful mostly when there are TEXTBLOCK parts defining the height of the object and nothing else restricting it to a minimum width. Calling this function will restrict the minimum size in the Edje calculation to whatever size it the layout has at the moment.

Since
1.8
Parameters
[in]widthRestrict minimum size to the current width
[in]heightRestrict minimum size ot the current height

References elm_obj_layout_sizing_restricted_eval().

Eina_Bool elm_layout_table_clear ( Elm_Layout *  obj,
const char *  part,
Eina_Bool  clear 
)

Remove all the child objects of the given part table.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

The objects will be removed from the table part and their lifetime will not be handled by the layout anymore. This is equivalent to elm_layout_table_unpack() for all table children.

See also
elm_layout_table_pack()
elm_layout_table_unpack()
Parameters
[in]partThe table part name to remove child.
[in]clearIf EINA_TRUE, then all objects will be deleted as well, otherwise they will just be removed and will be dangling on the canvas.

References elm_obj_layout_table_clear().

Eina_Bool elm_layout_table_pack ( Elm_Layout *  obj,
const char *  part,
Evas_Object *  child,
unsigned short  col,
unsigned short  row,
unsigned short  colspan,
unsigned short  rowspan 
)

Insert child to layout table part.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is inserted, it will become child of the table. Its lifetime will be bound to the layout, and whenever the layout dies the child will be deleted automatically. One should use elm_layout_table_unpack() to make this layout forget about the object.

If colspan or rowspan are bigger than 1, that object will occupy more space than a single cell. For instance, the following code:

1 elm_layout_table_pack(layout, "table_part", child, 0, 1, 3, 1);

Would result in an object being added like the following picture:

layout_colspan.png
See also
elm_layout_table_unpack()
elm_layout_table_clear()
Parameters
[in]partthe box part to pack child.
[in]childthe child object to pack into table.
[in]colthe column to which the child should be added. (>= 0)
[in]rowthe row to which the child should be added. (>= 0)
[in]colspanhow many columns should be used to store this object. (>= 1)
[in]rowspanhow many rows should be used to store this object. (>= 1)

References elm_obj_layout_table_pack().

Evas_Object* elm_layout_table_unpack ( Elm_Layout *  obj,
const char *  part,
Evas_Object *  child 
)

Unpack (remove) a child of the given part table.

Returns
The object that was being used, or NULL if not found.

The object will be unpacked from the table part and its lifetime will not be handled by the layout anymore. This is equivalent to elm_layout_content_unset() for table.

See also
elm_layout_table_pack()
elm_layout_table_clear()
Parameters
[in]partThe table part name to remove child.
[in]childThe object to remove from table.

References elm_obj_layout_table_unpack().

const char* elm_layout_text_get ( const Elm_Layout *  obj,
const char *  part 
)

Get the text set in the given part.

Returns
The text set in part
Parameters
[in]partThe TEXT part to retrieve the text off

References elm_obj_layout_text_get().

Eina_Bool elm_layout_text_set ( Elm_Layout *  obj,
const char *  part,
const char *  text 
)

Set the text of the given part.

Returns
EINA_TRUE on success, EINA_FALSE otherwise
Parameters
[in]partThe TEXT part where to set the text
[in]textThe text to set

References elm_obj_layout_text_set().

Eina_Bool elm_layout_theme_set ( Elm_Layout *  obj,
const char *  klass,
const char *  group,
const char *  style 
)

Set the edje group from the elementary theme that will be used as layout.

Returns
(1 = success, 0 = error)

Note that style will be the new style of obj too, as in an elm_object_style_set() call.

Parameters
[in]klassthe class of the group
[in]groupthe group
[in]stylethe style to used

References elm_obj_layout_theme_set().

EOAPI Eina_Bool elm_obj_layout_box_append ( const char *  part,
Evas_Object *  child 
)

Append child to layout box part.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is appended, it will become child of the layout. Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically. One should use elm_layout_box_remove() to make this layout forget about the object.

See also
elm_layout_box_prepend()
elm_layout_box_insert_before()
elm_layout_box_insert_at()
elm_layout_box_remove()
Parameters
[in]partthe box part to which the object will be appended.
[in]childthe child object to append to box.

Referenced by elm_layout::box_append(), and elm_layout_box_append().

EOAPI Eina_Bool elm_obj_layout_box_insert_at ( const char *  part,
Evas_Object *  child,
unsigned int  pos 
)

Insert child to layout box part at a given position.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is inserted, it will become child of the layout. Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically. One should use elm_layout_box_remove() to make this layout forget about the object.

See also
elm_layout_box_append()
elm_layout_box_prepend()
elm_layout_box_insert_before()
elm_layout_box_remove()
Parameters
[in]partthe box part to insert.
[in]childthe child object to insert into box.
[in]posthe numeric position >=0 to insert the child.

Referenced by elm_layout::box_insert_at(), and elm_layout_box_insert_at().

EOAPI Eina_Bool elm_obj_layout_box_insert_before ( const char *  part,
Evas_Object *  child,
const Evas_Object *  reference 
)

Insert child to layout box part before a reference object.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is inserted, it will become child of the layout. Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically. One should use elm_layout_box_remove() to make this layout forget about the object.

See also
elm_layout_box_append()
elm_layout_box_prepend()
elm_layout_box_insert_before()
elm_layout_box_remove()
Parameters
[in]partthe box part to insert.
[in]childthe child object to insert into box.
[in]referenceanother reference object to insert before in box.

Referenced by elm_layout::box_insert_before(), and elm_layout_box_insert_before().

EOAPI Eina_Bool elm_obj_layout_box_prepend ( const char *  part,
Evas_Object *  child 
)

Prepend child to layout box part.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is prepended, it will become child of the layout. Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically. One should use elm_layout_box_remove() to make this layout forget about the object.

See also
elm_layout_box_append()
elm_layout_box_insert_before()
elm_layout_box_insert_at()
elm_layout_box_remove()
Parameters
[in]partthe box part to prepend.
[in]childthe child object to prepend to box.

Referenced by elm_layout::box_prepend(), and elm_layout_box_prepend().

EOAPI Evas_Object* elm_obj_layout_box_remove ( const char *  part,
Evas_Object *  child 
)

Remove a child of the given part box.

Returns
The object that was being used, or NULL if not found.

The object will be removed from the box part and its lifetime will not be handled by the layout anymore. This is equivalent to elm_layout_content_unset() for box.

See also
elm_layout_box_append()
elm_layout_box_remove_all()
Parameters
[in]partThe box part name to remove child.
[in]childThe object to remove from box.

Referenced by elm_layout::box_remove(), and elm_layout_box_remove().

EOAPI Eina_Bool elm_obj_layout_box_remove_all ( const char *  part,
Eina_Bool  clear 
)

Remove all children of the given part box.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

The objects will be removed from the box part and their lifetime will not be handled by the layout anymore. This is equivalent to elm_layout_box_remove() for all box children.

See also
elm_layout_box_append()
elm_layout_box_remove()
Parameters
[in]partThe box part name to remove child.
[in]clearIf EINA_TRUE, then all objects will be deleted as well, otherwise they will just be removed and will be dangling on the canvas.

Referenced by elm_layout::box_remove_all(), and elm_layout_box_remove_all().

EOAPI const char* elm_obj_layout_data_get ( const char *  key)

Get the edje data from the given layout.

Returns
The edje data string

This function fetches data specified inside the edje theme of this layout. This function return NULL if data is not found.

In EDC this comes from a data block within the group block that obj was loaded from. E.g.

1 collections {
2 group {
3 name: "a_group";
4 data {
5 item: "key1" "value1";
6 item: "key2" "value2";
7 }
8 }
9 }
Parameters
[in]keyThe data key

Referenced by elm_layout::data_get(), and elm_layout_data_get().

EOAPI Evas_Object* elm_obj_layout_edje_get ( void  )

Get the edje layout.

Returns
A Evas_Object with the edje layout settings loaded with function elm_layout_file_set

This returns the edje object. It is not expected to be used to then swallow objects via edje_object_part_swallow() for example. Use elm_layout_content_set() instead so child object handling and sizing is done properly.

Note
This function should only be used if you really need to call some low level Edje function on this edje object. All the common stuff (setting text, emitting signals, hooking callbacks to signals, etc.) can be done with proper elementary functions.
See also
elm_layout_signal_callback_add()
elm_layout_signal_emit()
elm_layout_text_set()
elm_layout_content_set()
elm_layout_box_append()
elm_layout_table_pack()
elm_layout_data_get()

Referenced by elm_layout::edje_get(), and elm_layout_edje_get().

EOAPI Eina_Bool elm_obj_layout_edje_object_can_access_get ( void  )

Get accessibility state of texblock(text) parts in the layout object.

Returns
EINA_TRUE, if all textblock(text) parts in the layout can be accessible EINA_FALSET if those cannot be accessible. If obj is not a proper layout object, EINA_FALSE is returned.
See also
elm_layout_edje_object_access_set()
Since
1.7

Referenced by elm_layout::edje_object_can_access_get(), and elm_layout_edje_object_can_access_get().

EOAPI Eina_Bool elm_obj_layout_edje_object_can_access_set ( Eina_Bool  can_access)

Set accessibility to all texblock(text) parts in the layout object.

Returns
EINA_TRUE on success or EINA_FALSE on failure. If obj is not a proper layout object, EINA_FALSE is returned.
Since
1.7
Parameters
[in]can_accessmakes all textblock(text) parts in the layout obj possible to have accessibility. EINA_TRUE means textblock(text) parts can be accessible

Referenced by elm_layout::edje_object_can_access_set(), and elm_layout_edje_object_can_access_set().

EOAPI Eina_Bool elm_obj_layout_part_cursor_engine_only_get ( const char *  part_name)

Get a specific cursor engine_only for an edje part.

Returns
whenever the cursor is just provided by engine or also from theme.
Parameters
[in]part_namea part from loaded edje group.

Referenced by elm_layout_part_cursor_engine_only_get(), and elm_layout::part_cursor_engine_only_get().

EOAPI Eina_Bool elm_obj_layout_part_cursor_engine_only_set ( const char *  part_name,
Eina_Bool  engine_only 
)

Sets if the cursor set should be searched on the theme or should use the provided by the engine, only.

Note
before you set if should look on theme you should define a cursor with elm_layout_part_cursor_set(). By default it will only look for cursors provided by the engine.
Returns
EINA_TRUE on success or EINA_FALSE on failure, that may be part not exists or it did not had a cursor set.
Parameters
[in]part_namea part from loaded edje group.
[in]engine_onlyif cursors should be just provided by the engine (EINA_TRUE) or should also search on widget's theme as well (EINA_FALSE)

Referenced by elm_layout_part_cursor_engine_only_set(), and elm_layout::part_cursor_engine_only_set().

EOAPI const char* elm_obj_layout_part_cursor_get ( const char *  part_name)

Get the cursor to be shown when mouse is over an edje part.

Returns
the cursor name.
Parameters
[in]part_namea part from loaded edje group.

Referenced by elm_layout_part_cursor_get(), and elm_layout::part_cursor_get().

EOAPI Eina_Bool elm_obj_layout_part_cursor_set ( const char *  part_name,
const char *  cursor 
)

Sets a specific cursor for an edje part.

Returns
EINA_TRUE on success or EINA_FALSE on failure, that may be part not exists or it has "mouse_events: 0".
Parameters
[in]part_namea part from loaded edje group.
[in]cursorcursor name to use, see Elementary_Cursor.h

Referenced by elm_layout_part_cursor_set(), and elm_layout::part_cursor_set().

EOAPI const char* elm_obj_layout_part_cursor_style_get ( const char *  part_name)

Get a specific cursor style for an edje part.

Returns
the theme style in use, defaults to "default". If the object does not have a cursor set, then NULL is returned.
Parameters
[in]part_namea part from loaded edje group.

Referenced by elm_layout_part_cursor_style_get(), and elm_layout::part_cursor_style_get().

EOAPI Eina_Bool elm_obj_layout_part_cursor_style_set ( const char *  part_name,
const char *  style 
)

Sets a specific cursor style for an edje part.

Returns
EINA_TRUE on success or EINA_FALSE on failure, that may be part not exists or it did not had a cursor set.
Parameters
[in]part_namea part from loaded edje group.
[in]stylethe theme style to use (default, transparent, ...)

Referenced by elm_layout_part_cursor_style_set(), and elm_layout::part_cursor_style_set().

EOAPI Eina_Bool elm_obj_layout_part_cursor_unset ( const char *  part_name)

Unsets a cursor previously set with elm_layout_part_cursor_set().

Returns
EINA_TRUE on success, EINA_FALSE otherwise
Parameters
[in]part_namea part from loaded edje group, that had a cursor set with elm_layout_part_cursor_set().

Referenced by elm_layout_part_cursor_unset(), and elm_layout::part_cursor_unset().

EOAPI void elm_obj_layout_signal_callback_add ( const char *  emission,
const char *  source,
Edje_Signal_Cb  func,
void *  data 
)

Add a callback for a (Edje) signal emitted by a layout widget's underlying Edje object.

This function connects a callback function to a signal emitted by the underlying Edje object of obj. Globs are accepted in either the emission or source strings (see edje_object_signal_callback_add()).

Parameters
[in]emissionThe signal's name string
[in]sourceThe signal's source string
[in]funcThe callback function to be executed when the signal is emitted.
[in]dataA pointer to data to pass in to the callback function.

Referenced by elm_layout_signal_callback_add(), and elm_layout::signal_callback_add().

EOAPI void* elm_obj_layout_signal_callback_del ( const char *  emission,
const char *  source,
Edje_Signal_Cb  func 
)

Remove a signal-triggered callback from a given layout widget.

Returns
The data pointer of the signal callback (passed on elm_layout_signal_callback_add()) or NULL, on errors.

This function removes the last callback attached to a signal emitted by the undelying Edje object of obj, with parameters emission, source and func matching exactly those passed to a previous call to elm_layout_signal_callback_add(). The data pointer that was passed to this call will be returned.

Parameters
[in]emissionThe signal's name string
[in]sourceThe signal's source string
[in]funcThe callback function being executed when the signal was emitted.

Referenced by elm_layout_signal_callback_del(), and elm_layout::signal_callback_del().

EOAPI void elm_obj_layout_signal_emit ( const char *  emission,
const char *  source 
)

Send a (Edje) signal to a given layout widget's underlying Edje object.

This function sends a signal to the underlying Edje object of obj. An Edje program on that Edje object's definition can respond to a signal by specifying matching 'signal' and 'source' fields.

Parameters
[in]emissionThe signal's name string
[in]sourceThe signal's source string

Referenced by elm_layout_signal_emit(), and elm_layout::signal_emit().

EOAPI void elm_obj_layout_sizing_eval ( void  )

Eval sizing.

Manually forces a sizing re-evaluation. This is useful when the minimum size required by the edje theme of this layout has changed. The change on the minimum size required by the edje theme is not immediately reported to the elementary layout, so one needs to call this function in order to tell the widget (layout) that it needs to reevaluate its own size.

The minimum size of the theme is calculated based on minimum size of parts, the size of elements inside containers like box and table, etc. All of this can change due to state changes, and that's when this function should be called.

Also note that a standard signal of "size,eval" "elm" emitted from the edje object will cause this to happen too.

Referenced by elm_layout_sizing_eval(), and elm_layout::sizing_eval().

EOAPI void elm_obj_layout_sizing_restricted_eval ( Eina_Bool  width,
Eina_Bool  height 
)

Request sizing reevaluation, restricted to current width and/or height.

Useful mostly when there are TEXTBLOCK parts defining the height of the object and nothing else restricting it to a minimum width. Calling this function will restrict the minimum size in the Edje calculation to whatever size it the layout has at the moment.

Since
1.8
Parameters
[in]widthRestrict minimum size to the current width
[in]heightRestrict minimum size ot the current height

Referenced by elm_layout_sizing_restricted_eval(), and elm_layout::sizing_restricted_eval().

EOAPI Eina_Bool elm_obj_layout_table_clear ( const char *  part,
Eina_Bool  clear 
)

Remove all the child objects of the given part table.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

The objects will be removed from the table part and their lifetime will not be handled by the layout anymore. This is equivalent to elm_layout_table_unpack() for all table children.

See also
elm_layout_table_pack()
elm_layout_table_unpack()
Parameters
[in]partThe table part name to remove child.
[in]clearIf EINA_TRUE, then all objects will be deleted as well, otherwise they will just be removed and will be dangling on the canvas.

Referenced by elm_layout_table_clear(), and elm_layout::table_clear().

EOAPI Eina_Bool elm_obj_layout_table_pack ( const char *  part,
Evas_Object *  child,
unsigned short  col,
unsigned short  row,
unsigned short  colspan,
unsigned short  rowspan 
)

Insert child to layout table part.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is inserted, it will become child of the table. Its lifetime will be bound to the layout, and whenever the layout dies the child will be deleted automatically. One should use elm_layout_table_unpack() to make this layout forget about the object.

If colspan or rowspan are bigger than 1, that object will occupy more space than a single cell. For instance, the following code:

1 elm_layout_table_pack(layout, "table_part", child, 0, 1, 3, 1);

Would result in an object being added like the following picture:

layout_colspan.png
See also
elm_layout_table_unpack()
elm_layout_table_clear()
Parameters
[in]partthe box part to pack child.
[in]childthe child object to pack into table.
[in]colthe column to which the child should be added. (>= 0)
[in]rowthe row to which the child should be added. (>= 0)
[in]colspanhow many columns should be used to store this object. (>= 1)
[in]rowspanhow many rows should be used to store this object. (>= 1)

Referenced by elm_layout_table_pack(), and elm_layout::table_pack().

EOAPI Evas_Object* elm_obj_layout_table_unpack ( const char *  part,
Evas_Object *  child 
)

Unpack (remove) a child of the given part table.

Returns
The object that was being used, or NULL if not found.

The object will be unpacked from the table part and its lifetime will not be handled by the layout anymore. This is equivalent to elm_layout_content_unset() for table.

See also
elm_layout_table_pack()
elm_layout_table_clear()
Parameters
[in]partThe table part name to remove child.
[in]childThe object to remove from table.

Referenced by elm_layout_table_unpack(), and elm_layout::table_unpack().

EOAPI const char* elm_obj_layout_text_get ( const char *  part)

Get the text set in the given part.

Returns
The text set in part
Parameters
[in]partThe TEXT part to retrieve the text off

Referenced by elm_entry_entry_get(), elm_layout_text_get(), and elm_layout::text_get().

EOAPI Eina_Bool elm_obj_layout_text_set ( const char *  part,
const char *  text 
)

Set the text of the given part.

Returns
EINA_TRUE on success, EINA_FALSE otherwise
Parameters
[in]partThe TEXT part where to set the text
[in]textThe text to set

Referenced by elm_entry_entry_set(), elm_layout_text_set(), and elm_layout::text_set().

EOAPI Eina_Bool elm_obj_layout_theme_set ( const char *  klass,
const char *  group,
const char *  style 
)

Set the edje group from the elementary theme that will be used as layout.

Returns
(1 = success, 0 = error)

Note that style will be the new style of obj too, as in an elm_object_style_set() call.

Parameters
[in]klassthe class of the group
[in]groupthe group
[in]stylethe style to used

Referenced by elm_layout_theme_set().

bool elm_layout::part_cursor_engine_only_get ( std::string  part_name_) const
inline

Get a specific cursor engine_only for an edje part.

Returns
whenever the cursor is just provided by engine or also from theme.
Parameters
part_namea part from loaded edje group.

References elm_obj_layout_part_cursor_engine_only_get().

bool elm_layout::part_cursor_engine_only_set ( std::string  part_name_,
bool  engine_only_ 
) const
inline

Sets if the cursor set should be searched on the theme or should use the provided by the engine, only.

Note
before you set if should look on theme you should define a cursor with elm_layout_part_cursor_set(). By default it will only look for cursors provided by the engine.
Returns
EINA_TRUE on success or EINA_FALSE on failure, that may be part not exists or it did not had a cursor set.
Parameters
part_namea part from loaded edje group.
engine_onlyif cursors should be just provided by the engine (EINA_TRUE) or should also search on widget's theme as well (EINA_FALSE)

References elm_obj_layout_part_cursor_engine_only_set().

std::string elm_layout::part_cursor_get ( std::string  part_name_) const
inline

Get the cursor to be shown when mouse is over an edje part.

Returns
the cursor name.
Parameters
part_namea part from loaded edje group.

References elm_obj_layout_part_cursor_get().

bool elm_layout::part_cursor_set ( std::string  part_name_,
std::string  cursor_ 
) const
inline

Sets a specific cursor for an edje part.

Returns
EINA_TRUE on success or EINA_FALSE on failure, that may be part not exists or it has "mouse_events: 0".
Parameters
part_namea part from loaded edje group.
cursorcursor name to use, see Elementary_Cursor.h

References elm_obj_layout_part_cursor_set().

std::string elm_layout::part_cursor_style_get ( std::string  part_name_) const
inline

Get a specific cursor style for an edje part.

Returns
the theme style in use, defaults to "default". If the object does not have a cursor set, then NULL is returned.
Parameters
part_namea part from loaded edje group.

References elm_obj_layout_part_cursor_style_get().

bool elm_layout::part_cursor_style_set ( std::string  part_name_,
std::string  style_ 
) const
inline

Sets a specific cursor style for an edje part.

Returns
EINA_TRUE on success or EINA_FALSE on failure, that may be part not exists or it did not had a cursor set.
Parameters
part_namea part from loaded edje group.
stylethe theme style to use (default, transparent, ...)

References elm_obj_layout_part_cursor_style_set().

bool elm_layout::part_cursor_unset ( std::string  part_name_) const
inline

Unsets a cursor previously set with elm_layout_part_cursor_set().

Returns
EINA_TRUE on success, EINA_FALSE otherwise
Parameters
part_namea part from loaded edje group, that had a cursor set with elm_layout_part_cursor_set().

References elm_obj_layout_part_cursor_unset().

void elm_layout::signal_callback_add ( std::string  emission_,
std::string  source_,
Edje_Signal_Cb  func_,
void *  data_ 
) const
inline

Add a callback for a (Edje) signal emitted by a layout widget's underlying Edje object.

This function connects a callback function to a signal emitted by the underlying Edje object of obj. Globs are accepted in either the emission or source strings (see edje_object_signal_callback_add()).

Parameters
emissionThe signal's name string
sourceThe signal's source string
funcThe callback function to be executed when the signal is emitted.
dataA pointer to data to pass in to the callback function.

References elm_obj_layout_signal_callback_add().

void* elm_layout::signal_callback_del ( std::string  emission_,
std::string  source_,
Edje_Signal_Cb  func_ 
) const
inline

Remove a signal-triggered callback from a given layout widget.

Returns
The data pointer of the signal callback (passed on elm_layout_signal_callback_add()) or NULL, on errors.

This function removes the last callback attached to a signal emitted by the undelying Edje object of obj, with parameters emission, source and func matching exactly those passed to a previous call to elm_layout_signal_callback_add(). The data pointer that was passed to this call will be returned.

Parameters
emissionThe signal's name string
sourceThe signal's source string
funcThe callback function being executed when the signal was emitted.

References elm_obj_layout_signal_callback_del().

void elm_layout::signal_emit ( std::string  emission_,
std::string  source_ 
) const
inline

Send a (Edje) signal to a given layout widget's underlying Edje object.

This function sends a signal to the underlying Edje object of obj. An Edje program on that Edje object's definition can respond to a signal by specifying matching 'signal' and 'source' fields.

Parameters
emissionThe signal's name string
sourceThe signal's source string

References elm_obj_layout_signal_emit().

void elm_layout::sizing_eval ( ) const
inline

Eval sizing.

Manually forces a sizing re-evaluation. This is useful when the minimum size required by the edje theme of this layout has changed. The change on the minimum size required by the edje theme is not immediately reported to the elementary layout, so one needs to call this function in order to tell the widget (layout) that it needs to reevaluate its own size.

The minimum size of the theme is calculated based on minimum size of parts, the size of elements inside containers like box and table, etc. All of this can change due to state changes, and that's when this function should be called.

Also note that a standard signal of "size,eval" "elm" emitted from the edje object will cause this to happen too.

References elm_obj_layout_sizing_eval().

void elm_layout::sizing_restricted_eval ( bool  width_,
bool  height_ 
) const
inline

Request sizing reevaluation, restricted to current width and/or height.

Useful mostly when there are TEXTBLOCK parts defining the height of the object and nothing else restricting it to a minimum width. Calling this function will restrict the minimum size in the Edje calculation to whatever size it the layout has at the moment.

Since
1.8
Parameters
widthRestrict minimum size to the current width
heightRestrict minimum size ot the current height

References elm_obj_layout_sizing_restricted_eval().

bool elm_layout::table_clear ( std::string  part_,
bool  clear_ 
) const
inline

Remove all the child objects of the given part table.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

The objects will be removed from the table part and their lifetime will not be handled by the layout anymore. This is equivalent to elm_layout_table_unpack() for all table children.

See also
elm_layout_table_pack()
elm_layout_table_unpack()
Parameters
partThe table part name to remove child.
clearIf EINA_TRUE, then all objects will be deleted as well, otherwise they will just be removed and will be dangling on the canvas.

References elm_obj_layout_table_clear().

bool elm_layout::table_pack ( std::string  part_,
evas::object  child_,
unsigned short  col_,
unsigned short  row_,
unsigned short  colspan_,
unsigned short  rowspan_ 
) const
inline

Insert child to layout table part.

Returns
EINA_TRUE on success, EINA_FALSE otherwise

Once the object is inserted, it will become child of the table. Its lifetime will be bound to the layout, and whenever the layout dies the child will be deleted automatically. One should use elm_layout_table_unpack() to make this layout forget about the object.

If colspan or rowspan are bigger than 1, that object will occupy more space than a single cell. For instance, the following code:

elm_layout_table_pack(layout, "table_part", child, 0, 1, 3, 1);

Would result in an object being added like the following picture:

layout_colspan.png
See also
elm_layout_table_unpack()
elm_layout_table_clear()
Parameters
partthe box part to pack child.
childthe child object to pack into table.
colthe column to which the child should be added. (>= 0)
rowthe row to which the child should be added. (>= 0)
colspanhow many columns should be used to store this object. (>= 1)
rowspanhow many rows should be used to store this object. (>= 1)

References elm_obj_layout_table_pack().

evas::object elm_layout::table_unpack ( std::string  part_,
evas::object  child_ 
) const
inline

Unpack (remove) a child of the given part table.

Returns
The object that was being used, or NULL if not found.

The object will be unpacked from the table part and its lifetime will not be handled by the layout anymore. This is equivalent to elm_layout_content_unset() for table.

See also
elm_layout_table_pack()
elm_layout_table_clear()
Parameters
partThe table part name to remove child.
childThe object to remove from table.

References elm_obj_layout_table_unpack().

std::string elm_layout::text_get ( std::string  part_) const
inline

Get the text set in the given part.

Returns
The text set in part
Parameters
partThe TEXT part to retrieve the text off

References elm_obj_layout_text_get().

bool elm_layout::text_set ( std::string  part_,
std::string  text_ 
) const
inline

Set the text of the given part.

Returns
EINA_TRUE on success, EINA_FALSE otherwise
Parameters
partThe TEXT part where to set the text
textThe text to set

References elm_obj_layout_text_set().