lib/ewl_button.h
Go to the documentation of this file.00001
00002 #ifndef EWL_BUTTON_H
00003 #define EWL_BUTTON_H
00004
00005 #include "ewl_stock.h"
00006
00029 #define EWL_BUTTON_TYPE "button"
00030
00035 #define EWL_BUTTON_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_BUTTON_TYPE))
00036
00041 typedef struct Ewl_Button Ewl_Button;
00042
00047 #define EWL_BUTTON(button) ((Ewl_Button *) button)
00048
00055 struct Ewl_Button
00056 {
00057 Ewl_Stock stock;
00058 Ewl_Widget *body;
00059 Ewl_Widget *label_object;
00060 Ewl_Widget *image_object;
00061 };
00062
00063 Ewl_Widget *ewl_button_new(void);
00064 int ewl_button_init(Ewl_Button *b);
00065
00066 void ewl_button_label_set(Ewl_Button *b, const char *l);
00067 const char *ewl_button_label_get(Ewl_Button *b);
00068
00069 void ewl_button_image_set(Ewl_Button *b, const char *file, const char *key);
00070 const char *ewl_button_image_get(Ewl_Button *b);
00071
00072 void ewl_button_image_size_set(Ewl_Button *b, int width, int height);
00073 void ewl_button_image_size_get(Ewl_Button *b, int *width, int *height);
00074
00075 unsigned int ewl_button_alignment_get(Ewl_Button *b);
00076 void ewl_button_alignment_set(Ewl_Button *b, unsigned int align);
00077
00078 unsigned int ewl_button_fill_policy_get(Ewl_Button *b);
00079 void ewl_button_fill_policy_set(Ewl_Button *b, unsigned int fill);
00080
00081
00082
00083
00084 void ewl_button_cb_key_down(Ewl_Widget *w, void *ev, void *data);
00085
00090 #endif
00091