diff src/browser/sat_browser/base_widget.py @ 617:5baca9d46c34 frontends_multi_profiles

browser_side: add/improve some docstrings
author souliane <souliane@mailoo.org>
date Wed, 11 Feb 2015 11:21:27 +0100
parents 5b19fb5eae7e
children 698bdb84f6a7 c2abadf31afb
line wrap: on
line diff
--- a/src/browser/sat_browser/base_widget.py	Wed Feb 11 11:18:13 2015 +0100
+++ b/src/browser/sat_browser/base_widget.py	Wed Feb 11 11:21:27 2015 +0100
@@ -210,6 +210,14 @@
     ITEM_TPL = "<img src='media/icons/misc/%s.png' />"
 
     def __init__(self, parent, host, vertical=False, styles=None):
+        """
+
+        @param parent (Widget): LiberviaWidget, or instance of another class
+            implementing the method addMenus
+        @param host (SatWebFrontend)
+        @param vertical (bool): if True, set the menu vertically
+        @param styles (dict): optional styles dict
+        """
         menu_styles = {'menu_bar': 'widgetHeader_buttonGroup'}
         if styles:
             menu_styles.update(styles)
@@ -230,6 +238,11 @@
 class WidgetSubMenuBar(base_menu.GenericMenuBar):
 
     def __init__(self, host, vertical=True):
+        """
+
+        @param host (SatWebFrontend)
+        @param vertical (bool): if True, set the menu vertically
+        """
         base_menu.GenericMenuBar.__init__(self, host, vertical=vertical, flat_level=1)
 
     @classmethod
@@ -802,7 +815,10 @@
         Window.addWindowResizeListener(self)
 
     def getCurrentPanel(self):
-        """ Get the panel of the currently selected tab """
+        """ Get the panel of the currently selected tab
+
+        @return: WidgetsPanel
+        """
         return self.deck.visibleWidget
 
     def onWindowResized(self, width, height):