Download

Support

lib/ewl_notebook.h

Go to the documentation of this file.
00001 /* vim: set sw=8 ts=8 sts=8 expandtab: */
00002 #ifndef EWL_NOTEBOOK_H
00003 #define EWL_NOTEBOOK_H
00004 
00005 #include "ewl_box.h"
00006 
00032 #define EWL_NOTEBOOK_TYPE "notebook"
00033 
00038 #define EWL_NOTEBOOK_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_NOTEBOOK_TYPE))
00039 
00044 #define EWL_NOTEBOOK(n) ((Ewl_Notebook *)n)
00045 
00049 typedef struct Ewl_Notebook Ewl_Notebook;
00050 
00054 struct Ewl_Notebook
00055 {
00056         Ewl_Box box;                        
00058         struct {
00059                 Ewl_Widget *tabbar;        
00060                 Ewl_Widget *pages;        
00061         } body;                                
00063         Ewl_Widget *cur_page;                
00064         Ewl_Position tabbar_position;        
00065 };
00066 
00067 Ewl_Widget        *ewl_notebook_new(void);
00068 int                 ewl_notebook_init(Ewl_Notebook *n);
00069 
00070 void                 ewl_notebook_tabbar_alignment_set(Ewl_Notebook *n,
00071                                                 unsigned int align);
00072 unsigned int         ewl_notebook_tabbar_alignment_get(Ewl_Notebook *n);
00073 
00074 void                 ewl_notebook_tabbar_position_set(Ewl_Notebook *n,
00075                                                 Ewl_Position pos);
00076 Ewl_Position         ewl_notebook_tabbar_position_get(Ewl_Notebook *n);
00077 
00078 void                 ewl_notebook_tabbar_visible_set(Ewl_Notebook *n,
00079                                                 unsigned int visible);
00080 unsigned int          ewl_notebook_tabbar_visible_get(Ewl_Notebook *n);
00081 void                 ewl_notebook_tabbar_homogeneous_set(Ewl_Notebook *n,
00082                                                 unsigned int h);
00083 unsigned int         ewl_notebook_tabbar_homogeneous_get(Ewl_Notebook *n);
00084 
00085 void                 ewl_notebook_visible_page_set(Ewl_Notebook *n,
00086                                                 Ewl_Widget *page);
00087 Ewl_Widget        *ewl_notebook_visible_page_get(Ewl_Notebook *n);
00088 
00089 void                 ewl_notebook_page_tab_text_set(Ewl_Notebook *n,
00090                                                 Ewl_Widget *page,
00091                                                 const char *text);
00092 const char         *ewl_notebook_page_tab_text_get(Ewl_Notebook *n,
00093                                                 Ewl_Widget *page);
00094 
00095 void                 ewl_notebook_page_tab_widget_set(Ewl_Notebook *n,
00096                                                 Ewl_Widget *page,
00097                                                 Ewl_Widget *tab);
00098 Ewl_Widget        *ewl_notebook_page_tab_widget_get(Ewl_Notebook *n,
00099                                                 Ewl_Widget *page);
00100 
00101 /*
00102  * Internal stuff.
00103  */
00104 void ewl_notebook_cb_child_show(Ewl_Container *c, Ewl_Widget *w);
00105 void ewl_notebook_cb_child_hide(Ewl_Container *c, Ewl_Widget *w);
00106 void ewl_notebook_cb_child_add(Ewl_Container *c, Ewl_Widget *w);
00107 void ewl_notebook_cb_child_remove(Ewl_Container *c, Ewl_Widget *w, int rem_idx);
00108 
00109 void ewl_notebook_cb_tab_clicked(Ewl_Widget *w, void *ev, void *data);
00110 
00115 #endif
00116 

Copyright © Enlightenment.org

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