Enlightenment CVS committal

Author  : codewarrior
Project : e17
Module  : proto

Dir     : e17/proto/etk/src/lib


Modified Files:
        etk_notebook.c etk_notebook.h 


Log Message:
more notebook functions

===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_notebook.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- etk_notebook.c      7 Mar 2006 23:42:23 -0000       1.14
+++ etk_notebook.c      9 Mar 2006 11:02:12 -0000       1.15
@@ -217,6 +217,47 @@
 }
 
 /**
+ * @brief Gets the widget displayed when the corresponding tab is activated
+ * @param notebook a notebook
+ * @param page_num the number of the page to set the page widget to
+ * @return Widget to displayed when the corresponding tab is activated
+ */
+Etk_Widget *etk_notebook_page_child_get(Etk_Notebook *notebook, int page_num)
+{
+   Etk_Notebook_Page *page;
+   
+   if (!notebook || !(page = evas_list_nth(notebook->pages, page_num)))
+      return NULL;
+   return etk_bin_child_get(ETK_BIN(page->page_frame));
+}
+
+/**
+ * @brief Gets the number of the page corresponding to the child widget
+ * @param notebook a notebook
+ * @param child the child widget of the page who's number we wish to get
+ * @return The number of the page or -1 if the page is not found
+ */
+int etk_notebook_page_num_get(Etk_Notebook *notebook, Etk_Widget *child)
+{
+   Etk_Notebook_Page *page;
+   Evas_List *l;
+   int i = 0;
+   
+   if (!notebook)
+     return -1;
+   
+   for(l = notebook->pages; l; l = l->next)
+   {      
+      page = l->data;
+      if(etk_bin_child_get(ETK_BIN(page->page_frame)) == child)
+       return i;
+      ++i;
+   }
+   
+   return -1;
+}
+
+/**
  * @brief Sets the current page of the notebook
  * @param notebook a notebook
  * @param page_num the number of the page to set as current
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_notebook.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- etk_notebook.h      8 Mar 2006 11:21:46 -0000       1.9
+++ etk_notebook.h      9 Mar 2006 11:02:12 -0000       1.10
@@ -57,6 +57,9 @@
 Etk_Widget *etk_notebook_page_tab_widget_get(Etk_Notebook *notebook, int 
page_num);
 
 void etk_notebook_page_child_set(Etk_Notebook *notebook, int page_num, 
Etk_Widget *child);
+Etk_Widget *etk_notebook_page_child_get(Etk_Notebook *notebook, int page_num);
+
+int etk_notebook_page_num_get(Etk_Notebook *notebook, Etk_Widget *child);
 
 void etk_notebook_current_page_set(Etk_Notebook *notebook, int page_num);
 int etk_notebook_current_page_get(Etk_Notebook *notebook);




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to