Ewl_Stock: The Stock
Detailed Description
The stock class is an abstact class to provide the stock feature of buttons and icons in a common place. This class inherits from the Ewl_Box to allow for placing any other widget inside the stock.
- Remarks:
- Inherits from Ewl_Box.
Data Structures | |
struct | Ewl_Stock |
Inherits from Ewl_Box and provides the base for the other stock icons. More... | |
struct | Ewl_Stock_Funcs |
The function callbacks that an inheriting widget needs to implement. More... | |
Defines | |
#define | EWL_STOCK(stock) ((Ewl_Stock *) stock) |
#define | EWL_STOCK_IMAGE_SET(f) ((Ewl_Stock_Image_Set)f) |
#define | EWL_STOCK_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_STOCK_TYPE)) |
#define | EWL_STOCK_LABEL_SET(f) ((Ewl_Stock_Label_Set)f) |
#define | EWL_STOCK_TYPE "stock" |
Typedefs | |
typedef Ewl_Stock | Ewl_Stock |
typedef Ewl_Stock_Funcs | Ewl_Stock_Funcs |
typedef void(*) | Ewl_Stock_Image_Set (Ewl_Stock *s, const char *file, const char *key) |
typedef void(*) | Ewl_Stock_Label_Set (Ewl_Stock *s, const char *txt) |
Functions | |
void | ewl_stock_functions_set (Ewl_Stock *s, const Ewl_Stock_Funcs *const funcs) |
int | ewl_stock_init (Ewl_Stock *s) |
Initialize the stock widget and inherited fields. | |
Ewl_Stock_Type | ewl_stock_type_get (Ewl_Stock *s) |
Get the stock type in use. | |
void | ewl_stock_type_set (Ewl_Stock *s, Ewl_Stock_Type stock) |
Set the type of the stock to use. |
Define Documentation
#define EWL_STOCK_IMAGE_SET | ( | f | ) | ((Ewl_Stock_Image_Set)f) |
Typecasts a pointer to an image set pointer
#define EWL_STOCK_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_STOCK_TYPE)) |
Returns TRUE if the widget is an Ewl_Stock, FALSE otherwise
#define EWL_STOCK_LABEL_SET | ( | f | ) | ((Ewl_Stock_Label_Set)f) |
Typecasts a pointer to a label set pointer
#define EWL_STOCK_TYPE "stock" |
The type name for the Ewl_Stock widget
Typedef Documentation
typedef struct Ewl_Stock_Funcs Ewl_Stock_Funcs |
typedef void(*) Ewl_Stock_Image_Set(Ewl_Stock *s, const char *file, const char *key) |
The image set function definition
typedef void(*) Ewl_Stock_Label_Set(Ewl_Stock *s, const char *txt) |
The label set function definition
Function Documentation
void ewl_stock_functions_set | ( | Ewl_Stock * | s, | |
const Ewl_Stock_Funcs *const | funcs | |||
) |
int ewl_stock_init | ( | Ewl_Stock * | s | ) |
Initialize the stock widget and inherited fields.
- Parameters:
-
s,: the stock widget to initialize
- Returns:
- Returns TRUE on success, FALSE on failure.
Ewl_Stock_Type ewl_stock_type_get | ( | Ewl_Stock * | s | ) |
Get the stock type in use.
- Parameters:
-
s,: The stock widget to get the stock type from
- Returns:
- Returns the Ewl_Stock_Type of the stock widget
void ewl_stock_type_set | ( | Ewl_Stock * | s, | |
Ewl_Stock_Type | stock | |||
) |
Set the type of the stock to use.
- Parameters:
-
s,: The stock to set the stock type on stock,: The Ewl_Stock_Type to set on the stock widget
- Returns:
- Returns no value.