Download

Support

lib/ewl_combo.h

Go to the documentation of this file.
00001 /* vim: set sw=8 ts=8 sts=8 expandtab: */
00002 #ifndef EWL_COMBO_H
00003 #define EWL_COMBO_H
00004 
00005 #include "ewl_mvc.h"
00006 #include "ewl_cell.h"
00007 
00030 #define EWL_COMBO_TYPE "combo"
00031 
00036 #define EWL_COMBO_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_COMBO_TYPE))
00037 
00042 typedef struct Ewl_Combo Ewl_Combo;
00043 
00048 #define EWL_COMBO(combo) ((Ewl_Combo *) combo)
00049 
00053 struct Ewl_Combo
00054 {
00055         Ewl_MVC mvc; 
00057         Ewl_Widget *popup;         
00058         Ewl_Widget *button;         
00059         Ewl_Widget *header;         
00060         unsigned char editable:1; 
00061         unsigned char scrollable:1; 
00062 };
00063 
00064 Ewl_Widget         *ewl_combo_new(void);
00065 int                 ewl_combo_init(Ewl_Combo *combo);
00066 
00067 void                 ewl_combo_editable_set(Ewl_Combo *combo,
00068                                                 unsigned int editable);
00069 unsigned int         ewl_combo_editable_get(Ewl_Combo *combo);
00070 void                 ewl_combo_scrollable_set(Ewl_Combo *combo,
00071                                                 unsigned int scrollable);
00072 unsigned int         ewl_combo_scrollable_get(Ewl_Combo *combo);
00073 
00074 void                 ewl_combo_popup_container_set(Ewl_Combo *combo,
00075                                                 Ewl_Container *c);
00076 
00077 
00078 /*
00079  * Internally used callbacks, override at your own risk.
00080  */
00081 void ewl_combo_cb_decrement_clicked(Ewl_Widget *w, void *ev, void *data);
00082 void ewl_combo_cb_popup_hide(Ewl_Widget *w, void *ev, void *data);
00083 
00084 /*
00085  * Ewl_Combo_Cell
00086  */
00087 
00092 #define EWL_COMBO_CELL_TYPE "combo_cell"
00093 
00098 #define EWL_COMBO_CELL_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_COMBO_CELL_TYPE))
00099 
00103 typedef struct Ewl_Combo_Cell Ewl_Combo_Cell;
00104 
00109 #define EWL_COMBO_CELL(c) ((Ewl_Combo_Cell *)c)
00110 
00114 struct Ewl_Combo_Cell
00115 {
00116         Ewl_Cell cell;                
00117         Ewl_Combo *combo;        
00118         const Ewl_Model *model;        
00120         void *mvc_data;                
00122 };
00123 
00124 Ewl_Widget        *ewl_combo_cell_new(void);
00125 int                 ewl_combo_cell_init(Ewl_Combo_Cell *c);
00126 void                 ewl_combo_cell_combo_set(Ewl_Combo_Cell *c, Ewl_Combo *combo);
00127 Ewl_Combo        *ewl_combo_cell_combo_get(Ewl_Combo_Cell *c);
00128 
00129 void                 ewl_combo_cell_model_set(Ewl_Combo_Cell *c, 
00130                                                 const Ewl_Model *model);
00131 const Ewl_Model        *ewl_combo_cell_model_get(Ewl_Combo_Cell *c);
00132 
00133 void                 ewl_combo_cell_data_set(Ewl_Combo_Cell *c, void *mvc_data);
00134 void                *ewl_combo_cell_data_get(Ewl_Combo_Cell *c);
00135 
00139 void ewl_combo_cell_cb_clicked(Ewl_Widget *w, void *ev, void *data);
00140 
00141 #endif

Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sat May 17 16:49:03 2008