Download

Support

Ewl_Icon: An icon widget


Detailed Description

Describes a widget to layout and manipulate icons.

Remarks:
Inherits from Ewl_Stock.

Tutorial


Data Structures

struct  Ewl_Icon
 Inherits from Ewl_Stock and extends to provide for an icon layout. More...

Defines

#define EWL_ICON(icon)   ((Ewl_Icon *)icon)
#define EWL_ICON_IS(w)   (ewl_widget_type_is(EWL_WIDGET(w), EWL_ICON_TYPE))
#define EWL_ICON_TYPE   "icon"

Typedefs

typedef struct Ewl_Icon Ewl_Icon

Functions

const char * ewl_icon_alt_text_get (Ewl_Icon *icon)
 Retrieves the alternate text set on the icon.
void ewl_icon_alt_text_set (Ewl_Icon *icon, const char *txt)
 Sets the given text as the alternate text for the icon.
void ewl_icon_cb_destroy (Ewl_Widget *w, void *ev, void *data)
unsigned int ewl_icon_constrain_get (Ewl_Icon *icon)
 Retrieve the constrain value set on the icon.
void ewl_icon_constrain_set (Ewl_Icon *icon, unsigned int val)
 Set the constrain value on the icon.
unsigned int ewl_icon_editable_get (Ewl_Icon *icon)
 Retrieve if the icon is editable or not.
void ewl_icon_editable_set (Ewl_Icon *icon, unsigned int e)
 Set if the icon is editable or not.
Ewl_Widgetewl_icon_extended_data_get (Ewl_Icon *icon)
 Retrieve the extended data from the icon.
void ewl_icon_extended_data_set (Ewl_Icon *icon, Ewl_Widget *ext)
 Set the extended data into the icon.
const char * ewl_icon_image_file_get (Ewl_Icon *icon)
 Retrieve the image to used in the icon.
void ewl_icon_image_set (Ewl_Icon *icon, const char *file, const char *key)
 set the image to use in the icon
int ewl_icon_init (Ewl_Icon *icon)
 Initializes the given Ewl_Icon widget.
unsigned int ewl_icon_label_complex_get (Ewl_Icon *icon)
 Retrieve if the icon has a complex label or not.
void ewl_icon_label_complex_set (Ewl_Icon *icon, unsigned int complex_label)
 Set if the icon use a label or a text widget for the label part.
unsigned int ewl_icon_label_compressed_get (Ewl_Icon *icon)
 Retrieves the current compressiion setting for the icon.
void ewl_icon_label_compressed_set (Ewl_Icon *icon, unsigned int compress)
 Sets the compressions setting for the icon to the given value.
const char * ewl_icon_label_get (Ewl_Icon *icon)
 Retrieve the label from the icon.
void ewl_icon_label_set (Ewl_Icon *icon, const char *label)
 Set the label of the icon.
Ewl_Widgetewl_icon_new (void)
 Creates and initializes a new Ewl_Icon widget.
void ewl_icon_part_hide (Ewl_Icon *icon, Ewl_Icon_Part part)
 Hide the given part of the icon. Note: You can only hide one part.
Ewl_Widgetewl_icon_simple_new (void)
 Creates and initializes a new Ewl_Icon widget.
unsigned int ewl_icon_thumbnailing_get (Ewl_Icon *icon)
 Retrieve if the icon use thumbnailing.
void ewl_icon_thumbnailing_set (Ewl_Icon *icon, unsigned int thumb)
 Set if the icon thumbnailed the image or use it directly.
Ewl_Icon_Type ewl_icon_type_get (Ewl_Icon *icon)
 Retrieve the type of the icon.
void ewl_icon_type_set (Ewl_Icon *icon, Ewl_Icon_Type type)
 Set the type of the icon.

Define Documentation

#define EWL_ICON_IS (  )     (ewl_widget_type_is(EWL_WIDGET(w), EWL_ICON_TYPE))

Returns TRUE if the widget is an Ewl_Icon, FALSE otherwise

Referenced by ewl_toolbar_cb_child_add(), and ewl_toolbar_icon_part_hide().


Typedef Documentation

typedef struct Ewl_Icon Ewl_Icon

A widget to display and manipluate an icon


Function Documentation

const char* ewl_icon_alt_text_get ( Ewl_Icon icon  ) 

Retrieves the alternate text set on the icon.

Parameters:
icon,: The icon to work with
Returns:
Returns the alternate text set on the icon

References alt, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_ICON_TYPE, EWL_LABEL, and ewl_label_text_get().

void ewl_icon_alt_text_set ( Ewl_Icon icon,
const char *  txt 
)

void ewl_icon_cb_destroy ( Ewl_Widget w,
void *  ev,
void *  data 
)

unsigned int ewl_icon_constrain_get ( Ewl_Icon icon  ) 

Retrieve the constrain value set on the icon.

Parameters:
icon,: The icon to get the constrain from
Returns:
Returns the current constrain value of the icon

References constrain, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, and EWL_ICON_TYPE.

void ewl_icon_constrain_set ( Ewl_Icon icon,
unsigned int  val 
)

Set the constrain value on the icon.

Parameters:
icon,: The Ewl_Icon to constrain
val,: The val to constrain too
Returns:
Returns no value.

References constrain, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_ICON_TYPE, EWL_IMAGE, ewl_image_constrain_set(), and image.

Referenced by ewl_filelist_view_widget_fetch(), and ewl_icon_image_set().

unsigned int ewl_icon_editable_get ( Ewl_Icon icon  ) 

Retrieve if the icon is editable or not.

Parameters:
icon,: The icon to check if it's editable
Returns:
Returns TRUE if the icon is editable, FALSE otherwise

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, editable, and EWL_ICON_TYPE.

void ewl_icon_editable_set ( Ewl_Icon icon,
unsigned int  e 
)

Set if the icon is editable or not.

Parameters:
icon,: The icon to set if it is editable or not
e,: The value to set as the editable flag
Returns:
Returns no value.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, editable, ewl_callback_append(), ewl_callback_del(), EWL_CALLBACK_MOUSE_DOWN, EWL_ICON_TYPE, and label.

Referenced by ewl_icon_simple_new().

Ewl_Widget* ewl_icon_extended_data_get ( Ewl_Icon icon  ) 

Retrieve the extended data from the icon.

Parameters:
icon,: The icon to get the extended data from
Returns:
Returns the extended data on the icon, or NULL if none set

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_ICON_TYPE, and extended.

void ewl_icon_extended_data_set ( Ewl_Icon icon,
Ewl_Widget ext 
)

Set the extended data into the icon.

Parameters:
icon,: The icon to set the extended data into
ext,: The extended data to set in the icon
Returns:
Returns no value
Note:
The widget passed in here becomes internal to the icon, you should not delete it after this. You can pack widgets as needed but the icon will handle the show/hide of the widget after this

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_container_child_append(), EWL_ICON_TYPE, EWL_ICON_TYPE_SHORT, ewl_widget_destroy(), ewl_widget_hide(), ewl_widget_internal_set(), ewl_widget_show(), extended, and type.

Referenced by ewl_filelist_selected_file_preview_get().

const char* ewl_icon_image_file_get ( Ewl_Icon icon  ) 

Retrieve the image to used in the icon.

Parameters:
icon,: The Ewl_Icon to get the image file from
Returns:
Returns the image file associated with this icon, or NULL if none.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_ICON_TYPE, EWL_IMAGE, ewl_image_file_path_get(), and image.

Referenced by ewl_icon_alt_text_set().

unsigned int ewl_icon_label_complex_get ( Ewl_Icon icon  ) 

Retrieve if the icon has a complex label or not.

Parameters:
icon,: The icon to check if its label is complex
Returns:
Returns TRUE if the label is complex, FALSE otherwise

References complex_label, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, and EWL_ICON_TYPE.

void ewl_icon_label_complex_set ( Ewl_Icon icon,
unsigned int  c 
)

Set if the icon use a label or a text widget for the label part.

Parameters:
icon,: The icon to set if it has a complex label or not
c,: The value to set as the complex flag
Returns:
Returns no value.

References complex_label, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_ICON_TYPE, ewl_widget_destroy(), and label.

Referenced by ewl_icon_simple_new().

unsigned int ewl_icon_label_compressed_get ( Ewl_Icon icon  ) 

Retrieves the current compressiion setting for the icon.

Parameters:
icon,: The ewl_icon to work with
Returns:
Returns the current compression setting for the icon

References compress_label, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, and EWL_ICON_TYPE.

void ewl_icon_label_compressed_set ( Ewl_Icon icon,
unsigned int  compress 
)

Sets the compressions setting for the icon to the given value.

Parameters:
icon,: The icon to work with
compress,: The compression setting to use
Returns:
Returns no value

References compress_label, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, and EWL_ICON_TYPE.

Referenced by ewl_icon_simple_new().

const char* ewl_icon_label_get ( Ewl_Icon icon  ) 

Retrieve the label from the icon.

Parameters:
icon,: The icon to get the label from
Returns:
Returns the icons label or NULL if none set

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_ICON_TYPE, label, and label_text.

void ewl_icon_label_set ( Ewl_Icon icon,
const char *  label 
)

Set the label of the icon.

Parameters:
icon,: The icon to set the label onto
label,: The label to set on the icon
Returns:
Returns no value

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_ICON_TYPE, IF_FREE, label, and label_text.

Referenced by ewl_filelist_multi_select_preview_get(), ewl_filelist_selected_file_preview_get(), and ewl_filelist_view_widget_fetch().

Ewl_Widget* ewl_icon_new ( void   ) 

Creates and initializes a new Ewl_Icon widget.

Returns:
Returns a new Ewl_Icon widget, or NULL on failure

References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_ICON, ewl_icon_init(), ewl_widget_destroy(), and NEW.

Referenced by ewl_calendar_init(), ewl_filelist_selected_file_preview_get(), ewl_filepicker_init(), and ewl_icon_simple_new().

void ewl_icon_part_hide ( Ewl_Icon icon,
Ewl_Icon_Part  part 
)

Hide the given part of the icon. Note: You can only hide one part.

Parameters:
icon,: The icon to set the part to hide of
part,: The part to hide
Returns:
Returns no value.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_ICON_TYPE, and hidden.

Referenced by ewl_toolbar_cb_child_add(), and ewl_toolbar_icon_part_hide().

Ewl_Widget* ewl_icon_simple_new ( void   ) 

Creates and initializes a new Ewl_Icon widget.

Returns:
Returns a new Ewl_Icon widget, or NULL on failure The difference to ewl_icon_new() is that it has lighter default values. The defaults are complex_label: no compressed_label: no editable: no thumbnailing: no

References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_ICON, ewl_icon_editable_set(), ewl_icon_label_complex_set(), ewl_icon_label_compressed_set(), ewl_icon_new(), and ewl_icon_thumbnailing_set().

Referenced by ewl_filelist_multi_select_preview_get(), and ewl_filelist_view_widget_fetch().

unsigned int ewl_icon_thumbnailing_get ( Ewl_Icon icon  ) 

Retrieve if the icon use thumbnailing.

Parameters:
icon,: The icon to check if it's thumbnails the image
Returns:
Returns TRUE if the label use thumbnailing, FALSE otherwise

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_ICON_TYPE, and thumbnailing.

void ewl_icon_thumbnailing_set ( Ewl_Icon icon,
unsigned int  t 
)

Set if the icon thumbnailed the image or use it directly.

Parameters:
icon,: The icon to set if the image gets thumbnailed
t,: The value to set as the thumbnail flag
Returns:
Returns no value.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_ICON_TYPE, and thumbnailing.

Referenced by ewl_icon_simple_new().

Ewl_Icon_Type ewl_icon_type_get ( Ewl_Icon icon  ) 

Retrieve the type of the icon.

Parameters:
icon,: The icon to get the type from
Returns:
Returns the Ewl_Icon_Type of the icon

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_ICON_TYPE, EWL_ICON_TYPE_SHORT, and type.

void ewl_icon_type_set ( Ewl_Icon icon,
Ewl_Icon_Type  type 
)

Set the type of the icon.

Parameters:
icon,: The icon to set the type of
type The type to set on this icon
Returns:
Returns no value.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_ICON_TYPE, EWL_ICON_TYPE_SHORT, ewl_widget_hide(), ewl_widget_show(), extended, and type.

Referenced by ewl_filelist_selected_file_preview_get().


Copyright © Enlightenment.org

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