Пример #1
0
	def init(self, master):
		self.master = master
		self.mw = app.mw
		self.pcontainer = self.master.master
		self.document = self.mw.document
		TFrame.__init__(self, self.master, style='FlatFrame', borderwidth=0)
		self.top = TFrame(self, style='PWinHead', borderwidth=3)
		self.panel = TFrame(self, style='PWinBody', borderwidth=3)
		self.activated = 1
		self.visible = 1
		self.packed = 1

		for item in self.pcontainer.loaded:
			if not item.collapsed:
				item.collapse_panel()

		self.pack(side=TOP, fill=self.fill, expand=self.expand, padx=1, pady=1)
		self.top.pack(side=TOP, fill=X)
		self.panel.pack(side=TOP, fill=BOTH, expand=1)

		self.iconlabel = TLabel(self.top, style='PWLabel', image=self.icon)
		self.textlabel = TLabel(self.top, style='PWLabel', text=self.title, anchor=W)
		if not 'bold' in self.textlabel['font'].split():
			self.textlabel['font'] += ' bold'
		self.closebut = TButton(self.top, style='PWButton', image='close_pw', command=self.close_panel)
		self.collapsebut = TButton(self.top, style='PWButton', image='minimize_pw', command=self.click)
		self.iconlabel.pack(side=LEFT, padx=2)
		self.textlabel.pack(side=LEFT, fill=BOTH, expand=1, padx=3)
		self.closebut.pack(side=RIGHT)
		self.collapsebut.pack(side=RIGHT)
		self.textlabel.bind("<Button-1>", self.click)
		self.mw.Subscribe(DOCUMENT, self.doc_changed)
Пример #2
0
    def __init__(self, parent, **kw):
        TFrame.__init__(self, parent, style='FlatFrame', **kw)

        spot_frame = TFrame(self, borderwidth=2, style='FlatFrame')
        spot_frame.pack(side=TOP)

        label = TLabel(spot_frame, text=_('Color name:'), justify=LEFT)
        label.pack(side=TOP)

        self.colorname_value = StringVar('')

        self.colorname = TEntrybox(spot_frame,
                                   text='',
                                   width=25,
                                   textvariable=self.colorname_value)
        self.colorname.set_state('readonly')
        self.colorname.pack(side=BOTTOM, fill=X)

        cmyk_frame = TFrame(self, borderwidth=2, style='FlatFrame')
        cmyk_frame.pack(side=TOP)

        self.CMYK_label = TLabel(cmyk_frame,
                                 text='C:\nM:\nY:\nK:',
                                 justify=LEFT)
        self.CMYK_label.pack(side=LEFT, padx=10)

        self.RGB_label = TLabel(cmyk_frame, text='R:\nG:\nB:', justify=LEFT)
        self.RGB_label.pack(side=LEFT, padx=10)

        self.HTML_label = TLabel(self, text='HTML:', justify=LEFT)
        self.HTML_label.pack(side=BOTTOM, pady=5)
Пример #3
0
	def __init__(self, parent, **kw):
		TFrame.__init__(self, parent, style='FlatFrame', **kw)	
			
		spot_frame = TFrame(self, borderwidth=2, style='FlatFrame')
		spot_frame.pack(side=TOP)
		
		label = TLabel(spot_frame, text=_('Color name:'), justify=LEFT)
		label.pack(side=TOP)
		
		self.colorname_value = StringVar('')
		
		self.colorname = TEntrybox(spot_frame, text='', width=25, textvariable=self.colorname_value)
		self.colorname.set_state('readonly')
		self.colorname.pack(side=BOTTOM, fill=X)
		
		cmyk_frame = TFrame(self, borderwidth=2, style='FlatFrame')
		cmyk_frame.pack(side=TOP)
		
		self.CMYK_label = TLabel(cmyk_frame, text='C:\nM:\nY:\nK:', justify=LEFT)
		self.CMYK_label.pack(side=LEFT, padx=10)
		
		self.RGB_label = TLabel(cmyk_frame, text='R:\nG:\nB:', justify=LEFT)
		self.RGB_label.pack(side=LEFT, padx=10)
		
		self.HTML_label = TLabel(self, text='HTML:', justify=LEFT)
		self.HTML_label.pack(side=BOTTOM, pady=5)		
Пример #4
0
	def __init__(self, parent, mainwindow):
		self.parent=parent
		self.mainwindow=mainwindow
		TFrame.__init__(self, self.parent, name = 'pagerPanel', style='FlatFrame', borderwidth=0)
		top_border=TLabel(self, style='FlatLabel', image='space_1')
		top_border.pack(side=TOP, fill=X)
		
		self.container=TFrame(self, style='FlatFrame', borderwidth=0)

		space=TLabel(self.container, style='FlatLabel', image='space_3')
		space.pack(side=LEFT, fill=Y)
		self.home_but=TButton(self.container, style='PagerHome', command=self.PageHome)
		self.home_but.pack(side=LEFT)
		self.home_but=TButton(self.container, style='PagerPrevious', command=self.PagePrevious)
		self.home_but.pack(side=LEFT)
		self.text=TLabel(self.container, style='FlatLabel', text=' '+_('Page 2 of 2')+' ')
		self.text.pack(side=LEFT)
		self.home_but=TButton(self.container, style='PagerNext', command=self.PageNext)
		self.home_but.pack(side=LEFT)
		self.home_but=TButton(self.container, style='PagerEnd', command=self.PageEnd)
		self.home_but.pack(side=LEFT)
		space=TLabel(self.container, style='FlatLabel', image='space_3')
		space.pack(side=LEFT, fill=Y)
		self.mainwindow.Subscribe(DOCUMENT, self.Resubscribe)
		self.Resubscribe()
		self.doc_paged()
		self.text.bind('<Double-Button-1>', self.GoToPage)
Пример #5
0
    def __init__(self, parent, color=None, **kw):
        TFrame.__init__(self, parent, style='FlatFrame', **kw)

        frame = TFrame(self, style="RoundedFrame", borderwidth=5)
        frame.pack(side=LEFT)

        self.color_monitor = Canvas(frame, width=100, height=50, relief='flat')
        self.color_monitor.pack(side=TOP)
Пример #6
0
	def __init__(self, parent, color=None, **kw):
		TFrame.__init__(self, parent, style='FlatFrame', **kw)

		frame = TFrame(self, style="RoundedFrame", borderwidth=5)
		frame.pack(side=LEFT)

		self.color_monitor = Canvas(frame, width=100, height=50, relief='flat')
		self.color_monitor.pack(side=TOP)
Пример #7
0
	def __init__(self, parent, mainwindow):
		self.parent = parent
		self.mainwindow = mainwindow
		TFrame.__init__(self, self.parent, name='tabsPanel', style='FlatFrame',
					borderwidth=0)
		self.left_label = TLabel(self, style=LEFT_CORNER, image='space_3')
		self.right_label = TLabel(self, style=RIGHT_CORNER, image='space_3')
		self.stub_label = TLabel(self, style='DrawingAreaTop', image='space_5')
		self.stub_label.pack(side=TOP, fill=X)
Пример #8
0
 def __init__(self, parent, color=None, **kw):
     TFrame.__init__(self, parent, style='FlatFrame', **kw)
     label = TLabel(self, image='empty_pattern_chooser', justify=CENTER)
     label.pack(side=TOP, pady=3)
     label2 = TLabel(
         self,
         text=_('Empty pattern selected,\ni.e. object will not be filled'),
         justify=CENTER)
     label2.pack(side=TOP, pady=10)
Пример #9
0
 def __init__(self, parent, callback, color=None, **kw):
     self.color = color
     self.callback = callback
     self.parent = parent
     TFrame.__init__(self, parent, style='FlatFrame', **kw)
     self.rgb_chooser = RGBChooser(self, self.reset_color)
     self.spot_chooser = SPOTChooser(self)
     self.empty_chooser = EmptyPatternChooser(self)
     self.current_chooser = self.empty_chooser
     self.current_chooser.pack(side=TOP)
Пример #10
0
	def __init__(self, parent, callback, color=None, **kw):
		self.color = color
		self.callback = callback
		self.parent = parent
		TFrame.__init__(self, parent, style='FlatFrame', **kw)
		self.rgb_chooser = RGBChooser(self, self.reset_color)
		self.spot_chooser = SPOTChooser(self)
		self.empty_chooser = EmptyPatternChooser(self)
		self.current_chooser = self.empty_chooser
		self.current_chooser.pack(side=TOP)
Пример #11
0
	def __init__(self, parent, callback, color=None, **kw):
		self.color = color
		self.parent = parent
		TFrame.__init__(self, parent, style='FlatFrame', **kw)
		self.rgb_digitizer = RGBDigitizer(self, callback)
		self.cmyk_digitizer = CMYKDigitizer(self, callback)
		self.spot_digitizer = SPOTDigitizer(self)
		self.empty_digitizer = EmptyDigitizer(self)
		self.current_digitizer = self.empty_digitizer
		self.current_digitizer.pack(side=LEFT)
		self.set_color(color)
Пример #12
0
 def __init__(self, parent, callback, color=None, **kw):
     self.color = color
     self.parent = parent
     TFrame.__init__(self, parent, style='FlatFrame', **kw)
     self.rgb_digitizer = RGBDigitizer(self, callback)
     self.cmyk_digitizer = CMYKDigitizer(self, callback)
     self.spot_digitizer = SPOTDigitizer(self)
     self.empty_digitizer = EmptyDigitizer(self)
     self.current_digitizer = self.empty_digitizer
     self.current_digitizer.pack(side=LEFT)
     self.set_color(color)
Пример #13
0
	def __init__(self, parent, callback, color=None, **kw):
		TFrame.__init__(self, parent, style='FlatFrame', **kw)

		frame = TFrame(self, style="RoundedFrame", borderwidth=5)
		frame.pack(side=LEFT)
		self.viewxy = ChooseRGBXY(frame, callback, xyramp_size[0], xyramp_size[1], 0, 1)
		self.viewxy.pack(side=LEFT)

		frame = TFrame(self, style="RoundedFrame", borderwidth=5)
		frame.pack(side=LEFT)
		self.viewz = ChooseRGBZ(frame, callback, zramp_size[0], zramp_size[1], 2)
		self.viewz.pack(side=LEFT)
Пример #14
0
 def __init__(self, parent, mainwindow):
     self.parent = parent
     self.mainwindow = mainwindow
     TFrame.__init__(self,
                     self.parent,
                     name='tabsPanel',
                     style='FlatFrame',
                     borderwidth=0)
     self.left_label = TLabel(self, style=LEFT_CORNER, image='space_3')
     self.right_label = TLabel(self, style=RIGHT_CORNER, image='space_3')
     self.stub_label = TLabel(self, style='DrawingAreaTop', image='space_5')
     self.stub_label.pack(side=TOP, fill=X)
Пример #15
0
    def __init__(self, parent, callback, color=None, **kw):
        TFrame.__init__(self, parent, style='FlatFrame', **kw)

        frame = TFrame(self, style="RoundedFrame", borderwidth=5)
        frame.pack(side=LEFT)
        self.viewxy = ChooseRGBXY(frame, callback, xyramp_size[0],
                                  xyramp_size[1], 0, 1)
        self.viewxy.pack(side=LEFT)

        frame = TFrame(self, style="RoundedFrame", borderwidth=5)
        frame.pack(side=LEFT)
        self.viewz = ChooseRGBZ(frame, callback, zramp_size[0], zramp_size[1],
                                2)
        self.viewz.pack(side=LEFT)
Пример #16
0
    def __init__(self,
                 parent,
                 toplevel,
                 size=300,
                 orient=LEFT,
                 min=200,
                 max=500,
                 cnf={},
                 **kw):
        TFrame.__init__(self, parent, style='FlatFrame', **kw)
        self.parent = parent
        self.panel = TFrame(self, style='FlatFrame')
        self.orient = orient
        self.min = min
        self.max = max
        self.size = size
        self.toplevel = toplevel
        self.canv_size = 0
        self.counter = 0

        if orient in [LEFT, RIGHT]:
            self.spacer = Frame(self, width=size, height=1)
            self.grip = TButton(self,
                                style='VGrip',
                                cursor=appconst.CurHResize)
            if orient == LEFT:
                self.spacer.pack(side=TOP)
                self.grip.pack(side=LEFT, fill=Y)
                self.panel.pack(side=RIGHT, fill=BOTH, expand=1)
            else:
                self.spacer.pack(side=TOP)
                self.grip.pack(side=RIGHT, fill=Y)
                self.panel.pack(side=LEFT, fill=BOTH, expand=1)
        else:
            self.spacer = Frame(self, width=1, height=size)
            self.grip = TButton(self,
                                style='HGrip',
                                cursor=appconst.CurVResize)
            if orient == BOTTOM:
                self.grip.pack(side=BOTTOM, fill=X)
                self.spacer.pack(side=RIGHT)
                self.panel.pack(side=LEFT, fill=BOTH, expand=1)
            else:
                self.grip.pack(side=TOP, fill=X)
                self.spacer.pack(side=RIGHT)
                self.panel.pack(side=LEFT, fill=BOTH, expand=1)

        self.grip.bind("<Button-1>", self.start)
        self.grip.bind("<ButtonRelease-1>", self.stop)
Пример #17
0
	def __init__(self, parent, callback, color, sign, allow_emtpy=1, **kw):
		self.color=color
		self.callback=callback
		TFrame.__init__(self, parent, style='FlatFrame', **kw)
		self.cs_name = StringVar(self)
		self.set_cs_name(self.color)
		
		self.colorspaces = TCombobox(self, state='readonly', postcommand = self.set_cs, 
									 values=self.make_cs_list(allow_emtpy), width=17, style='ComboNormal',
									 textvariable=self.cs_name)
		self.colorspaces.pack(side = BOTTOM, fill=X, pady=3)
		
		label = TLabel(self, text=_("Colorspace:")+" ")
		label.pack(side = LEFT, anchor='sw')
		
		label = TLabel(self, image=sign)
		label.pack(side = RIGHT)
Пример #18
0
	def init(self, master):
		
		TFrame.__init__(self, master)
		
		##### Title #########################
		
		self.title_label=TLabel(self, text=self.title, font=config.preferences.large_font, justify=LEFT)
		self.title_label.pack(side=TOP, anchor=W)
		
		##### line #########################
				
		line = TLabel(self, style='HLine2')
		line.pack(side = TOP, fill = X)				

		##### here should be panel content #########################
		
		self.init_vars()		
		self.build()
		self.activated=1
Пример #19
0
	def __init__(self, parent, anchor='C', command = None, **kw):
		TFrame.__init__(self, parent, style='FlatFrame', **kw)
		self.command = command
		self.anchor = anchor
		#---------------------------------------------------------
		# Basepoint check
		# NW -- N -- NE
		# |     |     |
		# W  -- C --  E
		# |     |     |
		# SW -- S -- SE
		#
		# USER - basepoint
		
		frame=TFrame(self, style='FlatFrame')
		frame.pack(side = TOP, fill = BOTH)
		
		radio = UpdatedRadiobutton(frame, value = 'NW',variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		radio = UpdatedRadiobutton(frame, value = 'N', variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		radio = UpdatedRadiobutton(frame, value = 'NE', variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		
		frame=TFrame(self, style='FlatFrame')
		frame.pack(side = TOP, fill = BOTH)
		
		radio = UpdatedRadiobutton(frame, value = 'W', variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		radio = UpdatedRadiobutton(frame, value = 'C', variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		radio = UpdatedRadiobutton(frame, value = 'E', variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		
		frame=TFrame(self, style='FlatFrame')
		frame.pack(side = TOP, fill = BOTH)
		
		radio = UpdatedRadiobutton(frame, value = 'SW', variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		radio = UpdatedRadiobutton(frame, value = 'S',  variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		radio = UpdatedRadiobutton(frame, value = 'SE', variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
Пример #20
0
    def __init__(self, parent, mainwindow):
        self.parent = parent
        self.mainwindow = mainwindow
        TFrame.__init__(self,
                        self.parent,
                        name='pagerPanel',
                        style='FlatFrame',
                        borderwidth=0)
        top_border = TLabel(self, style='FlatLabel', image='space_1')
        top_border.pack(side=TOP, fill=X)

        self.container = TFrame(self, style='FlatFrame', borderwidth=0)

        space = TLabel(self.container, style='FlatLabel', image='space_3')
        space.pack(side=LEFT, fill=Y)
        self.home_but = TButton(self.container,
                                style='PagerHome',
                                command=self.PageHome)
        self.home_but.pack(side=LEFT)
        self.home_but = TButton(self.container,
                                style='PagerPrevious',
                                command=self.PagePrevious)
        self.home_but.pack(side=LEFT)
        self.text = TLabel(self.container,
                           style='FlatLabel',
                           text=' ' + _('Page 2 of 2') + ' ')
        self.text.pack(side=LEFT)
        self.home_but = TButton(self.container,
                                style='PagerNext',
                                command=self.PageNext)
        self.home_but.pack(side=LEFT)
        self.home_but = TButton(self.container,
                                style='PagerEnd',
                                command=self.PageEnd)
        self.home_but.pack(side=LEFT)
        space = TLabel(self.container, style='FlatLabel', image='space_3')
        space.pack(side=LEFT, fill=Y)
        self.mainwindow.Subscribe(DOCUMENT, self.Resubscribe)
        self.Resubscribe()
        self.doc_paged()
        self.text.bind('<Double-Button-1>', self.GoToPage)
Пример #21
0
    def __init__(self, parent, callback, color, sign, allow_emtpy=1, **kw):
        self.color = color
        self.callback = callback
        TFrame.__init__(self, parent, style='FlatFrame', **kw)
        self.cs_name = StringVar(self)
        self.set_cs_name(self.color)

        self.colorspaces = TCombobox(self,
                                     state='readonly',
                                     postcommand=self.set_cs,
                                     values=self.make_cs_list(allow_emtpy),
                                     width=17,
                                     style='ComboNormal',
                                     textvariable=self.cs_name)
        self.colorspaces.pack(side=BOTTOM, fill=X, pady=3)

        label = TLabel(self, text=_("Colorspace:") + " ")
        label.pack(side=LEFT, anchor='sw')

        label = TLabel(self, image=sign)
        label.pack(side=RIGHT)
Пример #22
0
    def init(self, master):

        TFrame.__init__(self, master)

        ##### Title #########################

        self.title_label = TLabel(self,
                                  text=self.title,
                                  font=config.preferences.large_font,
                                  justify=LEFT)
        self.title_label.pack(side=TOP, anchor=W)

        ##### line #########################

        line = TLabel(self, style='HLine2')
        line.pack(side=TOP, fill=X)

        ##### here should be panel content #########################

        self.init_vars()
        self.build()
        self.activated = 1
Пример #23
0
	def __init__(self, parent, toplevel, size=300, orient=LEFT, min=200, max=500, cnf={}, **kw):
		TFrame.__init__(self, parent, style='FlatFrame', **kw)
		self.parent = parent
		self.panel = TFrame(self, style='FlatFrame')
		self.orient = orient
		self.min = min
		self.max = max
		self.size = size
		self.toplevel = toplevel
		self.canv_size = 0
		self.counter = 0

		if orient in [LEFT, RIGHT]:
			self.spacer = Frame(self, width=size, height=1)
			self.grip = TButton(self, style='VGrip', cursor=appconst.CurHResize)
			if orient == LEFT:
				self.spacer.pack(side=TOP)
				self.grip.pack(side=LEFT, fill=Y)
				self.panel.pack(side=RIGHT, fill=BOTH, expand=1)
			else:
				self.spacer.pack(side=TOP)
				self.grip.pack(side=RIGHT, fill=Y)
				self.panel.pack(side=LEFT, fill=BOTH, expand=1)
		else:
			self.spacer = Frame(self, width=1, height=size)
			self.grip = TButton(self, style='HGrip', cursor=appconst.CurVResize)
			if orient == BOTTOM:
				self.grip.pack(side=BOTTOM, fill=X)
				self.spacer.pack(side=RIGHT)
				self.panel.pack(side=LEFT, fill=BOTH, expand=1)
			else:
				self.grip.pack(side=TOP, fill=X)
				self.spacer.pack(side=RIGHT)
				self.panel.pack(side=LEFT, fill=BOTH, expand=1)

		self.grip.bind ("<Button-1>", self.start)
		self.grip.bind ("<ButtonRelease-1>", self.stop)
Пример #24
0
	def __init__(self, parent, color=None, **kw):
		TFrame.__init__(self, parent, style='FlatFrame', **kw)
		label = TLabel(self, image='empty_pattern_chooser', justify=CENTER)
		label.pack(side=TOP, pady=3)
		label2 = TLabel(self, text=_('Empty pattern selected,\ni.e. object will not be filled'), justify=CENTER)
		label2.pack(side=TOP, pady=10)
Пример #25
0
	def __init__(self, parent, callback, **kw):
		self.callback = callback
		TFrame.__init__(self, parent, style='FlatFrame', **kw)
		self.R_value = IntVar(0)
		self.G_value = IntVar(0)
		self.B_value = IntVar(0)
		self.A_value = IntVar(0)
		
		self.HTML_value = StringVar('')
		
			
		b = TLabel(self, style='HLine')
		b.pack(side=BOTTOM, fill=X)	
		
		frame = TFrame(self, borderwidth=0, style='FlatFrame')
		frame.pack(side=BOTTOM)
		label = TLabel(frame, text=_("Alpha channel: "))
		label.pack(side=LEFT)
		self.A_spin = TSpinbox(frame, min=0, max=255, step=1, vartype=0, width=7,
							textvariable=self.A_value, command=self.rgb_component_changed)
		self.A_spin.pack(side=RIGHT)
		
		b = TLabel(self, style='HLine')
		b.pack(side=BOTTOM, fill=X)
		
		
		html_frame = TFrame(self, borderwidth=2, style='FlatFrame')
		html_frame.pack(side=BOTTOM)
		

		self.HTML_entry = TEntrybox(html_frame, text='#000000', width=10,
								textvariable=self.HTML_value, command=self.html_component_changed)
		self.HTML_entry.pack(side=RIGHT)
		
		label = TLabel(html_frame, text="HTML: ")
		label.pack(side=RIGHT)
		
		rgb_frame = TFrame(self, borderwidth=2, style='FlatFrame')
		rgb_frame.pack(side=LEFT, padx=10)
		
		frame = TFrame(rgb_frame, borderwidth=2, style='FlatFrame')
		frame.pack(side=TOP)
		label = TLabel(frame, text="R: ")
		label.pack(side=LEFT)
		self.R_spin = TSpinbox(frame, min=0, max=255, step=1, vartype=0, width=7,
							textvariable=self.R_value, command=self.rgb_component_changed)
		self.R_spin.pack(side=RIGHT)

		frame = TFrame(rgb_frame, borderwidth=2, style='FlatFrame')
		frame.pack(side=TOP)
		label = TLabel(frame, text="G: ")
		label.pack(side=LEFT)
		self.G_spin = TSpinbox(frame, min=0, max=255, step=1, vartype=0, width=7,
							textvariable=self.G_value, command=self.rgb_component_changed)
		self.G_spin.pack(side=RIGHT)

		frame = TFrame(rgb_frame, borderwidth=2, style='FlatFrame')
		frame.pack(side=TOP)
		label = TLabel(frame, text="B: ")
		label.pack(side=LEFT)
		self.B_spin = TSpinbox(frame, min=0, max=255, step=1, vartype=0, width=7,
							textvariable=self.B_value, command=self.rgb_component_changed)
		self.B_spin.pack(side=RIGHT)
		
		cmyk_frame = TFrame(self, borderwidth=2, style='FlatFrame')
		cmyk_frame.pack(side=LEFT)
		
		self.CMYK_label = TLabel(cmyk_frame, text='C:\nM:\nY:\nK:', justify=LEFT)
		self.CMYK_label.pack(side=LEFT)
Пример #26
0
	def __init__(self, parent, **kw):
		TFrame.__init__(self, parent, style='FlatFrame', **kw)
Пример #27
0
	def __init__(self, parent, callback, **kw):
		self.callback = callback
		TFrame.__init__(self, parent, style='FlatFrame', **kw)
		self.C_value = DoubleVar(0)
		self.M_value = DoubleVar(0)
		self.Y_value = DoubleVar(0)
		self.K_value = DoubleVar(0)
		self.A_value = DoubleVar(0)
		
		b = TLabel(self, style='HLine')
		b.pack(side=BOTTOM, fill=X)
		
		frame = TFrame(self, borderwidth=0, style='FlatFrame')
		frame.pack(side=BOTTOM)
		label = TLabel(frame, text=_("Opacity: "))
		label.pack(side=LEFT)
		self.A_spin = TSpinbox(frame, min=0, max=255, step=1, vartype=0, width=7,
							textvariable=self.A_value, command=self.cmyk_component_changed)
		self.A_spin.pack(side=RIGHT)
		
		b = TLabel(self, style='HLine')
		b.pack(side=BOTTOM, fill=X)
		
		cmyk_frame = TFrame(self, borderwidth=2, style='FlatFrame')
		cmyk_frame.pack(side=LEFT, padx=10)
		
		frame = TFrame(cmyk_frame, borderwidth=2, style='FlatFrame')
		frame.pack(side=TOP)
		label = TLabel(frame, text="C: ")
		label.pack(side=LEFT)
		self.C_spin = TSpinbox(frame, min=0, max=100, step=1, vartype=1, width=7,
							textvariable=self.C_value, command=self.cmyk_component_changed)
		self.C_spin.pack(side=RIGHT)

		frame = TFrame(cmyk_frame, borderwidth=2, style='FlatFrame')
		frame.pack(side=TOP)
		label = TLabel(frame, text="M: ")
		label.pack(side=LEFT)
		self.M_spin = TSpinbox(frame, min=0, max=100, step=1, vartype=1, width=7,
							textvariable=self.M_value, command=self.cmyk_component_changed)
		self.M_spin.pack(side=RIGHT)

		frame = TFrame(cmyk_frame, borderwidth=2, style='FlatFrame')
		frame.pack(side=TOP)
		label = TLabel(frame, text="Y: ")
		label.pack(side=LEFT)
		self.Y_spin = TSpinbox(frame, min=0, max=100, step=1, vartype=1, width=7,
							textvariable=self.Y_value, command=self.cmyk_component_changed)
		self.Y_spin.pack(side=RIGHT)		

		frame = TFrame(cmyk_frame, borderwidth=2, style='FlatFrame')
		frame.pack(side=TOP)
		label = TLabel(frame, text="K: ")
		label.pack(side=LEFT)
		self.K_spin = TSpinbox(frame, min=0, max=100, step=1, vartype=1, width=7,
							textvariable=self.K_value, command=self.cmyk_component_changed)
		self.K_spin.pack(side=RIGHT)
		
		rgb_frame = TFrame(self, borderwidth=2, style='FlatFrame')
		rgb_frame.pack(side=LEFT)
		
		self.RGB_label = TLabel(rgb_frame, text='R:\nG:\nB:', justify=LEFT)
		self.RGB_label.pack(side=LEFT)		
Пример #28
0
    def __init__(self, parent, callback, **kw):
        self.callback = callback
        TFrame.__init__(self, parent, style='FlatFrame', **kw)
        self.R_value = IntVar(0)
        self.G_value = IntVar(0)
        self.B_value = IntVar(0)
        self.A_value = IntVar(0)

        self.HTML_value = StringVar('')

        b = TLabel(self, style='HLine')
        b.pack(side=BOTTOM, fill=X)

        frame = TFrame(self, borderwidth=0, style='FlatFrame')
        frame.pack(side=BOTTOM)
        label = TLabel(frame, text=_("Alpha channel: "))
        label.pack(side=LEFT)
        self.A_spin = TSpinbox(frame,
                               min=0,
                               max=255,
                               step=1,
                               vartype=0,
                               width=7,
                               textvariable=self.A_value,
                               command=self.rgb_component_changed)
        self.A_spin.pack(side=RIGHT)

        b = TLabel(self, style='HLine')
        b.pack(side=BOTTOM, fill=X)

        html_frame = TFrame(self, borderwidth=2, style='FlatFrame')
        html_frame.pack(side=BOTTOM)

        self.HTML_entry = TEntrybox(html_frame,
                                    text='#000000',
                                    width=10,
                                    textvariable=self.HTML_value,
                                    command=self.html_component_changed)
        self.HTML_entry.pack(side=RIGHT)

        label = TLabel(html_frame, text="HTML: ")
        label.pack(side=RIGHT)

        rgb_frame = TFrame(self, borderwidth=2, style='FlatFrame')
        rgb_frame.pack(side=LEFT, padx=10)

        frame = TFrame(rgb_frame, borderwidth=2, style='FlatFrame')
        frame.pack(side=TOP)
        label = TLabel(frame, text="R: ")
        label.pack(side=LEFT)
        self.R_spin = TSpinbox(frame,
                               min=0,
                               max=255,
                               step=1,
                               vartype=0,
                               width=7,
                               textvariable=self.R_value,
                               command=self.rgb_component_changed)
        self.R_spin.pack(side=RIGHT)

        frame = TFrame(rgb_frame, borderwidth=2, style='FlatFrame')
        frame.pack(side=TOP)
        label = TLabel(frame, text="G: ")
        label.pack(side=LEFT)
        self.G_spin = TSpinbox(frame,
                               min=0,
                               max=255,
                               step=1,
                               vartype=0,
                               width=7,
                               textvariable=self.G_value,
                               command=self.rgb_component_changed)
        self.G_spin.pack(side=RIGHT)

        frame = TFrame(rgb_frame, borderwidth=2, style='FlatFrame')
        frame.pack(side=TOP)
        label = TLabel(frame, text="B: ")
        label.pack(side=LEFT)
        self.B_spin = TSpinbox(frame,
                               min=0,
                               max=255,
                               step=1,
                               vartype=0,
                               width=7,
                               textvariable=self.B_value,
                               command=self.rgb_component_changed)
        self.B_spin.pack(side=RIGHT)

        cmyk_frame = TFrame(self, borderwidth=2, style='FlatFrame')
        cmyk_frame.pack(side=LEFT)

        self.CMYK_label = TLabel(cmyk_frame,
                                 text='C:\nM:\nY:\nK:',
                                 justify=LEFT)
        self.CMYK_label.pack(side=LEFT)
Пример #29
0
 def __init__(self, parent, **kw):
     TFrame.__init__(self, parent, style='FlatFrame', **kw)
Пример #30
0
    def __init__(self, parent, callback, **kw):
        self.callback = callback
        TFrame.__init__(self, parent, style='FlatFrame', **kw)
        self.C_value = DoubleVar(0)
        self.M_value = DoubleVar(0)
        self.Y_value = DoubleVar(0)
        self.K_value = DoubleVar(0)
        self.A_value = DoubleVar(0)

        b = TLabel(self, style='HLine')
        b.pack(side=BOTTOM, fill=X)

        frame = TFrame(self, borderwidth=0, style='FlatFrame')
        frame.pack(side=BOTTOM)
        label = TLabel(frame, text=_("Opacity: "))
        label.pack(side=LEFT)
        self.A_spin = TSpinbox(frame,
                               min=0,
                               max=255,
                               step=1,
                               vartype=0,
                               width=7,
                               textvariable=self.A_value,
                               command=self.cmyk_component_changed)
        self.A_spin.pack(side=RIGHT)

        b = TLabel(self, style='HLine')
        b.pack(side=BOTTOM, fill=X)

        cmyk_frame = TFrame(self, borderwidth=2, style='FlatFrame')
        cmyk_frame.pack(side=LEFT, padx=10)

        frame = TFrame(cmyk_frame, borderwidth=2, style='FlatFrame')
        frame.pack(side=TOP)
        label = TLabel(frame, text="C: ")
        label.pack(side=LEFT)
        self.C_spin = TSpinbox(frame,
                               min=0,
                               max=100,
                               step=1,
                               vartype=1,
                               width=7,
                               textvariable=self.C_value,
                               command=self.cmyk_component_changed)
        self.C_spin.pack(side=RIGHT)

        frame = TFrame(cmyk_frame, borderwidth=2, style='FlatFrame')
        frame.pack(side=TOP)
        label = TLabel(frame, text="M: ")
        label.pack(side=LEFT)
        self.M_spin = TSpinbox(frame,
                               min=0,
                               max=100,
                               step=1,
                               vartype=1,
                               width=7,
                               textvariable=self.M_value,
                               command=self.cmyk_component_changed)
        self.M_spin.pack(side=RIGHT)

        frame = TFrame(cmyk_frame, borderwidth=2, style='FlatFrame')
        frame.pack(side=TOP)
        label = TLabel(frame, text="Y: ")
        label.pack(side=LEFT)
        self.Y_spin = TSpinbox(frame,
                               min=0,
                               max=100,
                               step=1,
                               vartype=1,
                               width=7,
                               textvariable=self.Y_value,
                               command=self.cmyk_component_changed)
        self.Y_spin.pack(side=RIGHT)

        frame = TFrame(cmyk_frame, borderwidth=2, style='FlatFrame')
        frame.pack(side=TOP)
        label = TLabel(frame, text="K: ")
        label.pack(side=LEFT)
        self.K_spin = TSpinbox(frame,
                               min=0,
                               max=100,
                               step=1,
                               vartype=1,
                               width=7,
                               textvariable=self.K_value,
                               command=self.cmyk_component_changed)
        self.K_spin.pack(side=RIGHT)

        rgb_frame = TFrame(self, borderwidth=2, style='FlatFrame')
        rgb_frame.pack(side=LEFT)

        self.RGB_label = TLabel(rgb_frame, text='R:\nG:\nB:', justify=LEFT)
        self.RGB_label.pack(side=LEFT)