def __init__(self, parent, title=None, list_get_cb=None,
                 sel_object_get_cb=None, popup_hide_object_signal_list=[]):

        def null_sel():
            return None

        self._sel_object_get_cb = sel_object_get_cb or null_sel
        FloaterListOpener.__init__(
            self, list_get_cb, popup_hide_object_signal_list)
        WidgetButton.__init__(self, parent)

        self._value = None
        self._title = title or ""
        self.clicked = self._open
    def __init__(self,
                 parent,
                 title=None,
                 list_get_cb=None,
                 sel_object_get_cb=None,
                 popup_hide_object_signal_list=[]):
        def null_sel():
            return None

        self._sel_object_get_cb = sel_object_get_cb or null_sel
        FloaterListOpener.__init__(self, list_get_cb,
                                   popup_hide_object_signal_list)
        WidgetButton.__init__(self, parent)

        self._value = None
        self._title = title or ""
        self.clicked = self._open
 def __init__(self, parent):
     WidgetButton.__init__(self, parent)
     self._label_true = "True"
     self._label_false = "False"
     self.value = True
     self.clicked = self._change
Exemple #4
0
    def _image_props_create(self):
        self.group_add("image")

        prop = Property(self._parent, "normal")
        wid = WidgetButton(self)
        wid.clicked = self._image_btn_clicked
        wid.tooltip_set("Actual image.<br>Click to change it.")
        prop.widget_add("n", wid)
        self["image"].property_add(prop)

        prop = Property(self._parent, "border")
        wid = WidgetEntry(self)
        wid.type_int()
        #wid.parser_in = lambda x: str(x)
        #wid.parser_out = lambda x: int(x)
        wid.tooltip_set("Lenght of left border in pixels.<br>"
                        "Left border isn't horizontal scalable.")
        prop.widget_add("l", wid)
        wid = WidgetEntry(self)
        wid.type_int()
        #wid.parser_in = lambda x: str(x)
        #wid.parser_out = lambda x: int(x)
        wid.tooltip_set("Lenght of right border in pixels.<br>"
                        "Right border isn't horizontal scalable.")
        prop.widget_add("r", wid)
        wid = WidgetEntry(self)
        wid.type_int()
        #wid.parser_in = lambda x: str(x)
        #wid.parser_out = lambda x: int(x)
        wid.tooltip_set("Lenght of top border in pixels.<br>"
                        "Top border isn't vertical scalable.")
        prop.widget_add("t", wid)
        wid = WidgetEntry(self)
        wid.type_int()
        #wid.parser_in = lambda x: str(x)
        #wid.parser_out = lambda x: int(x)
        wid.tooltip_set("Lenght of bottom border in pixels.<br>"
                        "Bottom border isn't vertical scalable.")
        prop.widget_add("b", wid)
        self["image"].property_add(prop)

        prop = Property(self._parent, "middle")
        wid = WidgetBoolean(self)
        wid.states_set("Solid", "None")
        wid.tooltip_set("Enables painting of image middle.<br>"
                        "If 'None', the image middle is hidden.")
        prop.widget_add("m", wid)
        self["image"].property_add(prop)

        prop = Property(self._parent, "aspect_pref")
        wid = WidgetCombo(self)
        for null, i in enumerate(self._aspect_prefs):
            wid.item_add(i)
        #FIXME: the 'aspect' property is not yet exposed ;)
        wid.tooltip_set("Sets the scope of the \"aspect\" property to " +
                        "a given dimension")
        prop.widget_add("a", wid)
        self["image"].property_add(prop)
Exemple #5
0
    def _image_props_create(self):
        self.group_add("image")

        prop = Property(self._parent, "normal")
        wid = WidgetButton(self)
        wid.clicked = self._image_btn_clicked
        wid.tooltip_set("Actual image.<br>Click to change it.")
        prop.widget_add("n", wid)
        self["image"].property_add(prop)

        prop = Property(self._parent, "border")
        wid = WidgetEntry(self)
        wid.type_int()
        #wid.parser_in = lambda x: str(x)
        #wid.parser_out = lambda x: int(x)
        wid.tooltip_set("Lenght of left border in pixels.<br>"
                        "Left border isn't horizontal scalable.")
        prop.widget_add("l", wid)
        wid = WidgetEntry(self)
        wid.type_int()
        #wid.parser_in = lambda x: str(x)
        #wid.parser_out = lambda x: int(x)
        wid.tooltip_set("Lenght of right border in pixels.<br>"
                        "Right border isn't horizontal scalable.")
        prop.widget_add("r", wid)
        wid = WidgetEntry(self)
        wid.type_int()
        #wid.parser_in = lambda x: str(x)
        #wid.parser_out = lambda x: int(x)
        wid.tooltip_set("Lenght of top border in pixels.<br>"
                        "Top border isn't vertical scalable.")
        prop.widget_add("t", wid)
        wid = WidgetEntry(self)
        wid.type_int()
        #wid.parser_in = lambda x: str(x)
        #wid.parser_out = lambda x: int(x)
        wid.tooltip_set("Lenght of bottom border in pixels.<br>"
                        "Bottom border isn't vertical scalable.")
        prop.widget_add("b", wid)
        self["image"].property_add(prop)

        prop = Property(self._parent, "middle")
        wid = WidgetBoolean(self)
        wid.states_set("Solid", "None")
        wid.tooltip_set("Enables painting of image middle.<br>"
                        "If 'None', the image middle is hidden.")
        prop.widget_add("m", wid)
        self["image"].property_add(prop)
Exemple #6
0
    def _image_props_create(self):
        self.group_add("image")

        prop = Property(self._parent, "normal")
        wid = WidgetButton(self)
        wid.clicked = self._image_btn_clicked
        wid.tooltip_set("Actual image.<br>Click to change it.")
        prop.widget_add("n", wid)
        self["image"].property_add(prop)

        prop = Property(self._parent, "border")
        wid = WidgetEntry(self)
        wid.type_int()
        #wid.parser_in = lambda x: str(x)
        #wid.parser_out = lambda x: int(x)
        wid.tooltip_set("Lenght of left border in pixels.<br>"
                        "Left border isn't horizontal scalable.")
        prop.widget_add("l", wid)
        wid = WidgetEntry(self)
        wid.type_int()
        #wid.parser_in = lambda x: str(x)
        #wid.parser_out = lambda x: int(x)
        wid.tooltip_set("Lenght of right border in pixels.<br>"
                        "Right border isn't horizontal scalable.")
        prop.widget_add("r", wid)
        wid = WidgetEntry(self)
        wid.type_int()
        #wid.parser_in = lambda x: str(x)
        #wid.parser_out = lambda x: int(x)
        wid.tooltip_set("Lenght of top border in pixels.<br>"
                        "Top border isn't vertical scalable.")
        prop.widget_add("t", wid)
        wid = WidgetEntry(self)
        wid.type_int()
        #wid.parser_in = lambda x: str(x)
        #wid.parser_out = lambda x: int(x)
        wid.tooltip_set("Lenght of bottom border in pixels.<br>"
                        "Bottom border isn't vertical scalable.")
        prop.widget_add("b", wid)
        self["image"].property_add(prop)

        prop = Property(self._parent, "middle")
        wid = WidgetBoolean(self)
        wid.states_set("Solid", "None")
        wid.tooltip_set("Enables painting of image middle.<br>"
                        "If 'None', the image middle is hidden.")
        prop.widget_add("m", wid)
        self["image"].property_add(prop)

        prop = Property(self._parent, "aspect_pref")
        wid = WidgetCombo(self)
        for null, i in enumerate(self._aspect_prefs):
            wid.item_add(i)
        #FIXME: the 'aspect' property is not yet exposed ;)
        wid.tooltip_set("Sets the scope of the \"aspect\" property to " +
                        "a given dimension")
        prop.widget_add("a", wid)
        self["image"].property_add(prop)