All pastes #259575 Raw Edit

Stuff

public text v1 · immutable
#259575 ·published 2006-11-27 15:58 UTC
rendered paste body
Ewl_Stock
{
   Ewl_Box b;

   void (*set_txt)(Ewl_Stock *s, const char *txt);
   void (*set_alt_txt)(Ewl_Stock *s, const char *txt);
   void (*set_tooltip)(Ewl_Stock *s, const char *tooltip);
   void (*set_img)(Ewl_Stock *s, const char *path, const char *key);

   const char *(*get_txt)(Ewl_Stock *s);
   const char *(*get_alt_txt)(Ewl_Stock *s);
   const char *(*get_tooltip)(Ewl_Stock *s);
   const char *(*get_img_path)(Ewl_Stock *s);
   const char *(*get_img_name)(Ewl_Stock *s);
};

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);