Etk
Main Page Object Hierarchy Data Structures Related Pages
Etk

Etk_Widget


Detailed Description

Etk_Widget is the base class for all the widgets of Etk.

Object Hierarchy:
  • Etk_Object
    • Etk_Widget
Signals:
  • "shown": Emitted when the widget is shown
    • Callback: Etk_Bool callback(Etk_Widget *widget, void *data)
      • widget: the widget that has been shown
      • data: the user data set when the callback has been connected to the signal
  • "hidden": Emitted when the widget is hidden
    • Callback: Etk_Bool callback(Etk_Widget *widget, void *data)
      • widget: the widget that has been hidden
      • data: the user data set when the callback has been connected to the signal
  • "realized": Emitted when the widget is realized (i.e. when the graphical resources of the widget are allocated - when the widget is attached to an Evas, or when its theme is changed)
    • Callback: Etk_Bool callback(Etk_Widget *widget, void *data)
      • widget: the widget that has been realized
      • data: the user data set when the callback has been connected to the signal
  • "unrealized": Emitted when the widget is unrealized (i.e. when its graphical resources are deallocated)
    • Callback: Etk_Bool callback(Etk_Widget *widget, void *data)
      • widget: the widget that has been unrealized
      • data: the user data set when the callback has been connected to the signal
  • "size-requested": Emitted each time the function etk_widget_size_request() is called on a widget
    • Callback: Etk_Bool callback(Etk_Widget *widget, Etk_Size *size, void *data)
      • widget: the widget whose size has been requested
      • size: The result of the call to etk_widget_size_request()
      • data: the user data set when the callback has been connected to the signal
  • "mouse-in": Emitted when the mouse enters the widget
    • Callback: Etk_Bool callback(Etk_Widget *widget, Etk_Event_Mouse_In *event, void *data)
      • widget: the widget that the mouse has entered
      • event: The event data
      • data: the user data set when the callback has been connected to the signal
  • "mouse-out": Emitted when the mouse leaves the widget
    • Callback: Etk_Bool callback(Etk_Widget *widget, Etk_Event_Mouse_Out *event, void *data)
      • widget: the widget that the mouse has left
      • event: The event data
      • data: the user data set when the callback has been connected to the signal
  • "mouse-move": Emitted when the mouse moves over the widget
    • Callback: Etk_Bool callback(Etk_Widget *widget, Etk_Event_Mouse_Move *event, void *data)
      • widget: the widget above which the mouse is moving
      • event: The event data
      • data: the user data set when the callback has been connected to the signal
  • "mouse-down": Emitted when the user presses the widget with the mouse
    • Callback: Etk_Bool callback(Etk_Widget *widget, Etk_Event_Mouse_Down *event, void *data)
      • widget: the widget that has been pressed
      • event: The event data
      • data: the user data set when the callback has been connected to the signal
  • "mouse-up": Emitted when the user releases the widget with the mouse
    • Callback: Etk_Bool callback(Etk_Widget *widget, Etk_Event_Mouse_Up *event, void *data)
      • widget: the widget that has been released
      • event: The event data
      • data: the user data set when the callback has been connected to the signal
  • "mouse-click": Emitted when the user has clicked on the widget (i.e. the mouse button has been released and the mouse is still above the widget)
    • Callback: Etk_Bool callback(Etk_Widget *widget, Etk_Event_Mouse_Up *event, void *data)
      • widget: the widget that has been clicked
      • event: The event data
      • data: the user data set when the callback has been connected to the signal
  • "mouse-wheel": Emitted when the mouse wheel is used over the widget
    • Callback: Etk_Bool callback(Etk_Widget *widget, Etk_Event_Mouse_Wheel *event, void *data)
      • widget: the widget above which the mouse wheel has been used
      • event: The event data
      • data: the user data set when the callback has been connected to the signal
  • "key-down": Emitted on the focused widget when a key has been pressed
    • Callback: Etk_Bool callback(Etk_Widget *widget, Etk_Event_Key_Down *event, void *data)
      • widget: the focused widget
      • event: The event data
      • data: the user data set when the callback has been connected to the signal
  • "key-up": Emitted on the focused widget when a key has been released
    • Callback: Etk_Bool callback(Etk_Widget *widget, Etk_Event_Key_Up *event, void *data)
      • widget: the focused widget
      • event: The event data
      • data: the user data set when the callback has been connected to the signal
  • "entered": Emitted when the widget is entered (not necessarily with the mouse)
    • Callback: Etk_Bool callback(Etk_Widget *widget, void *data)
      • widget: the widget that has been entered
      • data: the user data set when the callback has been connected to the signal
  • "left": Emitted when the widget is left (not necessarily with the mouse)
    • Callback: Etk_Bool callback(Etk_Widget *widget, void *data)
      • widget: the widget that has been left
      • data: the user data set when the callback has been connected to the signal
  • "focused": Emitted when the widget is focused
    • Callback: Etk_Bool callback(Etk_Widget *widget, void *data)
      • widget: the widget that has been focused
      • data: the user data set when the callback has been connected to the signal
  • "unfocused": Emitted when the widget is unfocused
    • Callback: Etk_Bool callback(Etk_Widget *widget, void *data)
      • widget: the widget that has been unfocused
      • data: the user data set when the callback has been connected to the signal
  • "scroll-size-changed": Emitted when the scroll-size of the widget has changed (only for widgets with a scrolling abilty)
    • Callback: Etk_Bool callback(Etk_Widget *widget, void *data)
      • widget: the widget whose scroll-size has changed
      • data: the user data set when the callback has been connected to the signal
  • "selection-received": Emitted when a selection has been received (after a clipboard request for example)
    • Callback: Etk_Bool callback(Etk_Widget *widget, Etk_Selection_Event *event, void *data)
      • widget: the widget whose scroll-size has changed
      • event: the selection data
      • data: the user data set when the callback has been connected to the signal
(TODOC: dnd signals)

Properties:
  • "parent": The parent of the widget
    • Type: Pointer (Etk_Widget *)
    • Access: Read/Write
    • Default Value: NULL
  • "theme-file": The path to the theme-file used by the widget (NULL if the widget used the default theme-file)
    • Type: String (char *)
    • Access: Read/Write
    • Default Value: NULL
  • "theme-group": The theme-group used by the widget
    • Type: String (char *)
    • Access: Read/Write
    • Default Value: NULL
  • "theme-parent": The theme-parent of the widget
    • Type: Pointer (Etk_Widget *)
    • Access: Read/Write
    • Default Value: NULL
  • "geometry": The geometry of the widget (use etk_widget_geometry_get() to get it)
    • Type: Other (Etk_Geometry)
    • Access: No Access
  • "padding": The padding on the different sides of the widget (see etk_widget_padding_set() and etk_widget_padding_get())
    • Type: Other (quadruplets of integers)
    • Access: No Access
  • "requested-width": The width requested for the widget (-1 means it's calculated automatically)
    • Type: Integer
    • Access: Read/Write
    • Default Value: -1
  • "requested-height": The height requested for the widget (-1 means it's calculated automatically)
    • Type: Integer
    • Access: Read/Write
    • Default Value: -1
  • "visible": Whether or not the widget is visible
    • Type: Boolean
    • Access: Read/Write
    • Default Value: ETK_FALSE
  • "color": The color of the widget
    • Type: Other (quadruplets of integers)
    • Access: No Access
  • "propagate-color": Whether or not the color of the widget should propagated automatically to its children
    • Type: Boolean
    • Access: Read/Write
    • Default Value: ETK_TRUE
  • "internal": Whether or not the widget is an internal widget. See etk_widget_internal_set() for more info
    • Type: Boolean
    • Access: Read/Write
    • Default Value: ETK_FALSE
  • "focusable": Whether or not the widget can be focused
    • Type: Boolean
    • Access: Read/Write
    • Default Value: ETK_FALSE
  • "focus-on-click": Whether or not the widget should be automatically focused when it is clicked
    • Type: Boolean
    • Access: Read/Write
    • Default Value: ETK_FALSE
  • "repeat-mouse-events": Whether or not the mouse-events received by the widget should be propagated to its parent
    • Type: Boolean
    • Access: Read/Write
    • Default Value: ETK_FALSE
  • "pass-mouse-events": Whether or not the mouse-events received by the widget should be ignored by the widget and directly passed to its parent
    • Type: Boolean
    • Access: Read/Write
    • Default Value: ETK_FALSE
  • "has-event-object": Whether or not the widget uses an event-object to grab the mouse-events
    • Type: Boolean
    • Access: Read/Write
    • Default Value: ETK_FALSE


Data Structures

struct  Etk_Widget
 [Widget] The base class for all the widgets of Etk More...

Defines

#define ETK_WIDGET_TYPE   (etk_widget_type_get())
#define ETK_WIDGET(obj)   (ETK_OBJECT_CAST((obj), ETK_WIDGET_TYPE, Etk_Widget))
#define ETK_IS_WIDGET(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_WIDGET_TYPE))

Enumerations

enum  Etk_Widget_Swallow_Error {
  ETK_SWALLOW_ERROR_NONE,
  ETK_SWALLOW_ERROR_INCOMPATIBLE_PARENT,
  ETK_SWALLOW_ERROR_NO_THEME_OBJECT,
  ETK_SWALLOW_ERROR_NO_PART
}
 The code corresponding to the error that occured during the last call of etk_widget_swallow_widget() or etk_widget_swallow_object(). More...

Functions

Etk_Widget * etk_widget_new (Etk_Type *widget_type, const char *first_property,...)
 Creates a new widget: it calls the corresponding constructors (from the constructor of the base class to the constructor of the more derived class) and then sets the values of the given properties.
void etk_widget_show (Etk_Widget *widget)
 Shows the widget.
void etk_widget_show_all (Etk_Widget *widget)
 Recursively shows the widget and its children.
void etk_widget_hide (Etk_Widget *widget)
 Hides the widget.
void etk_widget_hide_all (Etk_Widget *widget)
 Recursively hides the widget and its children.
Etk_Bool etk_widget_is_visible (Etk_Widget *widget)
 Checks if the object is visible.
void etk_widget_internal_set (Etk_Widget *widget, Etk_Bool internal)
 Sets whether or not the widget is an internal widget: an internal widget is not affected by etk_widget_show_all() and etk_widget_hide_all(). It prevents visibility issues when one calls etk_widget_hide_all(widget) and then etk_widget_show(widget).
For example, if the label of a button wasn't an internal widget, calling etk_widget_hide_all(button) would hide the button and the label, and etk_widget_show(button) would only make the button reappear. The label would be invisible while it should be visible.
Etk_Bool etk_widget_internal_get (Etk_Widget *widget)
 Gets whether the widget is an internal widget. See etk_widget_internal_set() for more info about internal widgets.
void etk_widget_focus (Etk_Widget *widget)
 Focuses the widget. The focused widget is the one which receives the keyboard events.
void etk_widget_unfocus (Etk_Widget *widget)
 Unfocuses the widget.
Etk_Bool etk_widget_is_focused (Etk_Widget *widget)
 Gets whether the widget is focused.
void etk_widget_focusable_set (Etk_Widget *widget, Etk_Bool focusable)
 Sets whether or not the widget can be focused.
Etk_Bool etk_widget_focusable_get (Etk_Widget *widget)
 Gets whether the widget can be focused or not.
void etk_widget_disabled_set (Etk_Widget *widget, Etk_Bool disabled)
 Sets whether or not the widget is disabled. When a widget is disabled, the user can't interact with it anymore until it's enabled again. The widget's look will also change to make it look inactive.
void etk_widget_disabled_set_all (Etk_Widget *widget, Etk_Bool disabled)
 Recursively disables or enables the widget and its children.
Etk_Bool etk_widget_disabled_get (Etk_Widget *widget)
 Gets whether or not the widget is disabled.
void etk_widget_raise (Etk_Widget *widget)
 Raises a widget: it will be moved above all the other widgets that have the same parent as widget.
void etk_widget_lower (Etk_Widget *widget)
 Lowers a widget: it will be moved below all the other widgets that have the same parent as widget.
Etk_Bool etk_widget_enter (Etk_Widget *widget)
 Emits the "entered" signal on the widget. The widget will look like if the mouse had entered the widget.
Etk_Bool etk_widget_leave (Etk_Widget *widget)
 Emits the "left" signal on the widget. The widget will look like if the mouse had left the widget.
void etk_widget_repeat_mouse_events_set (Etk_Widget *widget, Etk_Bool repeat_mouse_events)
 Sets whether the mouse-events received by the widget should be propagated to its parent. By default, mouse-events are not propagated (when you click a button, the window containing the button doesn't receive the click event).
Etk_Bool etk_widget_repeat_mouse_events_get (Etk_Widget *widget)
 Checks whether the mouse-events received by the widget are propagated to its parent.
void etk_widget_pass_mouse_events_set (Etk_Widget *widget, Etk_Bool pass_mouse_events)
 Sets whether the widget should ignore the mouse-events it receives. In this case, the mouse-events will be directly passed to its parent.
Etk_Bool etk_widget_pass_mouse_events_get (Etk_Widget *widget)
 Checks whether the mouse-events received by the widget are ignored by the widget and passed directly to its parent.
void etk_widget_has_event_object_set (Etk_Widget *widget, Etk_Bool has_event_object)
 Sets whether or not the widget has an event-object. An event-object is an invisible rectangle that is used to grab the mouse events on the widget. It can be useful for example if you want a container with no theme-object (a table, a box, ...) to still receive the mouse events.
If widget already has a theme-object, this function has no effect (the theme-object is indeed already used to grab the mouse events).
Etk_Bool etk_widget_has_event_object_get (Etk_Widget *widget)
 Gets whether the widget has an event-object.
void etk_widget_parent_set (Etk_Widget *widget, Etk_Widget *parent)
 Sets the parent of the widget. If the widget has already a parent, it will be reparented.
Etk_Widget * etk_widget_parent_get (Etk_Widget *widget)
 Gets the parent of the widget.
Etk_Toplevel * etk_widget_toplevel_parent_get (Etk_Widget *widget)
 Gets the toplevel widget that contains widget.
Evas * etk_widget_toplevel_evas_get (Etk_Widget *widget)
 Gets the evas of the toplevel widget that contains widget.
void etk_widget_theme_set (Etk_Widget *widget, const char *theme_file, const char *theme_group)
 Changes the theme of the widget: it sets both the theme-file and the theme-group in a more optimized way than just calling etk_widget_theme_file_set() and then etk_widget_theme_group_set(). But if you only want to change the theme-file OR the theme-group, you should better call directly the corresponding function (etk_widget_theme_file_set() or etk_widget_theme_group_set()).
void etk_widget_theme_file_set (Etk_Widget *widget, const char *theme_file)
 Sets the theme-file used by the widget. The widget will be automatically re-realized.
const char * etk_widget_theme_file_get (Etk_Widget *widget)
 Gets the theme-file used by the widget.
void etk_widget_theme_group_set (Etk_Widget *widget, const char *theme_group)
 Sets the theme-group of the widget. The theme-group of a widget is also used by the theme-children of the widget. For example, the theme-group of a tree is "tree", and the theme-group of its rows is "row". Since the rows are theme-children of the tree, the edje-group really loaded for the rows is "etk/tree/rows". It also means that if you change the theme-group of the tree later to "new_tree" in order to change its appearance, the appearance of the rows will also be updated (the rows will use automatically the edje-group called "etk/new_tree/rows").
const char * etk_widget_theme_group_get (Etk_Widget *widget)
 Gets the full theme-group of the widget.
void etk_widget_theme_parent_set (Etk_Widget *widget, Etk_Widget *theme_parent)
 Sets the theme-parent of the widget. The widget will automatically inherit the theme-group from the theme-parent. See etk_widget_theme_group_set() for more info.
Etk_Widget * etk_widget_theme_parent_get (Etk_Widget *widget)
 Gets the theme-parent of the widget.
void etk_widget_color_set (Etk_Widget *widget, int r, int g, int b, int a)
 Sets the color of the widget. By default, the color change is also propagated automatically to the children of the widget. To change this behavior, see etk_widget_propagate_color_set().
void etk_widget_color_get (Etk_Widget *widget, int *r, int *g, int *b, int *a)
 Gets the current color of the widget.
void etk_widget_propagate_color_set (Etk_Widget *widget, Etk_Bool propagate_color)
 Sets whether or not a color change on the widget should be propagated to its children. If the color change is propagated, the color of the widget's children will be multiplied by the color of the widget.
Etk_Bool etk_widget_propagate_color_get (Etk_Widget *widget)
 Gets whether or not a color change on the widget is propagated to its children.
void etk_widget_padding_set (Etk_Widget *widget, int left, int right, int top, int bottom)
 Sets the padding on the different sides of the widget. Padding is a blank space on the sides of the widget.
void etk_widget_padding_get (Etk_Widget *widget, int *left, int *right, int *top, int *bottom)
 Gets the padding on the different sides of the widget.
void etk_widget_geometry_get (Etk_Widget *widget, int *x, int *y, int *w, int *h)
 Gets the geometry of the widget, relative to the top-left corner of the Evas where it is drawn.
void etk_widget_inner_geometry_get (Etk_Widget *widget, int *x, int *y, int *w, int *h)
 Gets the inner geometry of the widget, relative to the top-left corner of the Evas where it is drawn.
The inner geometry corresponds to the rectangle in which the widget's children are rendered. This rectangle may be smaller than the geometry of the widget because inset values can be set by the theme.
void etk_widget_size_recalc_queue (Etk_Widget *widget)
 Queues a size recalculation request: during the next main-loop iteration, the size of the widget will be recalculated, and the widget will be redrawn.
void etk_widget_redraw_queue (Etk_Widget *widget)
 Queues a redraw request: during the next main-loop iteration, the widget and its children will be redrawn (i.e. etk_widget_size_allocate() will be called on them).
void etk_widget_size_request_set (Etk_Widget *widget, int w, int h)
 Sets the size-request of the widget. Use this function to request Etk to resize the widget to the given size.
It does not mean the widget will be allocated this size: in some cases, the widget may be allocated less than its size-request, and often the allocated size can be larger than the size-request (if the widget expands for example).
You can use this function to force a widget to be smaller or larger than its default size.
void etk_widget_size_request (Etk_Widget *widget, Etk_Size *size_requisition)
 Calculates the size-request of the widget.
void etk_widget_size_request_full (Etk_Widget *widget, Etk_Size *size_requisition, Etk_Bool hidden_has_no_size)
 Calculates the size-request of the widget.
void etk_widget_size_allocate (Etk_Widget *widget, Etk_Geometry geometry)
 Moves and resizes the widget to the given geometry.
void etk_widget_theme_signal_emit (Etk_Widget *widget, const char *signal_name, Etk_Bool size_recalc)
 Sends a signal to the theme-object of the widget.
void etk_widget_theme_part_text_set (Etk_Widget *widget, const char *part_name, const char *text)
 Sets the text of a text-part of the widget's theme-object.
int etk_widget_theme_data_get (Etk_Widget *widget, const char *data_name, const char *format,...)
 Gets the data called data_name from the theme of the widget.
Etk_Bool etk_widget_member_object_add (Etk_Widget *widget, Evas_Object *object)
 Adds an evas object to the list of member-objects of the widget.
A member-object is an object which is automatically shown/hidden when the widget is shown/hidden, which is clipped against the clip-object of the widget, and which is used by the widget to receive the mouse events. A member-object is also stacked on the same level as the widget.
The object will be automatically deleted when the object is unrealized, unless you remove it from the list with etk_widget_member_object_del() before the widget is unrealized.
void etk_widget_member_object_del (Etk_Widget *widget, Evas_Object *object)
 Removes an evas object from the list of member-objects of the widget. See etk_widget_member_object_add() for more info about member-objects.
void etk_widget_member_object_raise (Etk_Widget *widget, Evas_Object *object)
 Stacks object above all the other member-objects of the widget.
void etk_widget_member_object_lower (Etk_Widget *widget, Evas_Object *object)
 Stacks object below all the other member-objects of the widget.
void etk_widget_member_object_stack_above (Etk_Widget *widget, Evas_Object *object, Evas_Object *above)
 Stacks the member-object object above the member-object above.
void etk_widget_member_object_stack_below (Etk_Widget *widget, Evas_Object *object, Evas_Object *below)
 Stacks the member-object object below the member-object below.
Etk_Bool etk_widget_swallow_widget (Etk_Widget *swallower, const char *part, Etk_Widget *to_swallow)
 Makes the widget swallow another widget in a part of its theme-object.
void etk_widget_unswallow_widget (Etk_Widget *swallower, Etk_Widget *swallowed)
 Makes the widget swallower unswallow another widget.
Etk_Bool etk_widget_is_swallowed (Etk_Widget *widget)
 Checks if the widget is swallowed by its parent.
Etk_Bool etk_widget_swallow_object (Etk_Widget *swallower, const char *part, Evas_Object *to_swallow)
 Makes the widget swallow an Evas_Object in a part of its theme-object.
void etk_widget_unswallow_object (Etk_Widget *swallower, Evas_Object *object)
 Makes the widget unswallow an Evas_Object.
Etk_Widget_Swallow_Error etk_widget_swallow_error_get (void)
 Gets the code corresponding to the error that occurs during the last call of etk_widget_swallow_widget() or etk_widget_swallow_object().
void etk_widget_clip_set (Etk_Widget *widget, Evas_Object *clip)
 Sets the clip-object of the widget. The theme-object and the member-objects of the widget will be automatically clipped against clip.
void etk_widget_clip_unset (Etk_Widget *widget)
 Unsets the clip-object of the widget. The theme-object and the member-objects won't be clipped anymore.
Evas_Object * etk_widget_clip_get (Etk_Widget *widget)
 Gets the clip-object of the widget.
void etk_widget_dnd_dest_set (Etk_Widget *widget, Etk_Bool on)
 Sets whether the widget is dnd destination.
Etk_Bool etk_widget_dnd_dest_get (Etk_Widget *widget)
 Checks whether the widget is a dnd destination.
void etk_widget_dnd_source_set (Etk_Widget *widget, Etk_Bool on)
 Sets whether the widget is dnd source.
Etk_Bool etk_widget_dnd_source_get (Etk_Widget *widget)
 Checks whether the widget is a dnd source.
void etk_widget_dnd_internal_set (Etk_Widget *widget, Etk_Bool on)
 Set whether the widget wants to handle its own dnd or not.
Etk_Bool etk_widget_dnd_internal_get (Etk_Widget *widget)
 Checks whether the widget wants to handle its own dnd or not.
void etk_widget_dnd_drag_widget_set (Etk_Widget *widget, Etk_Widget *drag_widget)
 Sets the visual data for the drag (the widget to be displayed).
Etk_Widget * etk_widget_dnd_drag_widget_get (Etk_Widget *widget)
 Gets the visual data for the drag (the widget to be displayed).
void etk_widget_dnd_types_set (Etk_Widget *widget, const char **types, int num)
 Sets the possible types for dnd.
const char ** etk_widget_dnd_types_get (Etk_Widget *widget, int *num)
 Gets the possible types for dnd.
Evas_List * etk_widget_dnd_dest_widgets_get (void)
 Gets the list of the widgets that are dnd destinations.


Define Documentation

#define ETK_WIDGET_TYPE   (etk_widget_type_get())

Gets the type of a widget

Referenced by etk_combobox_build().

#define ETK_WIDGET ( obj   )     (ETK_OBJECT_CAST((obj), ETK_WIDGET_TYPE, Etk_Widget))

Casts the object to an Etk_Widget

Referenced by etk_alignment_set(), etk_bin_child_set(), etk_box_child_packing_set(), etk_box_homogeneous_set(), etk_box_spacing_set(), etk_button_image_set(), etk_button_label_set(), etk_canvas_move(), etk_canvas_put(), etk_combobox_entry_item_field_set(), etk_combobox_entry_item_fields_get_valist(), etk_combobox_entry_item_fields_set_valist(), etk_combobox_entry_item_insert_empty(), etk_combobox_entry_items_height_set(), etk_combobox_fields_set_valist(), etk_combobox_item_field_set(), etk_combobox_item_fields_get_valist(), etk_combobox_item_fields_set_valist(), etk_combobox_item_insert_empty(), etk_combobox_items_height_set(), etk_container_border_width_set(), etk_container_for_each(), etk_container_for_each_data(), etk_container_remove_all(), etk_dialog_pack_button_in_action_area(), etk_embed_new(), etk_embed_object_get(), etk_entry_image_highlight_set(), etk_entry_image_set(), etk_frame_label_set(), etk_image_aspect_ratio_set(), etk_image_keep_aspect_set(), etk_label_alignment_set(), etk_label_set(), etk_main_iterate(), etk_mdi_area_move(), etk_mdi_area_put(), etk_mdi_window_decorated_set(), etk_mdi_window_delete_request(), etk_mdi_window_hide_on_delete(), etk_mdi_window_title_set(), etk_menu_item_image_set(), etk_menu_item_label_set(), etk_menu_item_submenu_set(), etk_menu_shell_remove(), etk_notebook_page_child_set(), etk_notebook_page_remove(), etk_notebook_tabs_homogeneous_set(), etk_paned_child1_set(), etk_paned_child2_set(), etk_paned_position_set(), etk_popup_window_popdown(), etk_popup_window_popup_at_xy(), etk_popup_window_popup_at_xy_in_direction(), etk_progress_bar_fraction_set(), etk_scrolled_view_policy_set(), etk_shadow_border_set(), etk_shadow_shadow_set(), etk_slider_inverted_set(), etk_slider_label_set(), etk_statusbar_has_resize_grip_set(), etk_table_attach(), etk_table_homogeneous_set(), etk_table_resize(), etk_toolbar_orientation_set(), etk_tree_alternating_row_colors_set(), etk_tree_clear(), etk_tree_col_alignment_set(), etk_tree_col_expand_set(), etk_tree_col_new(), etk_tree_col_position_set(), etk_tree_col_sort_full(), etk_tree_col_visible_set(), etk_tree_col_width_set(), etk_tree_column_separators_visible_set(), etk_tree_headers_visible_set(), etk_tree_model_image_width_set(), etk_tree_row_delete(), etk_tree_row_fields_set_valist(), etk_tree_row_fold(), etk_tree_row_insert_valist(), etk_tree_row_model_fields_set_valist(), etk_tree_row_unfold(), etk_tree_row_unselect(), etk_tree_rows_height_set(), etk_tree_select_all(), etk_tree_thaw(), etk_tree_unselect_all(), etk_widget_disabled_set_all(), etk_widget_focus(), etk_widget_hide_all(), etk_widget_member_object_add(), etk_widget_new(), etk_widget_propagate_color_set(), etk_widget_show_all(), etk_widget_size_recalc_queue(), and etk_window_hide_on_delete().

#define ETK_IS_WIDGET ( obj   )     (ETK_OBJECT_CHECK_TYPE((obj), ETK_WIDGET_TYPE))

Check if the object is an Etk_Widget


Enumeration Type Documentation

enum Etk_Widget_Swallow_Error

The code corresponding to the error that occured during the last call of etk_widget_swallow_widget() or etk_widget_swallow_object().

Enumerator:
ETK_SWALLOW_ERROR_NONE  The object has been succesfully swallowed
ETK_SWALLOW_ERROR_INCOMPATIBLE_PARENT  The parent of the widget to swallow is not the swallower-widget
ETK_SWALLOW_ERROR_NO_THEME_OBJECT  The swallower-widget has no theme-object (usually because it is not realized yet)
ETK_SWALLOW_ERROR_NO_PART  The part where to swallow the object has not been found in the theme-object of the swallower-widget


Function Documentation

Etk_Widget * etk_widget_new ( Etk_Type *  widget_type,
const char *  first_property,
  ... 
)

Creates a new widget: it calls the corresponding constructors (from the constructor of the base class to the constructor of the more derived class) and then sets the values of the given properties.

Parameters:
widget_type the type of widget to create
first_property the name of the first property to set
... the value of the first property, followed by any number of property-name/property-value pairs, terminated with NULL
Returns:
Returns the new Etk_Widget of type widget_type
Note:
This function just calls etk_object_new() and casts the result to an "Etk_Widget *"

References etk_object_new_valist(), and ETK_WIDGET.

Referenced by etk_alignment_new(), etk_button_new(), etk_button_new_with_label(), etk_canvas_new(), etk_check_button_new(), etk_check_button_new_with_label(), etk_colorpicker_new(), etk_combobox_build(), etk_combobox_entry_item_insert_empty(), etk_combobox_entry_new(), etk_combobox_item_insert_empty(), etk_combobox_new(), etk_dialog_new(), etk_drag_new(), etk_embed_new(), etk_entry_new(), etk_evas_object_new(), etk_filechooser_widget_new(), etk_frame_new(), etk_hbox_new(), etk_hpaned_new(), etk_hscrollbar_new(), etk_hseparator_new(), etk_hslider_new(), etk_iconbox_new(), etk_image_new(), etk_label_new(), etk_mdi_area_new(), etk_mdi_window_new(), etk_menu_bar_new(), etk_menu_item_check_new(), etk_menu_item_check_new_with_label(), etk_menu_item_image_new(), etk_menu_item_image_new_with_label(), etk_menu_item_new(), etk_menu_item_new_with_label(), etk_menu_item_radio_new(), etk_menu_item_radio_new_from_widget(), etk_menu_item_radio_new_with_label(), etk_menu_item_radio_new_with_label_from_widget(), etk_menu_item_separator_new(), etk_menu_new(), etk_message_dialog_new(), etk_notebook_new(), etk_progress_bar_new(), etk_progress_bar_new_with_text(), etk_radio_button_new(), etk_radio_button_new_from_widget(), etk_radio_button_new_with_label(), etk_radio_button_new_with_label_from_widget(), etk_scrolled_view_new(), etk_shadow_new(), etk_spinner_new(), etk_statusbar_new(), etk_table_new(), etk_text_view2_new(), etk_text_view_new(), etk_toggle_button_new(), etk_toggle_button_new_with_label(), etk_tool_button_new(), etk_tool_button_new_with_label(), etk_tool_toggle_button_new(), etk_tool_toggle_button_new_with_label(), etk_toolbar_new(), etk_tooltips_init(), etk_tooltips_pop_up(), etk_tree_col_new(), etk_tree_new(), etk_vbox_new(), etk_viewport_new(), etk_vpaned_new(), etk_vscrollbar_new(), etk_vseparator_new(), etk_vslider_new(), and etk_window_new().

void etk_widget_show ( Etk_Widget *  widget  ) 

Shows the widget.

Parameters:
widget a widget
Note:
The widget will effectively be shown if all its parents are also shown

References ETK_OBJECT, etk_object_notify(), etk_signal_emit(), etk_widget_size_recalc_queue(), parent, smart_object, and visible.

Referenced by etk_button_label_set(), etk_colorpicker_use_alpha_set(), etk_combobox_build(), etk_combobox_entry_item_field_set(), etk_combobox_entry_item_fields_get_valist(), etk_combobox_entry_item_fields_set_valist(), etk_combobox_item_field_set(), etk_combobox_item_fields_get_valist(), etk_combobox_item_fields_set_valist(), etk_dialog_button_add(), etk_dialog_button_add_from_stock(), etk_dialog_has_separator_set(), etk_entry_image_set(), etk_menu_item_set_from_stock(), etk_notebook_tabs_visible_set(), etk_popup_window_popup_at_xy(), etk_scrolled_view_add_with_viewport(), etk_toolbar_orientation_set(), and etk_widget_show_all().

void etk_widget_show_all ( Etk_Widget *  widget  ) 

Recursively shows the widget and its children.

Parameters:
widget a widget

References children, ETK_WIDGET, and etk_widget_show().

Referenced by etk_tooltips_pop_up().

void etk_widget_hide ( Etk_Widget *  widget  ) 

Hides the widget.

Parameters:
widget a widget

References ETK_OBJECT, etk_object_notify(), etk_signal_emit(), etk_widget_size_recalc_queue(), smart_object, and visible.

Referenced by etk_button_label_set(), etk_colorpicker_use_alpha_set(), etk_dialog_has_separator_set(), etk_mdi_window_hide_on_delete(), etk_notebook_tabs_visible_set(), etk_popup_window_popdown(), etk_tooltips_pop_down(), etk_widget_hide_all(), and etk_window_hide_on_delete().

void etk_widget_hide_all ( Etk_Widget *  widget  ) 

Recursively hides the widget and its children.

Parameters:
widget a widget

References children, ETK_WIDGET, and etk_widget_hide().

Etk_Bool etk_widget_is_visible ( Etk_Widget *  widget  ) 

Checks if the object is visible.

Parameters:
widget a widget
Returns:
Returns ETK_TRUE if the widget is visible, ETK_FALSE otherwise

References visible.

void etk_widget_internal_set ( Etk_Widget *  widget,
Etk_Bool  internal 
)

Sets whether or not the widget is an internal widget: an internal widget is not affected by etk_widget_show_all() and etk_widget_hide_all(). It prevents visibility issues when one calls etk_widget_hide_all(widget) and then etk_widget_show(widget).
For example, if the label of a button wasn't an internal widget, calling etk_widget_hide_all(button) would hide the button and the label, and etk_widget_show(button) would only make the button reappear. The label would be invisible while it should be visible.

Parameters:
widget a widget
internal ETK_TRUE to prevent the widget to be affected by etk_widget_show_all() and etk_widget_hide_all()
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References ETK_OBJECT, and etk_object_notify().

Referenced by etk_button_set_from_stock(), etk_combobox_build(), etk_entry_image_set(), etk_menu_item_set_from_stock(), etk_scrolled_view_add_with_viewport(), and etk_toolbar_orientation_set().

Etk_Bool etk_widget_internal_get ( Etk_Widget *  widget  ) 

Gets whether the widget is an internal widget. See etk_widget_internal_set() for more info about internal widgets.

Parameters:
widget a widget
Returns:
Returns ETK_TRUE if the widget is an internal widget, ETK_FALSE otherwise
See also:
etk_widget_internal_set()

void etk_widget_focus ( Etk_Widget *  widget  ) 

Focuses the widget. The focused widget is the one which receives the keyboard events.

Parameters:
widget a widget
Note:
The widget has to be attached to a toplevel widget, otherwise it will have no effect

References ETK_OBJECT, etk_signal_emit(), etk_toplevel_focused_widget_get(), etk_toplevel_focused_widget_set(), ETK_WIDGET, etk_widget_disabled_get(), etk_widget_unfocus(), focusable, and toplevel_parent.

void etk_widget_unfocus ( Etk_Widget *  widget  ) 

Unfocuses the widget.

Parameters:
widget a widget

References ETK_OBJECT, etk_signal_emit(), etk_toplevel_focused_widget_set(), etk_widget_is_focused(), and toplevel_parent.

Referenced by etk_widget_disabled_set(), etk_widget_focus(), and etk_widget_focusable_set().

Etk_Bool etk_widget_is_focused ( Etk_Widget *  widget  ) 

Gets whether the widget is focused.

Parameters:
widget a widget
Returns:
Returns ETK_TRUE if widget is focused, ETK_FALSE otherwise

References etk_toplevel_focused_widget_get(), and toplevel_parent.

Referenced by etk_widget_unfocus().

void etk_widget_focusable_set ( Etk_Widget *  widget,
Etk_Bool  focusable 
)

Sets whether or not the widget can be focused.

Parameters:
widget a widget
focusable ETK_TRUE to make widget focusable, ETK_FALSE otherwise

References ETK_OBJECT, etk_object_notify(), etk_widget_unfocus(), and focusable.

Etk_Bool etk_widget_focusable_get ( Etk_Widget *  widget  ) 

Gets whether the widget can be focused or not.

Parameters:
widget a widget
Returns:
Returns ETK_TRUE if the widget is focusable, ETK_FALSE otherwise

References focusable.

void etk_widget_disabled_set ( Etk_Widget *  widget,
Etk_Bool  disabled 
)

Sets whether or not the widget is disabled. When a widget is disabled, the user can't interact with it anymore until it's enabled again. The widget's look will also change to make it look inactive.

Parameters:
widget a widget
disabled ETK_TRUE to disable the widget, ETK_FALSE to enable it

References disabled, ETK_OBJECT, etk_object_notify(), etk_signal_emit(), etk_widget_unfocus(), pass_mouse_events, and smart_object.

Referenced by etk_filechooser_widget_is_save_set(), and etk_widget_disabled_set_all().

void etk_widget_disabled_set_all ( Etk_Widget *  widget,
Etk_Bool  disabled 
)

Recursively disables or enables the widget and its children.

Parameters:
widget a widget
disabled ETK_TRUE to disable the widget and its children, ETK_FALSE to enable them

References children, ETK_WIDGET, and etk_widget_disabled_set().

Etk_Bool etk_widget_disabled_get ( Etk_Widget *  widget  ) 

Gets whether or not the widget is disabled.

Parameters:
widget a widget
Returns:
Returns ETK_TRUE if the widget is disabled, ETK_FALSE otherwise

References disabled.

Referenced by etk_toplevel_focused_widget_next_get(), etk_toplevel_focused_widget_prev_get(), and etk_widget_focus().

void etk_widget_raise ( Etk_Widget *  widget  ) 

Raises a widget: it will be moved above all the other widgets that have the same parent as widget.

Parameters:
widget the widget to raise

References children, parent, and smart_object.

Referenced by etk_paned_child1_set(), and etk_paned_child2_set().

void etk_widget_lower ( Etk_Widget *  widget  ) 

Lowers a widget: it will be moved below all the other widgets that have the same parent as widget.

Parameters:
widget the widget to lower

References children, content_object, event_object, parent, smart_object, and theme_object.

Etk_Bool etk_widget_enter ( Etk_Widget *  widget  ) 

Emits the "entered" signal on the widget. The widget will look like if the mouse had entered the widget.

Parameters:
widget a widget

References ETK_OBJECT, and etk_signal_emit().

Etk_Bool etk_widget_leave ( Etk_Widget *  widget  ) 

Emits the "left" signal on the widget. The widget will look like if the mouse had left the widget.

Parameters:
widget a widget

References ETK_OBJECT, and etk_signal_emit().

void etk_widget_repeat_mouse_events_set ( Etk_Widget *  widget,
Etk_Bool  repeat_mouse_events 
)

Sets whether the mouse-events received by the widget should be propagated to its parent. By default, mouse-events are not propagated (when you click a button, the window containing the button doesn't receive the click event).

Parameters:
widget a widget
repeat_mouse_events if repeat_mouse_events is ETK_TRUE, the parent widget will also receive the mouse-events

References ETK_OBJECT, etk_object_notify(), and repeat_mouse_events.

Etk_Bool etk_widget_repeat_mouse_events_get ( Etk_Widget *  widget  ) 

Checks whether the mouse-events received by the widget are propagated to its parent.

Parameters:
widget a widget
Returns:
Returns ETK_TRUE if the mouse-events received by the widget are propagated to its parent

References repeat_mouse_events.

void etk_widget_pass_mouse_events_set ( Etk_Widget *  widget,
Etk_Bool  pass_mouse_events 
)

Sets whether the widget should ignore the mouse-events it receives. In this case, the mouse-events will be directly passed to its parent.

Parameters:
widget a widget
pass_mouse_events if pass_mouse_events is ETK_TRUE, the mouse-events will be directly passed to the parent. widget won't receive mouse-events anymore

References disabled, ETK_OBJECT, etk_object_notify(), pass_mouse_events, and smart_object.

Referenced by etk_combobox_entry_item_field_set(), etk_combobox_entry_item_fields_set_valist(), etk_combobox_item_field_set(), etk_combobox_item_fields_set_valist(), and etk_menu_item_image_set().

Etk_Bool etk_widget_pass_mouse_events_get ( Etk_Widget *  widget  ) 

Checks whether the mouse-events received by the widget are ignored by the widget and passed directly to its parent.

Parameters:
widget a widget
Returns:
Returns ETK_TRUE if the the mouse-events are ignored by the widget, ETK_FALSE otherwise

References pass_mouse_events.

void etk_widget_has_event_object_set ( Etk_Widget *  widget,
Etk_Bool  has_event_object 
)

Sets whether or not the widget has an event-object. An event-object is an invisible rectangle that is used to grab the mouse events on the widget. It can be useful for example if you want a container with no theme-object (a table, a box, ...) to still receive the mouse events.
If widget already has a theme-object, this function has no effect (the theme-object is indeed already used to grab the mouse events).

Parameters:
widget a widget
has_event_object ETK_TRUE to make the widget have an event-object, ETK_FALSE otherwise

References ETK_OBJECT, etk_object_notify(), etk_widget_redraw_queue(), etk_widget_toplevel_evas_get(), event_object, has_event_object, and theme_object.

Etk_Bool etk_widget_has_event_object_get ( Etk_Widget *  widget  ) 

Gets whether the widget has an event-object.

Parameters:
widget a widget
Returns:
Returns ETK_TRUE if the widget has an event-object, ETK_FALSE otherwise

References has_event_object.

void etk_widget_parent_set ( Etk_Widget *  widget,
Etk_Widget *  parent 
)

Sets the parent of the widget. If the widget has already a parent, it will be reparented.

Parameters:
widget a widget
parent the new parent of widget
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

If you want to add a widget to a container, use etk_container_add() or the appropriate function of the container's API. Otherwise the widget will not be packed correctly

References children, clip, ETK_IS_TOPLEVEL, ETK_OBJECT, etk_object_notify(), etk_widget_clip_unset(), etk_widget_size_recalc_queue(), etk_widget_theme_file_get(), etk_widget_toplevel_evas_get(), etk_widget_toplevel_parent_get(), etk_widget_unswallow_widget(), parent, realized, smart_object, swallowed, theme_file, theme_parent, and toplevel_parent.

Referenced by etk_bin_child_set(), etk_box_child_position_set(), etk_button_image_set(), etk_canvas_put(), etk_combobox_build(), etk_combobox_entry_item_field_set(), etk_combobox_entry_item_fields_get_valist(), etk_combobox_entry_item_fields_set_valist(), etk_combobox_entry_item_insert_empty(), etk_combobox_item_field_set(), etk_combobox_item_fields_get_valist(), etk_combobox_item_fields_set_valist(), etk_combobox_item_insert_empty(), etk_container_remove(), etk_entry_image_set(), etk_mdi_area_put(), etk_mdi_window_delete_request(), etk_menu_item_image_set(), etk_menu_shell_remove(), etk_notebook_page_child_set(), etk_notebook_page_remove(), etk_paned_child1_set(), etk_paned_child2_set(), etk_table_attach(), etk_table_cell_clear(), etk_toolbar_orientation_set(), and etk_tree_col_new().

Etk_Widget * etk_widget_parent_get ( Etk_Widget *  widget  ) 

Gets the parent of the widget.

Parameters:
widget a widget
Returns:
Returns the parent of the widget

References parent.

Referenced by etk_button_label_set().

Etk_Toplevel * etk_widget_toplevel_parent_get ( Etk_Widget *  widget  ) 

Gets the toplevel widget that contains widget.

Parameters:
widget a widget
Returns:
Returns the toplevel widget if widget is contained by a toplevel widget, or NULL otherwise

References toplevel_parent.

Referenced by etk_tooltips_pop_up(), and etk_widget_parent_set().

Evas * etk_widget_toplevel_evas_get ( Etk_Widget *  widget  ) 

Gets the evas of the toplevel widget that contains widget.

Parameters:
widget a widget
Returns:
Returns the evas if widget is contained by a toplevel widget, or NULL otherwise

References etk_toplevel_evas_get(), and toplevel_parent.

Referenced by etk_tooltips_pop_up(), etk_widget_has_event_object_set(), etk_widget_member_object_add(), and etk_widget_parent_set().

void etk_widget_theme_set ( Etk_Widget *  widget,
const char *  theme_file,
const char *  theme_group 
)

Changes the theme of the widget: it sets both the theme-file and the theme-group in a more optimized way than just calling etk_widget_theme_file_set() and then etk_widget_theme_group_set(). But if you only want to change the theme-file OR the theme-group, you should better call directly the corresponding function (etk_widget_theme_file_set() or etk_widget_theme_group_set()).

Parameters:
widget a widget
theme_file the path of the theme-file. If NULL, it will use the first non-NULL theme-file of its parents. If none of its parents has a non-NULL theme-file, the current theme-file of Etk.
The new theme-file will also be automatically used by all the children of [Widget], as long as they have a theme-file set to NULL
theme_group the theme-group to use

References ETK_OBJECT, etk_object_notify(), theme_file, and theme_group.

void etk_widget_theme_file_set ( Etk_Widget *  widget,
const char *  theme_file 
)

Sets the theme-file used by the widget. The widget will be automatically re-realized.

Parameters:
widget a widget
theme_file the path of the theme-file. If NULL, it will use the first non-NULL theme-file of its parents. If none of its parents has a non-NULL theme-file, the current theme-file of Etk.
The new theme-file will also be automatically used by all the children of [Widget], as long as they have a theme-file set to NULL

References ETK_OBJECT, etk_object_notify(), and theme_file.

const char * etk_widget_theme_file_get ( Etk_Widget *  widget  ) 

Gets the theme-file used by the widget.

Parameters:
widget a widget
Returns:
Returns the path to the theme-file used by the widget (NULL if the widget uses the current theme of Etk)
Note:
The returned value may be different from the theme-file set with etk_widget_theme_file_set(): if the theme-file has been set to NULL, etk_widget_theme_file_get() will look recursively for the first non-NULL theme-file of its parents. If none of its parents have a non-NULL theme-file, etk_widget_theme_file_get() will return NULL (meaning that widget uses the current theme of Etk).
To get the value set with etk_widget_theme_file_set(), you can use etk_object_properties_get(ETK_OBJECT(widget), "theme-file", &theme_file, NULL);

References parent, theme_file, and theme_parent.

Referenced by etk_theme_edje_object_set_from_parent(), and etk_widget_parent_set().

void etk_widget_theme_group_set ( Etk_Widget *  widget,
const char *  theme_group 
)

Sets the theme-group of the widget. The theme-group of a widget is also used by the theme-children of the widget. For example, the theme-group of a tree is "tree", and the theme-group of its rows is "row". Since the rows are theme-children of the tree, the edje-group really loaded for the rows is "etk/tree/rows". It also means that if you change the theme-group of the tree later to "new_tree" in order to change its appearance, the appearance of the rows will also be updated (the rows will use automatically the edje-group called "etk/new_tree/rows").

Parameters:
widget a widget
theme_group the theme-group to use

References ETK_OBJECT, etk_object_notify(), and theme_group.

Referenced by etk_mdi_window_decorated_set(), etk_notebook_tabs_visible_set(), and etk_toolbar_orientation_set().

const char * etk_widget_theme_group_get ( Etk_Widget *  widget  ) 

Gets the full theme-group of the widget.

Parameters:
widget a widget
Returns:
Returns the full theme-group of the widget
Note:
The returned value may be different from the theme-group set with etk_widget_theme_group_set() because if widget has a theme-parent, it will be taken into account. For example, if widget is a row, and the theme-parent of the widget is a tree, the returned value will be "tree/row", and not just "row".
To get the value set with etk_widget_theme_group_set(), you can use etk_object_properties_get(ETK_OBJECT(widget), "theme-group", &theme_group, NULL);

References theme_group_full.

Referenced by etk_theme_edje_object_set_from_parent().

void etk_widget_theme_parent_set ( Etk_Widget *  widget,
Etk_Widget *  theme_parent 
)

Sets the theme-parent of the widget. The widget will automatically inherit the theme-group from the theme-parent. See etk_widget_theme_group_set() for more info.

Parameters:
widget a widget
theme_parent The theme-parent to use
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself
See also:
etk_widget_theme_group_set()

References ETK_OBJECT, etk_object_notify(), theme_children, and theme_parent.

Referenced by etk_combobox_build().

Etk_Widget * etk_widget_theme_parent_get ( Etk_Widget *  widget  ) 

Gets the theme-parent of the widget.

Parameters:
widget a widget
Returns:
Returns the theme-parent of the widget
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References theme_parent.

void etk_widget_color_set ( Etk_Widget *  widget,
int  r,
int  g,
int  b,
int  a 
)

Sets the color of the widget. By default, the color change is also propagated automatically to the children of the widget. To change this behavior, see etk_widget_propagate_color_set().

Parameters:
widget a widget
r the red component of the color to set
g the green component of the color to set
b the blue component of the color to set
a the alpha component of the color to set
Note:
The color should be alpha-premultiplied

References a, b, color, ETK_OBJECT, etk_object_notify(), g, r, and smart_object.

Referenced by etk_entry_image_highlight_set().

void etk_widget_color_get ( Etk_Widget *  widget,
int *  r,
int *  g,
int *  b,
int *  a 
)

Gets the current color of the widget.

Parameters:
widget a widget
r the location where to store the red component of the color
g the location where to store the green component of the color
b the location where to store the blue component of the color
a the location where to store the alpha component of the color
Note:
The returned color is alpha-premultiplied

References a, b, color, g, and r.

void etk_widget_propagate_color_set ( Etk_Widget *  widget,
Etk_Bool  propagate_color 
)

Sets whether or not a color change on the widget should be propagated to its children. If the color change is propagated, the color of the widget's children will be multiplied by the color of the widget.

Parameters:
widget a widget
propagate_color ETK_TRUE to "propagate" the color changes on the widget, ETK_FALSE otherwise

References a, b, children, color, ETK_OBJECT, etk_object_notify(), ETK_WIDGET, g, propagate_color, r, and smart_object.

Etk_Bool etk_widget_propagate_color_get ( Etk_Widget *  widget  ) 

Gets whether or not a color change on the widget is propagated to its children.

Parameters:
widget a widget
Returns:
Returns ETK_TRUE if the color changes are propagated, ETK_FALSE otherwise

References propagate_color.

void etk_widget_padding_set ( Etk_Widget *  widget,
int  left,
int  right,
int  top,
int  bottom 
)

Sets the padding on the different sides of the widget. Padding is a blank space on the sides of the widget.

Parameters:
widget a widget
left the padding at the left of the widget
right the padding at the right of the widget
top the padding at the top of the widget
bottom the padding at the bottom of the widget

References bottom, ETK_MAX, ETK_OBJECT, etk_object_notify(), etk_widget_size_recalc_queue(), left, padding, right, and top.

void etk_widget_padding_get ( Etk_Widget *  widget,
int *  left,
int *  right,
int *  top,
int *  bottom 
)

Gets the padding on the different sides of the widget.

Parameters:
widget a widget
left the location where to store the padding at the left of the widget
right the location where to store the padding at the right of the widget
top the location where to store the padding at the top of the widget
bottom the location where to store the padding at the bottom of the widget

References bottom, left, padding, right, and top.

void etk_widget_geometry_get ( Etk_Widget *  widget,
int *  x,
int *  y,
int *  w,
int *  h 
)

Gets the geometry of the widget, relative to the top-left corner of the Evas where it is drawn.

Parameters:
widget a widget
x the location where to store the x position of the widget
y the location where to store the y position of the widget
w the location where to store the width of the widget
h the location where to store the height of the widget

References geometry, Etk_Geometry::h, Etk_Geometry::w, Etk_Geometry::x, and Etk_Geometry::y.

void etk_widget_inner_geometry_get ( Etk_Widget *  widget,
int *  x,
int *  y,
int *  w,
int *  h 
)

Gets the inner geometry of the widget, relative to the top-left corner of the Evas where it is drawn.
The inner geometry corresponds to the rectangle in which the widget's children are rendered. This rectangle may be smaller than the geometry of the widget because inset values can be set by the theme.

Parameters:
widget a widget
x the location where to store the inner x position of the widget
y the location where to store the inner y position of the widget
w the location where to store the inner width of the widget
h the location where to store the inner height of the widget

References Etk_Geometry::h, inner_geometry, Etk_Geometry::w, Etk_Geometry::x, and Etk_Geometry::y.

Referenced by etk_iconbox_icon_get_at_xy(), etk_tree_row_get_at_xy(), and etk_tree_row_scroll_to().

void etk_widget_size_recalc_queue ( Etk_Widget *  widget  ) 

Queues a size recalculation request: during the next main-loop iteration, the size of the widget will be recalculated, and the widget will be redrawn.

Parameters:
widget the widget to queue
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References content_object, ETK_WIDGET, need_redraw, need_size_recalc, need_theme_size_recalc, Etk_Toplevel::need_update, parent, swallowed, and toplevel_parent.

Referenced by etk_box_child_packing_set(), etk_box_homogeneous_set(), etk_box_spacing_set(), etk_canvas_move(), etk_combobox_entry_items_height_set(), etk_combobox_items_height_set(), etk_container_border_width_set(), etk_entry_image_set(), etk_label_set(), etk_mdi_area_move(), etk_menu_item_image_set(), etk_menu_item_submenu_set(), etk_menu_shell_remove(), etk_notebook_page_child_set(), etk_notebook_page_remove(), etk_notebook_tabs_homogeneous_set(), etk_shadow_border_set(), etk_shadow_shadow_set(), etk_table_homogeneous_set(), etk_table_resize(), etk_widget_hide(), etk_widget_padding_set(), etk_widget_parent_set(), etk_widget_show(), etk_widget_size_request_set(), etk_widget_theme_part_text_set(), and etk_widget_theme_signal_emit().

void etk_widget_redraw_queue ( Etk_Widget *  widget  ) 

Queues a redraw request: during the next main-loop iteration, the widget and its children will be redrawn (i.e. etk_widget_size_allocate() will be called on them).

Parameters:
widget the widget to queue
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References Etk_Toplevel::need_update, and toplevel_parent.

Referenced by etk_alignment_set(), etk_iconbox_append(), etk_iconbox_clear(), etk_iconbox_current_model_set(), etk_iconbox_icon_del(), etk_iconbox_icon_file_set(), etk_iconbox_icon_label_set(), etk_iconbox_icon_select(), etk_iconbox_icon_unselect(), etk_iconbox_model_geometry_set(), etk_iconbox_model_icon_geometry_set(), etk_iconbox_model_label_geometry_set(), etk_iconbox_select_all(), etk_iconbox_thaw(), etk_iconbox_unselect_all(), etk_image_aspect_ratio_set(), etk_image_keep_aspect_set(), etk_label_alignment_set(), etk_paned_position_set(), etk_scrolled_view_policy_set(), etk_tree_alternating_row_colors_set(), etk_tree_clear(), etk_tree_col_alignment_set(), etk_tree_col_expand_set(), etk_tree_col_position_set(), etk_tree_col_sort_full(), etk_tree_col_visible_set(), etk_tree_col_width_set(), etk_tree_column_separators_visible_set(), etk_tree_headers_visible_set(), etk_tree_model_image_width_set(), etk_tree_row_delete(), etk_tree_row_fields_set_valist(), etk_tree_row_fold(), etk_tree_row_insert_valist(), etk_tree_row_model_fields_set_valist(), etk_tree_row_unfold(), etk_tree_row_unselect(), etk_tree_rows_height_set(), etk_tree_select_all(), etk_tree_thaw(), etk_tree_unselect_all(), and etk_widget_has_event_object_set().

void etk_widget_size_request_set ( Etk_Widget *  widget,
int  w,
int  h 
)

Sets the size-request of the widget. Use this function to request Etk to resize the widget to the given size.
It does not mean the widget will be allocated this size: in some cases, the widget may be allocated less than its size-request, and often the allocated size can be larger than the size-request (if the widget expands for example).
You can use this function to force a widget to be smaller or larger than its default size.

Parameters:
widget a widget
w the width to request (-1 will make Etk calculate it automatically)
h the height to request (-1 will make Etk calculate it automatically)
Note:
The padding values will be added to the final size-request

References ETK_OBJECT, etk_object_notify(), etk_widget_size_recalc_queue(), Etk_Size::h, requested_size, and Etk_Size::w.

void etk_widget_size_request ( Etk_Widget *  widget,
Etk_Size *  size_requisition 
)

Calculates the size-request of the widget.

Parameters:
widget a widget
size_requisition the location where to store the requested size
Note:
etk_widget_size_request_full(widget, size_request) is equivalent to etk_widget_size_request_full(widget, size_request, ETK_TRUE)

This function is mainly used in widget implementations, you usually don't have to call it yourself

References etk_widget_size_request_full().

Referenced by etk_container_child_space_fill().

void etk_widget_size_request_full ( Etk_Widget *  widget,
Etk_Size *  size_requisition,
Etk_Bool  hidden_has_no_size 
)

Calculates the size-request of the widget.

Parameters:
widget a widget
size_requisition the location where to store the ideal size
hidden_has_no_size if hidden_has_no_size is ETK_TRUE, then if the widget is hidden, the returned size will be 0x0. If it is ETK_FALSE, the size-request will be calculated even if the widget is hidden
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References bottom, content_object, ETK_MAX, ETK_OBJECT, etk_signal_emit(), Etk_Size::h, inset, last_calced_size, left, need_size_recalc, padding, realized, requested_size, right, size_request, top, visible, and Etk_Size::w.

Referenced by etk_popup_window_popup_at_xy(), etk_popup_window_popup_at_xy_in_direction(), and etk_widget_size_request().

void etk_widget_size_allocate ( Etk_Widget *  widget,
Etk_Geometry  geometry 
)

Moves and resizes the widget to the given geometry.

Parameters:
widget a widget
geometry the geometry the widget should occupy. The position should be relative to the Evas where the widget is drawn.
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References Etk_Geometry::h, need_redraw, smart_object, swallowed, Etk_Geometry::w, Etk_Geometry::x, and Etk_Geometry::y.

void etk_widget_theme_signal_emit ( Etk_Widget *  widget,
const char *  signal_name,
Etk_Bool  size_recalc 
)

Sends a signal to the theme-object of the widget.

Parameters:
widget a widget
signal_name the signal to send
size_recalc if size_recalc is ETK_TRUE, etk_widget_size_recalc_queue() will be called on the widget. So, if the emitted signal is likely to change the size of the widget, size_recalc has to be set to ETK_TRUE. Otherwise it should be set to ETK_FALSE
Note:
The widget has to be realized, otherwise it will have no effect

This function is mainly used in widget implementations, you usually don't have to call it yourself

See also:
edje_object_signal_emit()

References etk_widget_size_recalc_queue(), need_theme_size_recalc, theme_object, and theme_signal_emit.

Referenced by etk_frame_label_set(), etk_menu_item_image_set(), etk_menu_item_submenu_set(), etk_slider_inverted_set(), etk_slider_label_set(), and etk_statusbar_has_resize_grip_set().

void etk_widget_theme_part_text_set ( Etk_Widget *  widget,
const char *  part_name,
const char *  text 
)

Sets the text of a text-part of the widget's theme-object.

Parameters:
widget a widget
part_name the name of the text-part
text the text to set
Note:
The widget has to be realized, otherwise it will have no effect

etk_widget_size_recalc_queue() is automatically called on the widget

This function is mainly used in widget implementations, you usually don't have to call it yourself

See also:
edje_object_part_text_set()

References etk_widget_size_recalc_queue(), need_theme_size_recalc, and theme_object.

Referenced by etk_frame_label_set(), etk_label_set(), etk_mdi_window_title_set(), and etk_menu_item_label_set().

int etk_widget_theme_data_get ( Etk_Widget *  widget,
const char *  data_name,
const char *  format,
  ... 
)

Gets the data called data_name from the theme of the widget.

Parameters:
widget a widget
data_name the name of the data you want to get
format the format of the data. Same format as the format of sscanf()
... the location of the variables where to store the values
Returns:
Returns the number of the input items successfully matched and assigned, same as sscanf
Note:
The widget has to be realized, otherwise it will have no effect

This function is mainly used in widget implementations, you usually don't have to call it yourself

See also:
edje_object_data_get()

References theme_object.

Etk_Bool etk_widget_member_object_add ( Etk_Widget *  widget,
Evas_Object *  object 
)

Adds an evas object to the list of member-objects of the widget.
A member-object is an object which is automatically shown/hidden when the widget is shown/hidden, which is clipped against the clip-object of the widget, and which is used by the widget to receive the mouse events. A member-object is also stacked on the same level as the widget.
The object will be automatically deleted when the object is unrealized, unless you remove it from the list with etk_widget_member_object_del() before the widget is unrealized.

Parameters:
widget a widget
object the evas object to add
Returns:
Returns ETK_TRUE on success. ETK_FALSE on failure, probably because the widget and the object do not belong to the same evas, or because the widget is not realized yet
Note:
The object has to belong to the same evas as the widget

This function is mainly used in widget implementations, you usually don't have to call it yourself

References ETK_WIDGET, etk_widget_member_object_del(), etk_widget_toplevel_evas_get(), etk_widget_unswallow_object(), member_objects, and realized.

void etk_widget_member_object_del ( Etk_Widget *  widget,
Evas_Object *  object 
)

Removes an evas object from the list of member-objects of the widget. See etk_widget_member_object_add() for more info about member-objects.

Parameters:
widget a widget
object the evas object to remove
Note:
The object will still be displayed on the Evas after this call

This function is mainly used in widget implementations, you usually don't have to call it yourself

See also:
etk_widget_member_object_add()

References clip, and member_objects.

Referenced by etk_widget_member_object_add().

void etk_widget_member_object_raise ( Etk_Widget *  widget,
Evas_Object *  object 
)

Stacks object above all the other member-objects of the widget.

Parameters:
widget a widget
object the object to raise
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

void etk_widget_member_object_lower ( Etk_Widget *  widget,
Evas_Object *  object 
)

Stacks object below all the other member-objects of the widget.

Parameters:
widget a widget
object the object to lower
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References content_object, event_object, and theme_object.

void etk_widget_member_object_stack_above ( Etk_Widget *  widget,
Evas_Object *  object,
Evas_Object *  above 
)

Stacks the member-object object above the member-object above.

Parameters:
widget a widget
object the object to restack
above the object above which object will be stacked
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

void etk_widget_member_object_stack_below ( Etk_Widget *  widget,
Evas_Object *  object,
Evas_Object *  below 
)

Stacks the member-object object below the member-object below.

Parameters:
widget a widget
object the object to restack
below the object below which object will be stacked
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

Etk_Bool etk_widget_swallow_widget ( Etk_Widget *  swallower,
const char *  part,
Etk_Widget *  to_swallow 
)

Makes the widget swallow another widget in a part of its theme-object.

Parameters:
swallower the widget that will swallow the widget to_swallow. swallower has to be realized and its theme-object should have a part called part
part the name of the part of the theme-object in which to_swallow should be swallowed
to_swallow the widget to swallow. to_swallow has to be a child of swallower
Returns:
Returns ETK_TRUE on success, ETK_FALSE on failure (it may occur if swallower is not realized, if the part doesn't exist or if to_swallow is not a child of swallower)
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References ETK_SWALLOW_ERROR_INCOMPATIBLE_PARENT, ETK_SWALLOW_ERROR_NO_PART, ETK_SWALLOW_ERROR_NO_THEME_OBJECT, ETK_SWALLOW_ERROR_NONE, etk_widget_unswallow_widget(), parent, smart_object, swallowed, and theme_object.

Referenced by etk_menu_item_image_set().

void etk_widget_unswallow_widget ( Etk_Widget *  swallower,
Etk_Widget *  swallowed 
)

Makes the widget swallower unswallow another widget.

Parameters:
swallower the widget that is currently swallowing swallowed
swallowed the widget currently swallowed by swallower, and which should be unswallowed
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References swallowed_objects.

Referenced by etk_widget_parent_set(), and etk_widget_swallow_widget().

Etk_Bool etk_widget_is_swallowed ( Etk_Widget *  widget  ) 

Checks if the widget is swallowed by its parent.

Returns:
Returns ETK_TRUE if the widget is swallowed by its parent
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References swallowed.

Etk_Bool etk_widget_swallow_object ( Etk_Widget *  swallower,
const char *  part,
Evas_Object *  to_swallow 
)

Makes the widget swallow an Evas_Object in a part of its theme-object.

Parameters:
swallower the widget that will swallow the object to_swallow. swallower has to be realized and to have a theme-object
part the name of the part of the theme-object in which to_swallow should be swallowed
to_swallow the Evas_Object to swallow
Returns:
Returns ETK_TRUE on success, ETK_FALSE on failure (it may occur if swallower is not realized or if the part doesn't exist)
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References ETK_SWALLOW_ERROR_NO_PART, ETK_SWALLOW_ERROR_NO_THEME_OBJECT, ETK_SWALLOW_ERROR_NONE, and theme_object.

void etk_widget_unswallow_object ( Etk_Widget *  swallower,
Evas_Object *  object 
)

Makes the widget unswallow an Evas_Object.

Parameters:
swallower the widget that currently swallow object
object the Evas_Object currently swallowed by swallower, and that you want to be unswallowed
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References swallowed_objects.

Referenced by etk_widget_member_object_add().

Etk_Widget_Swallow_Error etk_widget_swallow_error_get ( void   ) 

Gets the code corresponding to the error that occurs during the last call of etk_widget_swallow_widget() or etk_widget_swallow_object().

Returns:
Returns the error code
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

void etk_widget_clip_set ( Etk_Widget *  widget,
Evas_Object *  clip 
)

Sets the clip-object of the widget. The theme-object and the member-objects of the widget will be automatically clipped against clip.

Parameters:
widget a widget
clip the clip-object to set
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References clip, etk_widget_clip_unset(), and smart_object.

Referenced by etk_canvas_put(), and etk_mdi_area_put().

void etk_widget_clip_unset ( Etk_Widget *  widget  ) 

Unsets the clip-object of the widget. The theme-object and the member-objects won't be clipped anymore.

Parameters:
widget a widget
Returns:
Returns the clip-object of the widget
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References clip, and smart_object.

Referenced by etk_widget_clip_set(), and etk_widget_parent_set().

Evas_Object * etk_widget_clip_get ( Etk_Widget *  widget  ) 

Gets the clip-object of the widget.

Parameters:
widget a widget
Returns:
Returns the clip-object of the widget
Note:
This function is mainly used in widget implementations, you usually don't have to call it yourself

References clip.

void etk_widget_dnd_dest_set ( Etk_Widget *  widget,
Etk_Bool  on 
)

Sets whether the widget is dnd destination.

Parameters:
widget a widget
on ETK_TRUE to enable this widget as a dnd destination, ETK_FALSE to disable it

Etk_Bool etk_widget_dnd_dest_get ( Etk_Widget *  widget  ) 

Checks whether the widget is a dnd destination.

Parameters:
widget a widget
Returns:
Returns ETK_TRUE if the widget is a dnd destination, ETK_FALSE otherwise

void etk_widget_dnd_source_set ( Etk_Widget *  widget,
Etk_Bool  on 
)

Sets whether the widget is dnd source.

Parameters:
widget a widget
on ETK_TRUE to enable this widget as a dnd source, ETK_FALSE to disable it

Etk_Bool etk_widget_dnd_source_get ( Etk_Widget *  widget  ) 

Checks whether the widget is a dnd source.

Parameters:
widget a widget
Returns:
Returns ETK_TRUE if the widget is a dnd source, ETK_FALSE otherwise

void etk_widget_dnd_internal_set ( Etk_Widget *  widget,
Etk_Bool  on 
)

Set whether the widget wants to handle its own dnd or not.

Parameters:
widget a widget
on ETK_TRUE if the widget handles its own dnd, ETK_FALSE otherwise

Etk_Bool etk_widget_dnd_internal_get ( Etk_Widget *  widget  ) 

Checks whether the widget wants to handle its own dnd or not.

Parameters:
widget a widget
Returns:
Returns ETK_TRUE if the widget handles its own dnd, ETK_FALSE otherwise

void etk_widget_dnd_drag_widget_set ( Etk_Widget *  widget,
Etk_Widget *  drag_widget 
)

Sets the visual data for the drag (the widget to be displayed).

Parameters:
widget a widget
drag_widget the widget that will appear in the drag window

Etk_Widget * etk_widget_dnd_drag_widget_get ( Etk_Widget *  widget  ) 

Gets the visual data for the drag (the widget to be displayed).

Parameters:
widget a widget
Returns:
Returns the widget that will appear in the drag window

void etk_widget_dnd_types_set ( Etk_Widget *  widget,
const char **  types,
int  num 
)

Sets the possible types for dnd.

Parameters:
widget a widget
types list of acceptable types
num number of types

const char ** etk_widget_dnd_types_get ( Etk_Widget *  widget,
int *  num 
)

Gets the possible types for dnd.

Parameters:
widget a widget
num number of types that the widget has
Returns:
returns the dnd types this widget supports

Evas_List * etk_widget_dnd_dest_widgets_get ( void   ) 

Gets the list of the widgets that are dnd destinations.

Returns:
Returns the list of the dnd destination widgets