rendered paste bodystuct Ewl_Stock_Funcs
{
struct
{
void (*txt)(Ewl_Stock *s, const char *txt);
void (*alt_txt)(Ewl_Stock *s, const char *txt);
void (*tooltip)(Ewl_Stock *s, const char *tooltip);
void (*img)(Ewl_Stock *s, const char *path, const char *key);
} set;
struct
{
const char *(*txt)(Ewl_Stock *s);
const char *(*alt_txt)(Ewl_Stock *s);
const char *(*tooltip)(Ewl_Stock *s);
const char *(*img_path)(Ewl_Stock *s);
const char *(*img_name)(Ewl_Stock *s);
} get;
};
stuct Ewl_Stock
{
Ewl_Box b;
Ewl_Stock_Funcs *funcs;
};
void ewl_stock_text_cb_set(Ewl_Stock *s, void (*set_txt)(Ewl_Stock *s, const char *txt));
void ewl_stock_image_cb_set(Ewl_Stock *s, void (*set_txt)(Ewl_Stock *s, const char *path, const char *key))
-----------------------
Ewl_Button
{
Ewl_Stock s;
Ewl_Label *label;
}
b = ewl_button_new();
ewl_stock_text_cb_set(EWL_STOCK(b), ewl_button_cb_set_stocK_text);
ewl_stock_image_cb_set(EWL_STOCK(b), ewl_button_cb_set_stock_iamge);