Styles

Widgets can have different styles of look. More...

Functions

Eina_Bool elm_object_style_set (Evas_Object *obj, const char *style)
 Set the style to used by a given widget.
const char * elm_object_style_get (const Evas_Object *obj)
 Get the style used by the widget.
void elm_object_disabled_set (Evas_Object *obj, Eina_Bool disabled)
 Set the disabled state of an Elementary object.
Eina_Bool elm_object_disabled_get (const Evas_Object *obj)
 Get the disabled state of an Elementary object.
void elm_object_item_disabled_set (Elm_Object_Item *it, Eina_Bool disabled)
 Set the disabled state of an widget item.
Eina_Bool elm_object_item_disabled_get (const Elm_Object_Item *it)
 Get the disabled state of an widget item.

Detailed Description

Widgets can have different styles of look.

These generic API's set styles of widgets, if they support them (and if the theme(s) do).

This example contemplates some of these functions.


Function Documentation

Eina_Bool elm_object_disabled_get ( const Evas_Object *  obj)

Get the disabled state of an Elementary object.

Parameters:
objThe Elementary object to operate on
Returns:
EINA_TRUE, if the widget is disabled, EINA_FALSE if it's enabled (or on errors)

This gets the state of the widget, which might be enabled or disabled.

Referenced by elm_fileselector_is_save_get().

void elm_object_disabled_set ( Evas_Object *  obj,
Eina_Bool  disabled 
)

Set the disabled state of an Elementary object.

Parameters:
objThe Elementary object to operate on
disabledThe state to put in in: EINA_TRUE for disabled, EINA_FALSE for enabled

Elementary objects can be disabled, in which state they won't receive input and, in general, will be themed differently from their normal state, usually greyed out. Useful for contexts where you don't want your users to interact with some of the parts of you interface.

This sets the state for the widget, either disabling it or enabling it back.

Referenced by elm_fileselector_is_save_set().

Eina_Bool elm_object_item_disabled_get ( const Elm_Object_Item it)

Get the disabled state of an widget item.

Parameters:
itThe Elementary object item
Returns:
EINA_TRUE, if the widget item is disabled, EINA_FALSE if it's enabled (or on errors)

This gets the state of the widget, which might be enabled or disabled.

void elm_object_item_disabled_set ( Elm_Object_Item it,
Eina_Bool  disabled 
)

Set the disabled state of an widget item.

Parameters:
itThe Elementary object item
disabledThe state to put in in: EINA_TRUE for disabled, EINA_FALSE for enabled

Elementary object item can be disabled, in which state they won't receive input and, in general, will be themed differently from their normal state, usually greyed out. Useful for contexts where you don't want your users to interact with some of the parts of you interface.

This sets the state for the widget item, either disabling it or enabling it back.

const char* elm_object_style_get ( const Evas_Object *  obj)

Get the style used by the widget.

This gets the style being used for that widget. Note that the string pointer is only valid as long as the object is valid and the style doesn't change.

Parameters:
objThe Elementary widget to query for its style
Returns:
The style name used
See also:
elm_object_style_set()
Eina_Bool elm_object_style_set ( Evas_Object *  obj,
const char *  style 
)

Set the style to used by a given widget.

Parameters:
objThe Elementary widget to style
styleThe name of the style to use on it
Returns:
EINA_TRUE on success, EINA_FALSE otherwise

This sets the style (by name) that will define the appearance of a widget. Styles vary from widget to widget and may also be defined by other themes by means of extensions and overlays.

See also:
elm_theme_extension_add()
elm_theme_extension_del()
elm_theme_overlay_add()
elm_theme_overlay_del()

Referenced by elm_popup_add().