Commits

Ali Afshar  committed 3c86b00

Added some documentation for each proxy type

  • Participants
  • Parent commits 5b02837

Comments (0)

Files changed (1)

File pygtkhelpers/proxy.py

     """A proxy for a gtk.Widget
 
     This proxy provides a common api to gtk widgets, so that they can be used
-    without knowing which specific widget they are. Very useful in form
-    generation.
+    without knowing which specific widget they are. All proxy types should
+    extend this class.
     """
     __gtype_name__ = 'PyGTKHelperGObjectProxy'
 
 class SinglePropertyGObjectProxy(GObjectProxy):
     """Proxy which uses a single property to set and get the value.
     """
-
     prop_name = None
 
     def set_widget_value(self, value):
     def get_widget_value(self):
         return self.widget.get_property(self.prop_name)
 
+
 class SingleDelegatedPropertyGObjectProxy(GObjectProxy):
-
+    """Proxy which uses a delegated property on its widget.
+    """
     prop_name = None
     dprop_name = None
+    signal_name = None
 
     def set_widget_value(self, value):
         return self.widget.get_property(self.dprop_name
 
 
 class GtkEntryProxy(SinglePropertyGObjectProxy):
+    """Proxy for a gtk.Entry.
+    """
     prop_name = 'text'
     signal_name = 'changed'
 
 
 class GtkToggleButtonProxy(SinglePropertyGObjectProxy):
+    """Proxy for a gtk.ToggleButton.
+    """
     prop_name = 'active'
     signal_name = 'toggled'
 
 
 class GtkColorButtonProxy(SinglePropertyGObjectProxy):
-
+    """Proxy for a gtk.ColorButton
+    """
     prop_name = 'color'
     signal_name = 'color-set'
 
+
 class StringListProxy(GObjectProxy):
+    """Proxy for a pygtkhelpers.ui.widgets.StringList.
+    """
     signal_name = 'content-changed'
 
     def get_widget_value(self):
 
 
 class GtkRangeProxy(GObjectProxy):
+    """Base class for widgets employing a gtk.Range.
+    """
     signal_name = 'value-changed'
 
     def get_widget_value(self):
 
 
 class GtkFileChooserProxy(GObjectProxy):
+    """Proxy for a gtk.FileChooser.
+    """
     signal_name = 'selection-changed'
 
     def get_widget_value(self):
 
 
 class GtkFontButtonProxy(SinglePropertyGObjectProxy):
+    """Proxy for a gtk.FontButton.
+    """
     signal_name = 'font-set'
     prop_name = 'font-name'
 
 
 class GtkComboBoxProxy(GObjectProxy):
+    """Proxy for a gtk.ComboBox.
+    """
     signal_name = 'changed'
 
     def get_widget_value(self):
 
 
 class GtkTextViewProxy(SingleDelegatedPropertyGObjectProxy):
-
+    """Proxy for a gtk.TextView.
+    """
     signal_name = 'changed'
     prop_name = 'text'
     dprop_name = 'buffer'
 
 
 class GtkLabelProxy(SinglePropertyGObjectProxy):
+    """Proxy for a gtk.Label.
+    """
     prop_name = 'label'
 
 
 class GtkImageProxy(SinglePropertyGObjectProxy):
+    """Proxy for a gtk.Image.
+    """
     prop_name = 'file'
 
 
 class GtkLinkButtonProxy(SinglePropertyGObjectProxy):
+    """Proxy for a gtk.LinkButton.
+    """
     prop_name = 'uri'
 
 
 class GtkProgressBarProxy(SinglePropertyGObjectProxy):
+    """Proxy for a gtk.ProgressBar.
+    """
     prop_name = 'fraction'