lib/ewl_checkbutton.h
Go to the documentation of this file.00001 /* vim: set sw=8 ts=8 sts=8 expandtab: */ 00002 #ifndef EWL_CHECKBUTTON_H 00003 #define EWL_CHECKBUTTON_H 00004 00005 #include "ewl_button.h" 00006 #include "ewl_view.h" 00007 00030 #define EWL_CHECKBUTTON_TYPE "checkbutton" 00031 00036 #define EWL_CHECKBUTTON_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_CHECKBUTTON_TYPE)) 00037 00042 typedef struct Ewl_Checkbutton Ewl_Checkbutton; 00043 00048 #define EWL_CHECKBUTTON(button) ((Ewl_Checkbutton *) button) 00049 00053 struct Ewl_Checkbutton 00054 { 00055 Ewl_Button button; 00056 Ewl_Position label_position; 00057 Ewl_Widget *check; 00058 }; 00059 00060 Ewl_Widget *ewl_checkbutton_new(void); 00061 int ewl_checkbutton_init(Ewl_Checkbutton *cb); 00062 00063 void ewl_checkbutton_checked_set(Ewl_Checkbutton *cb, int checked); 00064 int ewl_checkbutton_is_checked(Ewl_Checkbutton *cb); 00065 00066 void ewl_checkbutton_label_position_set(Ewl_Checkbutton *cb, 00067 Ewl_Position p); 00068 Ewl_View *ewl_checkbutton_view_get(void); 00069 00070 /* 00071 * Internally used callbacks, override at your own risk 00072 */ 00073 void ewl_checkbutton_cb_clicked(Ewl_Widget *w, void *ev_data, void *user_data); 00074 00079 #endif