Пример #1
0
    def __init__(self,
                 parent,
                 art_id=None,
                 art_size=DEF_SIZE,
                 text='',
                 tooltip='',
                 padding=0,
                 decoration_padding=6,
                 flat=True,
                 native=True,
                 fontbold=False,
                 fontsize=0,
                 textplace=RIGHT,
                 onclick=None,
                 repeat=False):

        self.flat = flat
        self.decoration_padding = decoration_padding

        GenericGWidget.__init__(self, parent, tooltip, onclick, repeat)

        if native: rndr = renderer.NativeButtonRenderer
        else: rndr = renderer.ButtonRenderer

        self.renderer = rndr(self, art_id, art_size, text, padding, fontbold,
                             fontsize, textplace)
Пример #2
0
    def __init__(self,
                 parent,
                 value=False,
                 art_id=None,
                 art_size=DEF_SIZE,
                 text='',
                 tooltip='',
                 padding=0,
                 decoration_padding=6,
                 flat=True,
                 native=not const.is_mac(),
                 fontbold=False,
                 fontsize=0,
                 textplace=RIGHT,
                 onchange=None):

        self.flat = flat
        self.decoration_padding = decoration_padding

        self.value = value
        self.onchange = onchange
        GenericGWidget.__init__(self, parent, tooltip)

        if native: rndr = renderer.NativeButtonRenderer
        else: rndr = renderer.ButtonRenderer

        self.renderer = rndr(self, art_id, art_size, text, padding, fontbold,
                             fontsize, textplace)
Пример #3
0
	def __init__(self, parent, art_id=None, art_size=DEF_SIZE, text='',
				tooltip='', padding=0,
				fontbold=False, fontsize=0, textplace=RIGHT,
				onclick=None, onrightclick=None, repeat=False):

		self.flat = True

		GenericGWidget.__init__(self, parent, tooltip, onclick, repeat)
		self.renderer = renderer.LabelRenderer(self, art_id, art_size, text,
				padding, fontbold, fontsize, textplace)

		if onrightclick:
			self.rightclick_cmd = onrightclick
			self.Bind(wx.EVT_RIGHT_UP, self._on_rightclick, self)
Пример #4
0
	def __init__(self, parent, art_id=None, art_size=DEF_SIZE, text='',
				tooltip='', padding=0,
				fontbold=False, fontsize=0, textplace=RIGHT,
				onclick=None, onrightclick=None, repeat=False):

		self.flat = True

		GenericGWidget.__init__(self, parent, tooltip, onclick, repeat)
		self.renderer = renderer.LabelRenderer(self, art_id, art_size, text,
				padding, fontbold, fontsize, textplace)

		if onrightclick:
			self.rightclick_cmd = onrightclick
			self.Bind(wx.EVT_RIGHT_UP, self._on_rightclick, self)
Пример #5
0
	def __init__(self, parent, art_id=None, art_size=DEF_SIZE,
				text='', tooltip='', padding=0, decoration_padding=6,
				flat=True, native=True,
				fontbold=False, fontsize=0, textplace=RIGHT,
				onclick=None, repeat=False):

		self.flat = flat
		self.decoration_padding = decoration_padding

		GenericGWidget.__init__(self, parent, tooltip, onclick, repeat)

		if native: rndr = renderer.NativeButtonRenderer
		else: rndr = renderer.ButtonRenderer

		self.renderer = rndr(self, art_id, art_size, text,
				padding, fontbold, fontsize, textplace)
Пример #6
0
	def __init__(self, parent, value=False, art_id=None, art_size=DEF_SIZE,
				text='', tooltip='', padding=0, decoration_padding=6,
				flat=True, native=not const.is_mac(),
				fontbold=False, fontsize=0, textplace=RIGHT,
				onchange=None):

		self.flat = flat
		self.decoration_padding = decoration_padding

		self.value = value
		self.onchange = onchange
		GenericGWidget.__init__(self, parent, tooltip)

		if native: rndr = renderer.NativeButtonRenderer
		else: rndr = renderer.ButtonRenderer

		self.renderer = rndr(self, art_id, art_size, text,
				padding, fontbold, fontsize, textplace)