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 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.
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 ( icon   )     ((Ewl_Icon *)icon)

Typecasts a pointer to an Ewl_Icon pointer.

#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

#define EWL_ICON_TYPE   "icon"

The type name for the Ewl_Icon widget


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

void ewl_icon_alt_text_set ( Ewl_Icon icon,
const char *  txt 
)

Sets the given text as the alternate text for the icon.

Parameters:
icon,: The icon to work with
txt,: The text to set as the alternate text
Returns:
Returns no value

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

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.

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

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.

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

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

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.

void ewl_icon_image_set ( Ewl_Icon icon,
const char *  file,
const char *  key 
)

set the image to use in the icon

Parameters:
icon,: The Ewl_Icon to set the image into
file,: The file with the image
key,: The key inside the file if applicable
Returns:
Returns no value

int ewl_icon_init ( Ewl_Icon icon  ) 

Initializes the given Ewl_Icon widget.

Parameters:
icon,: The widget to initialize
Returns:
Returns TRUE on successful initialization, FALSE otherwise

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

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.

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

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

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

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

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

void ewl_icon_part_hide ( Ewl_Icon icon,
Ewl_Icon_Part  part 
)

Hide the given part of the icon.

Parameters:
icon,: The icon to set the part to hide of
part,: The part to hide
Returns:
Returns no value.
The give part of the icon will be hidden.

Note:
You can only hide one part.

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

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

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.

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

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.


Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sun Sep 27 01:49:46 2009