# Class k.u.p.ValidatableProxyWidgetMixin(ProxyWidgetMixin):

Part of kiwi.ui.proxywidget View In Hierarchy

Known subclasses: kiwi.ui.widgets.combo.ProxyComboBoxEntry, kiwi.ui.widgets.combo.ProxyComboEntry, kiwi.ui.widgets.entry.ProxyDateEntry, kiwi.ui.widgets.entry.ProxyEntry, kiwi.ui.widgets.spinbutton.ProxySpinButton, kiwi.ui.widgets.textview.ProxyTextView

Class used by some Kiwi Widgets that need to support mandatory input and validation features such as custom validation and data-type validation.

Mandatory support provides a way to warn the user when input is necessary. The validatation feature provides a way to check the data entered and to display information about what is wrong.

Method | __init__ | Undocumented
Method | update_background | Implement in subclass
Method | get_background | Implement in subclass
Method | set_pixbuf | Implement in subclass
Method | get_icon_window | Implement in subclass
Method | set_tooltip | Implement in subclass
Method | is_valid | Verify the widget state.
Method | validate | Checks if the data is valid.
Method | set_valid | Changes the validation state to valid, which will remove icons and
Method | set_invalid | Changes the validation state to invalid.
Method | set_blank | Changes the validation state to blank state, this only applies
Method | _set_valid_state | Updates the validation state and emits a signal iff it changed
Method | _draw_stock_icon | Undocumented
Method | _on_fadeout__color_changed | Undocumented

Inherited from ProxyWidgetMixin:

Method | prop_set_data_type | Set the data type for the widget
Method | set_data_format | Undocumented
Method | set_options_for_datatype | Set some options to be passed to the datatype converter.
Method | read | Get the content of the widget.
Method | update | Update the content value of the widget.
Method | _as_string | Convert a value to a string
Method | _from_string | Convert a string to the data type of the widget

def __init__(self, widget=None):
overrides kiwi.ui.proxywidget.ProxyWidgetMixin.__init__
overridden in kiwi.ui.widgets.combo.ProxyComboBoxEntry, kiwi.ui.widgets.combo.ProxyComboEntry, kiwi.ui.widgets.entry.ProxyDateEntry, kiwi.ui.widgets.entry.ProxyEntry, kiwi.ui.widgets.spinbutton.ProxySpinButton, kiwi.ui.widgets.textview.ProxyTextView
Undocumented
def update_background(self, color):
overridden in kiwi.ui.widgets.spinbutton.ProxySpinButton
Implement in subclass

def get_background(self):
overridden in kiwi.ui.widgets.entry.ProxyDateEntry, kiwi.ui.widgets.spinbutton.ProxySpinButton
Implement in subclass

def set_pixbuf(self, pixbuf):
overridden in kiwi.ui.widgets.spinbutton.ProxySpinButton
Implement in subclass

def get_icon_window(self):
overridden in kiwi.ui.widgets.spinbutton.ProxySpinButton
Implement in subclass

def set_tooltip(self, text):
overridden in kiwi.ui.widgets.combo.ProxyComboEntry, kiwi.ui.widgets.spinbutton.ProxySpinButton
Implement in subclass

def is_valid(self):
Verify the widget state.

Returns | True if the widget is in validated state

def validate(self, force=False):
Checks if the data is valid. Validates data-type and custom validation.

Parameters | force | if True, force validation
Returns | validated data or ValueUnset if it failed

def set_valid(self):
overridden in kiwi.ui.widgets.entry.ProxyDateEntry
Changes the validation state to valid, which will remove icons and reset the background color

def set_invalid(self, text=None, fade=True):
overridden in kiwi.ui.widgets.entry.ProxyDateEntry
Changes the validation state to invalid.

Parameters | text | text of tooltip of None
| fade | if we should fade the background

def set_blank(self):
overridden in kiwi.ui.widgets.entry.ProxyDateEntry
Changes the validation state to blank state, this only applies for mandatory widgets, draw an icon and set a tooltip

def _set_valid_state(self, state):
Updates the validation state and emits a signal iff it changed

def _draw_stock_icon(self, stock_id):
Undocumented
def _on_fadeout__color_changed(self, fadeout, color):
Undocumented