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 #include "ewl_view.h"
00007
00030 #define EWL_BUTTON_TYPE "button"
00031
00036 #define EWL_BUTTON_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_BUTTON_TYPE))
00037
00042 typedef struct Ewl_Button Ewl_Button;
00043
00048 #define EWL_BUTTON(button) ((Ewl_Button *) button)
00049
00056 struct Ewl_Button
00057 {
00058 Ewl_Stock stock;
00059 Ewl_Widget *body;
00060 Ewl_Widget *label_object;
00061 Ewl_Widget *image_object;
00062 };
00063
00064 Ewl_Widget *ewl_button_new(void);
00065 int ewl_button_init(Ewl_Button *b);
00066 Ewl_View *ewl_button_view_get(void);
00067
00068 void ewl_button_label_set(Ewl_Button *b, const char *l);
00069 const char *ewl_button_label_get(Ewl_Button *b);
00070
00071 void ewl_button_image_set(Ewl_Button *b, const char *file, const char *key);
00072 const char *ewl_button_image_get(Ewl_Button *b);
00073
00074 void ewl_button_image_size_set(Ewl_Button *b, int width, int height);
00075 void ewl_button_image_size_get(Ewl_Button *b, int *width, int *height);
00076
00077 unsigned int ewl_button_alignment_get(Ewl_Button *b);
00078 void ewl_button_alignment_set(Ewl_Button *b, unsigned int align);
00079
00080 unsigned int ewl_button_fill_policy_get(Ewl_Button *b);
00081 void ewl_button_fill_policy_set(Ewl_Button *b, unsigned int fill);
00082
00083
00084
00085
00086 void ewl_button_cb_key_down(Ewl_Widget *w, void *ev, void *data);
00087
00092 #endif
00093