Download

Support

Ewl_Checkbutton: An Ewl_Checkbutton with Label


Detailed Description

Defines an Ewl_Checkbutton that inherits from Ewl_Widget and provides an Ewl_Check that changes value on each click.

Remarks:
Inherits from Ewl_Button.


Data Structures

struct  Ewl_Checkbutton
 Inherits from Ewl_Button and expands to provide a stateful check button. More...

Defines

#define EWL_CHECKBUTTON(button)   ((Ewl_Checkbutton *) button)
#define EWL_CHECKBUTTON_IS(w)   (ewl_widget_type_is(EWL_WIDGET(w), EWL_CHECKBUTTON_TYPE))
#define EWL_CHECKBUTTON_TYPE   "checkbutton"

Typedefs

typedef struct Ewl_Checkbutton Ewl_Checkbutton

Functions

void ewl_checkbutton_cb_clicked (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_checkbutton_checked_set (Ewl_Checkbutton *cb, int checked)
 Update the checked state of the check button.
int ewl_checkbutton_init (Ewl_Checkbutton *cb)
 Initialize the members and callbacks of a check button.
int ewl_checkbutton_is_checked (Ewl_Checkbutton *cb)
 Retrieve the checked state of a check button.
void ewl_checkbutton_label_position_set (Ewl_Checkbutton *cb, Ewl_Position p)
 Set the check buttons label position.
Ewl_Widgetewl_checkbutton_new (void)
 Allocate and initialize a new check button.
Ewl_Viewewl_checkbutton_view_get (void)
 Creates and returns a view to be used by Ewl_Checkbutton widgets.

Define Documentation

#define EWL_CHECKBUTTON_IS (  )     (ewl_widget_type_is(EWL_WIDGET(w), EWL_CHECKBUTTON_TYPE))

Returns TRUE if the widget is an Ewl_Checkbutton, FALSE otherwise

#define EWL_CHECKBUTTON_TYPE   "checkbutton"


Typedef Documentation

The button class is a basic button with a label. This class is inherited by the check button and radio button classes.


Function Documentation

void ewl_checkbutton_checked_set ( Ewl_Checkbutton cb,
int  c 
)

Update the checked state of the check button.

Parameters:
cb,: The checkbutton to set the checked value of
c,: The checked value to set
Returns:
Returns no value.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CHECK, ewl_check_checked_set(), EWL_CHECKBUTTON, and EWL_CHECKBUTTON_TYPE.

Referenced by ewl_colorpicker_init(), and ewl_radiobutton_cb_clicked().

int ewl_checkbutton_is_checked ( Ewl_Checkbutton cb  ) 

Retrieve the checked state of a check button.

Parameters:
cb,: The checkbutton to work with
Returns:
Returns TRUE if the checkbutton is set, FALSE otherwise

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_CHECK, ewl_check_is_checked(), EWL_CHECKBUTTON, and EWL_CHECKBUTTON_TYPE.

Referenced by ewl_radiobutton_cb_clicked(), and ewl_radiobutton_chain_selected_get().

void ewl_checkbutton_label_position_set ( Ewl_Checkbutton cb,
Ewl_Position  p 
)

Set the check buttons label position.

Parameters:
cb,: the widget to change the label positioning
p,: the new position of the label
Returns:
Returns no value. Changes the position of the label associated with the check button.

References check, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_BUTTON, EWL_CHECKBUTTON_TYPE, EWL_CONTAINER, ewl_container_child_append(), ewl_container_child_remove(), EWL_POSITION_RIGHT, EWL_WIDGET, ewl_widget_configure(), Ewl_Button::label_object, and label_position.

Ewl_Widget* ewl_checkbutton_new ( void   ) 

Allocate and initialize a new check button.

Returns:
Returns the newly allocated checkbutton on success, NULL on failure.

References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_checkbutton_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.

Ewl_View* ewl_checkbutton_view_get ( void   ) 

Creates and returns a view to be used by Ewl_Checkbutton widgets.

Returns:
Returns a view that can be used to display Ewl_Checkbutton widgets

References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_view_header_fetch_set(), ewl_view_new(), and ewl_view_widget_fetch_set().


Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sat May 17 16:51:08 2008