A Proxy is a class that 'attaches' an instance to an interface's
widgets, and transparently manipulates that instance's attributes as
the user alters the content of the widgets.

The Proxy takes the widget list and detects what widgets are to be
attached to the model by looking if it is a KiwiWidget and if it
has the model-attribute set.
Method __init__ No summary
Method proxy_updated No summary
Method update_many Like L{update} but takes a sequence of attributes
Method update Generic frontend function to update the contentss of a widget based on its model attribute name using the internal update functions.
Method set_model Updates the model instance of the proxy. Allows a proxy interface to change model without the need to destroy and recreate the UI (which would cause flashing, at least)
Method add_widget Adds a new widget to the proxy
Method remove_widget Removes a widget from the proxy
Method new_model Undocumented
Method _reset_widget Undocumented
Method _setup_widget Undocumented
Method _register_proxy_in_model Undocumented
Method _unregister_proxy_in_model Undocumented
Method _on_widget__content_changed This is called as soon as the content of one of the widget changes, the widgets tries fairly hard to not emit when it's not neccessary
Method _on_widget__notify Undocumented
Method _get_model Undocumented
def __init__(self, view, model=None, widgets=()):
Create a new Proxy object.
@param view:    view attched to the slave
@type  view:    a L{kiwi.ui.views.BaseView} subclass
@param model:   model attached to proxy
@param widgets: the widget names
@type  widgets: list of strings
def _reset_widget(self, attribute, widget):
Undocumented
def _setup_widget(self, widget_name, widget):
Undocumented
def _register_proxy_in_model(self, attribute):
Undocumented
def _unregister_proxy_in_model(self):
Undocumented
def _on_widget__content_changed(self, widget, attribute, validate):
This is called as soon as the content of one of the widget
changes, the widgets tries fairly hard to not emit when it's not
neccessary
def _on_widget__notify(self, widget, pspec):
Undocumented
def _get_model(self):
Undocumented
def proxy_updated(self, widget, attribute, value):
This is a hook that is called whenever the proxy updates the
model. Implement it in the inherited class to perform actions that
should be done each time the user changes something in the interface.
This hook by default does nothing.
@param widget:
@param attribute:
@param value:
def update_many(self, attributes, value=ValueUnset, block=False):
Like L{update} but takes a sequence of attributes

@param attributes: sequence of attributes to update
@param value: see L{update}
@param block: see L{update}
def update(self, attribute, value=ValueUnset, block=False):
Generic frontend function to update the contentss of a widget based
on its model attribute name using the internal update functions.

@param attribute: the name of the attribute whose widget we wish to
  updated.  If accessing a radiobutton, specify its group
  name.
@param value: specifies the value to set in the widget. If
  unspecified, it defaults to the current model's value
  (through an accessor, if it exists, or getattr).
@param block: defines if we are to block cascading proxy updates
  triggered by this update. You should use block if you are
  calling update on *the same attribute that is currently
  being updated*.
  This means if you have hooked to a signal of the widget
  associated to that attribute, and you call update() for
  the *same attribute*, use block=True. And pray. 8). If
  block is set to False, the normal update mechanism will
  occur (the model being updated in the end, hopefully).
def set_model(self, model, relax_type=False):
Updates the model instance of the proxy.
Allows a proxy interface to change model without the need to destroy
and recreate the UI (which would cause flashing, at least)

@param model:
@param relax_type:
def add_widget(self, name, widget):
Adds a new widget to the proxy

@param name: name of the widget
@param widget: widget, must be a gtk.Widget subclass
def remove_widget(self, name):
Removes a widget from the proxy

@param name: the name of the widget to remove
def new_model(self, model, relax_type=False):
Undocumented
API Documentation for Kiwi, generated by pydoctor at 2019-08-08 02:24:42.