Пример #1
0
    def __init__(self, parent):
        CtxSubPanel.__init__(self, parent)
        self.var_reference = StringVar(self.mw.root, 'left')
        self.var_stub = StringVar(self.mw.root)

        radio = UpdatedRadiobutton(self.panel,
                                   value='left',
                                   image='context_text_left',
                                   command=self.applyProperties,
                                   variable=self.var_reference,
                                   style='ToolbarRadiobutton')
        radio.pack(side=LEFT)
        tooltips.AddDescription(radio, _('Left alignment'))
        radio = UpdatedRadiobutton(self.panel,
                                   value='center',
                                   image='context_text_center',
                                   command=self.applyProperties,
                                   variable=self.var_reference,
                                   style='ToolbarRadiobutton')
        radio.pack(side=LEFT)
        tooltips.AddDescription(radio, _('Center alignment'))
        radio = UpdatedRadiobutton(self.panel,
                                   value='right',
                                   image='context_text_right',
                                   command=self.applyProperties,
                                   variable=self.var_reference,
                                   style='ToolbarRadiobutton')
        radio.pack(side=LEFT)
        tooltips.AddDescription(radio, _('Right alignment'))
        #		radio = UpdatedRadiobutton(self.panel, value = 'justify', image='context_text_justify_disabled',
        #								command=self.applyProperties, variable = self.var_stub, style='ToolbarRadiobutton', state='disabled')
        #		radio.pack(side=LEFT)
        #		tooltips.AddDescription(radio, _('Justify'))

        self.ReSubscribe()
Пример #2
0
    def __init__(self, parent):
        self.my_changes = 0

        CtxSubPanel.__init__(self, parent)
        self.var_jump_number = DoubleVar(self.mw.root)

        unit = config.preferences.default_unit
        var_jump_unit = StringVar(self.mw.root)
        self.var_jump = LengthVar(10, unit, self.var_jump_number,
                                  var_jump_unit)

        label = TLabel(self.panel, text=_("Jump:"))
        label.pack(side=LEFT, padx=2)
        self.entry_jump = TSpinbox(self.panel,
                                   var=0,
                                   vartype=1,
                                   textvariable=self.var_jump_number,
                                   min=0,
                                   max=1000,
                                   step=.1,
                                   width=6,
                                   command=self.applyJump)
        self.entry_jump.pack(side=LEFT, padx=2)
        config.preferences.Subscribe(CHANGED, self.update)
        self.var_jump.set(config.preferences.handle_jump)
        self.update(0, 0)
Пример #3
0
	def __init__(self, parent):
		CtxSubPanel.__init__(self, parent)
		
		b = TButton(self.panel, command=self.flip, style='Toolbutton', image='context_hflip')
		tooltips.AddDescription(b, _('Flip Horizontal'))
		b.pack(side = LEFT)
		b = TButton(self.panel,  command=self.flop, style='Toolbutton', image='context_vflip')
		tooltips.AddDescription(b, _('Flip Vertical'))
		b.pack(side = LEFT)
Пример #4
0
    def __init__(self, parent):
        CtxSubPanel.__init__(self, parent)
        self.my_changes = 0
        self.text_linegap = StringVar(self.mw.root, '100.0')
        self.text_wordgap = StringVar(self.mw.root, '100.0')
        self.text_chargap = StringVar(self.mw.root, '100.0')

        label = TLabel(self.panel, image='context_between_word')
        label.pack(side=LEFT)
        tooltips.AddDescription(label, _('Distance between words'))
        self.entry_word = TSpinbox(self.panel,
                                   var=100.0,
                                   vartype=1,
                                   textvariable=self.text_wordgap,
                                   min=0,
                                   max=5000,
                                   step=10,
                                   width=6,
                                   command=self.applyProperties)
        self.entry_word.pack(side=LEFT, padx=2)

        label = TLabel(self.panel, text='% ')
        label.pack(side=LEFT)
        label = TLabel(self.panel, image='context_between_line')
        label.pack(side=LEFT)
        tooltips.AddDescription(label, _('Distance between lines'))
        self.entry_line = TSpinbox(self.panel,
                                   var=100.0,
                                   vartype=1,
                                   textvariable=self.text_linegap,
                                   min=0,
                                   max=5000,
                                   step=10,
                                   width=6,
                                   command=self.applyProperties)
        self.entry_line.pack(side=LEFT, padx=2)

        label = TLabel(self.panel, text='% ')
        label.pack(side=LEFT)
        label = TLabel(self.panel, image='context_between_char')
        label.pack(side=LEFT)
        tooltips.AddDescription(label, _('Distance between characters'))
        self.entry_char = TSpinbox(self.panel,
                                   var=100.0,
                                   vartype=1,
                                   textvariable=self.text_chargap,
                                   min=0,
                                   max=5000,
                                   step=10,
                                   width=6,
                                   command=self.applyProperties)
        self.entry_char.pack(side=LEFT, padx=2)
        label = TLabel(self.panel, text='% ')
        label.pack(side=LEFT)

        self.ReSubscribe()
Пример #5
0
    def __init__(self, parent):
        CtxSubPanel.__init__(self, parent)
        b = TButton(self.panel,
                    command=self.makePageFrame,
                    style='Toolbutton',
                    image='context_add_page_frame')
        tooltips.AddDescription(b, _('Add page frame'))
        b.pack(side=LEFT)
        b = TButton(self.panel,
                    command=self.addCenteredGuides,
                    style='Toolbutton',
                    image='context_add_centered_guides')
        tooltips.AddDescription(b, _('Add guides for page center'))
        b.pack(side=LEFT)

        #############
        b = TLabel(self.panel, image="toolbar_sep")
        b.pack(side=LEFT)
        b = TButton(self.panel,
                    command=self.addGuidesFrame,
                    style='Toolbutton',
                    image='context_add_guides_frame')
        tooltips.AddDescription(b, _('Add guides across page border'))
        b.pack(side=LEFT)

        self.var_jump_number = DoubleVar(self.mw.root)

        unit = config.preferences.default_unit
        var_jump_unit = StringVar(self.mw.root)
        self.var_jump = LengthVar(10, unit, self.var_jump_number,
                                  var_jump_unit)

        self.entry_jump = TSpinbox(self.panel,
                                   var=0,
                                   vartype=1,
                                   textvariable=self.var_jump_number,
                                   min=-1000,
                                   max=1000,
                                   step=5,
                                   width=6,
                                   command=self.addGuidesFrame)
        self.entry_jump.pack(side=LEFT, padx=2)
        config.preferences.Subscribe(CHANGED, self.update)
        self.var_jump.set(0)
        self.update(0, 0)

        b = TLabel(self.panel, image="toolbar_sep")
        b.pack(side=LEFT)
        ##############

        b = TButton(self.panel,
                    command=self.removeAllGuides,
                    style='Toolbutton',
                    image='context_remove_all_guides')
        tooltips.AddDescription(b, _('Remove all guides'))
        b.pack(side=LEFT)
Пример #6
0
	def __init__(self, parent):
		CtxSubPanel.__init__(self, parent)
		
		b = TCommandButton(self.panel, self.mw.commands.CombineBeziers, style='Toolbutton', image='context_combine')
		b.pack(side = LEFT)
		tooltips.AddDescription(b, _('Combine'))
		
		b = TCommandButton(self.panel, self.mw.commands.SplitBeziers, style='Toolbutton', image='context_split')
		b.pack(side = LEFT)
		tooltips.AddDescription(b, _('Split'))
Пример #7
0
    def __init__(self, parent):
        CtxSubPanel.__init__(self, parent)
        self.my_changes = 0
        self.var_width_number = DoubleVar(self.mw.root)
        self.var_height_number = DoubleVar(self.mw.root)

        var_width_unit = StringVar(self.mw.root)
        var_height_unit = StringVar(self.mw.root)

        unit = config.preferences.default_unit
        self.var_width = LengthVar(10, unit, self.var_width_number,
                                   var_width_unit)
        self.var_height = LengthVar(10, unit, self.var_height_number,
                                    var_height_unit)

        jump = config.preferences.default_unit_jump
        self.var_width.set(0)
        self.var_height.set(0)

        label = TLabel(self.panel, image='size_h')
        label.pack(side=LEFT)

        self.entry_width = TSpinbox(self.panel,
                                    var=0,
                                    vartype=1,
                                    textvariable=self.var_width_number,
                                    min=0,
                                    max=50000,
                                    step=jump,
                                    width=6,
                                    command=self.applyResize)
        tooltips.AddDescription(self.entry_width, _("Width of selection"))
        self.entry_width.pack(side=LEFT, padx=5)

        label = TLabel(self.panel, image='size_v')
        label.pack(side=LEFT)

        self.entry_height = TSpinbox(self.panel,
                                     var=0,
                                     vartype=1,
                                     textvariable=self.var_height_number,
                                     min=0,
                                     max=50000,
                                     step=jump,
                                     width=6,
                                     command=self.applyResize)
        tooltips.AddDescription(self.entry_height, _("Height of selection"))
        self.entry_height.pack(side=LEFT, padx=5)

        self.ReSubscribe()
        config.preferences.Subscribe(CHANGED, self.update_pref)
Пример #8
0
	def __init__(self, parent):
		CtxSubPanel.__init__(self, parent)
		self.my_changes=0
		
		self.var_unit = StringVar(self.mw.root)
		self.var_unit.set(config.preferences.default_unit)
		
		label = TLabel(self.panel, text=_("Units:"))
		label.pack(side = LEFT, padx=2)
		self.entry_width = TCombobox(self.panel, state='readonly', postcommand = self.applyUnits, 
									 values=self.make_units(), width=4, style='ComboNormal', textvariable=self.var_unit)
		self.entry_width.pack(side = LEFT, padx=2)
		
		config.preferences.Subscribe(CHANGED, self.update)
Пример #9
0
	def __init__(self, parent):
		CtxSubPanel.__init__(self, parent)
		
		b = TCommandButton(self.panel, self.mw.commands.GroupSelected, style='Toolbutton', image='context_group')
		b.pack(side = LEFT)
		tooltips.AddDescription(b, _('Group'))
		
		b = TCommandButton(self.panel, self.mw.commands.UngroupSelected, style='Toolbutton', image='context_ungroup')
		b.pack(side = LEFT)
		tooltips.AddDescription(b, _('Ungroup'))
		
		b = TCommandButton(self.panel, self.mw.commands.UngrAll, style='Toolbutton', image='context_ungroupall')
		b.pack(side = LEFT)
		tooltips.AddDescription(b, _('Ungroup All'))
Пример #10
0
	def __init__(self, parent):
		self.my_changes=0
		
		CtxSubPanel.__init__(self, parent)
		self.var_jump_number=DoubleVar(self.mw.root)
		
		unit = config.preferences.default_unit
		var_jump_unit = StringVar(self.mw.root)
		self.var_jump = LengthVar(10, unit, self.var_jump_number, var_jump_unit)
		
		label = TLabel(self.panel, text=_("Jump:"))
		label.pack(side = LEFT, padx=2)
		self.entry_jump = TSpinbox(self.panel,  var=0, 
						vartype=1, textvariable = self.var_jump_number,
						min = 0, max = 1000, step = .1, width = 6, command = self.applyJump)
		self.entry_jump.pack(side = LEFT, padx=2)
		config.preferences.Subscribe(CHANGED, self.update)		
		self.var_jump.set(config.preferences.handle_jump)
		self.update(0, 0)	
Пример #11
0
    def __init__(self, parent):
        CtxSubPanel.__init__(self, parent)
        self.my_changes = 0

        self.var_unit = StringVar(self.mw.root)
        self.var_unit.set(config.preferences.default_unit)

        label = TLabel(self.panel, text=_("Units:"))
        label.pack(side=LEFT, padx=2)
        self.entry_width = TCombobox(self.panel,
                                     state='readonly',
                                     postcommand=self.applyUnits,
                                     values=self.make_units(),
                                     width=4,
                                     style='ComboNormal',
                                     textvariable=self.var_unit)
        self.entry_width.pack(side=LEFT, padx=2)

        config.preferences.Subscribe(CHANGED, self.update)
Пример #12
0
	def __init__(self, parent):
		CtxSubPanel.__init__(self, parent)
		self.angle=DoubleVar(self.mw.root)
		self.angle.set(0)
		
		label = TLabel(self.panel, image='context_R')
		label.pack(side = LEFT)
		self.entry_width = TSpinbox(self.panel,  var=0, vartype=1, textvariable = self.angle,
						min = -360, max = 360, step = 1, width = 6, command = self.applyRotate)
		tooltips.AddDescription(self.entry_width, _('Rotation angle'))
		self.entry_width.pack(side = LEFT, padx=5)
		b = TButton(self.panel, command=self.rotLeft, style='Toolbutton', image='context_rotate_ccw')
		tooltips.AddDescription(b, _(u'Rotate -90°'))
		b.pack(side = LEFT)
		b = TButton(self.panel,  command=self.rot180, style='Toolbutton', image='context_rotate')
		tooltips.AddDescription(b, _(u'Rotate 180°'))
		b.pack(side = LEFT)
		b = TButton(self.panel,  command=self.rotRight, style='Toolbutton', image='context_rotate_cw')
		tooltips.AddDescription(b, _(u'Rotate 90°'))
		b.pack(side = LEFT)
Пример #13
0
    def __init__(self, parent):
        CtxSubPanel.__init__(self, parent)
        self.radius1 = DoubleVar(self.mw.root, 0)
        self.radius2 = DoubleVar(self.mw.root, 0)
        label = TLabel(self.panel, image='context_rect_rx')
        label.pack(side=LEFT, padx=2)
        self.entry_radius1 = TSpinbox(self.panel,
                                      var=0,
                                      vartype=1,
                                      textvariable=self.radius1,
                                      min=0,
                                      max=100,
                                      step=1,
                                      width=6,
                                      command=self.applyRadius1)
        self.entry_radius1.pack(side=LEFT, padx=2)
        tooltips.AddDescription(self.entry_radius1,
                                _('Horizontal radius of rounded corners'))

        #--------------
        sep = FlatFrame(self.panel, width=4, height=2)
        sep.pack(side=LEFT)
        #--------------

        label = TLabel(self.panel, image='context_rect_ry')
        label.pack(side=LEFT, padx=2)
        self.entry_radius2 = TSpinbox(self.panel,
                                      var=0,
                                      vartype=1,
                                      textvariable=self.radius2,
                                      min=0,
                                      max=100,
                                      step=1,
                                      width=6,
                                      command=self.applyRadius1)
        self.entry_radius2.pack(side=LEFT, padx=2)
        tooltips.AddDescription(self.entry_radius2,
                                _('Vertical radius of rounded corners'))

        self.ReSubscribe()
Пример #14
0
	def __init__(self, parent):
		CtxSubPanel.__init__(self, parent)
		self.var_reference = StringVar(self.mw.root,'left')
		self.var_stub = StringVar(self.mw.root)
			
		radio = UpdatedRadiobutton(self.panel, value='left', image='context_text_left', 
								command=self.applyProperties, variable=self.var_reference, style='ToolbarRadiobutton')
		radio.pack(side=LEFT)
		tooltips.AddDescription(radio, _('Left alignment'))
		radio = UpdatedRadiobutton(self.panel, value = 'center', image='context_text_center', 
								command=self.applyProperties, variable = self.var_reference, style='ToolbarRadiobutton')
		radio.pack(side=LEFT)
		tooltips.AddDescription(radio, _('Center alignment'))
		radio = UpdatedRadiobutton(self.panel, value = 'right', image='context_text_right', 
								command=self.applyProperties, variable = self.var_reference, style='ToolbarRadiobutton')
		radio.pack(side=LEFT)
		tooltips.AddDescription(radio, _('Right alignment'))
#		radio = UpdatedRadiobutton(self.panel, value = 'justify', image='context_text_justify_disabled', 
#								command=self.applyProperties, variable = self.var_stub, style='ToolbarRadiobutton', state='disabled')
#		radio.pack(side=LEFT)
#		tooltips.AddDescription(radio, _('Justify'))
						
		self.ReSubscribe()
Пример #15
0
	def __init__(self, parent):
		CtxSubPanel.__init__(self, parent)
		self.my_changes=0
		self.text_linegap=StringVar(self.mw.root,'100.0')
		self.text_wordgap=StringVar(self.mw.root,'100.0')
		self.text_chargap=StringVar(self.mw.root,'100.0')

		
		label = TLabel(self.panel, image='context_between_word')
		label.pack(side = LEFT)
		tooltips.AddDescription(label, _('Distance between words'))
		self.entry_word = TSpinbox(self.panel, var=100.0, vartype=1, textvariable = self.text_wordgap,
						min = 0, max = 5000, step = 10, width = 6, command = self.applyProperties)
		self.entry_word.pack(side = LEFT, padx=2)

		label = TLabel(self.panel, text='% ')
		label.pack(side = LEFT)
		label = TLabel(self.panel, image='context_between_line')
		label.pack(side = LEFT)
		tooltips.AddDescription(label, _('Distance between lines'))
		self.entry_line = TSpinbox(self.panel, var=100.0, vartype=1, textvariable = self.text_linegap,
						min = 0, max = 5000, step = 10, width = 6, command = self.applyProperties)
		self.entry_line.pack(side = LEFT, padx=2)

		label = TLabel(self.panel, text='% ')
		label.pack(side = LEFT)	
		label = TLabel(self.panel, image='context_between_char')
		label.pack(side = LEFT)
		tooltips.AddDescription(label, _('Distance between characters'))
		self.entry_char = TSpinbox(self.panel, var=100.0, vartype=1, textvariable = self.text_chargap,
						min = 0, max = 5000, step = 10, width = 6, command = self.applyProperties)
		self.entry_char.pack(side = LEFT, padx=2)
		label = TLabel(self.panel, text='% ')
		label.pack(side = LEFT)	
				
		self.ReSubscribe()
Пример #16
0
    def __init__(self, parent):
        CtxSubPanel.__init__(self, parent)
        self.angle = DoubleVar(self.mw.root)
        self.angle.set(0)

        label = TLabel(self.panel, image='context_R')
        label.pack(side=LEFT)
        self.entry_width = TSpinbox(self.panel,
                                    var=0,
                                    vartype=1,
                                    textvariable=self.angle,
                                    min=-360,
                                    max=360,
                                    step=1,
                                    width=6,
                                    command=self.applyRotate)
        tooltips.AddDescription(self.entry_width, _('Rotation angle'))
        self.entry_width.pack(side=LEFT, padx=5)
        b = TButton(self.panel,
                    command=self.rotLeft,
                    style='Toolbutton',
                    image='context_rotate_ccw')
        tooltips.AddDescription(b, _(u'Rotate -90°'))
        b.pack(side=LEFT)
        b = TButton(self.panel,
                    command=self.rot180,
                    style='Toolbutton',
                    image='context_rotate')
        tooltips.AddDescription(b, _(u'Rotate 180°'))
        b.pack(side=LEFT)
        b = TButton(self.panel,
                    command=self.rotRight,
                    style='Toolbutton',
                    image='context_rotate_cw')
        tooltips.AddDescription(b, _(u'Rotate 90°'))
        b.pack(side=LEFT)
Пример #17
0
	def __init__(self, parent):
		CtxSubPanel.__init__(self, parent)
		self.my_changes=0
		self.var_width_number=DoubleVar(self.mw.root)
		self.var_height_number=DoubleVar(self.mw.root)

		var_width_unit = StringVar(self.mw.root)
		var_height_unit = StringVar(self.mw.root)
		
		unit = config.preferences.default_unit
		self.var_width = LengthVar(10, unit, self.var_width_number, var_width_unit)
		self.var_height = LengthVar(10, unit,self.var_height_number,var_height_unit)
		
		jump=config.preferences.default_unit_jump
		self.var_width.set(0)
		self.var_height.set(0)
		
		label = TLabel(self.panel, image='size_h')
		label.pack(side = LEFT)
		
		self.entry_width = TSpinbox(self.panel,  var=0, vartype=1, textvariable = self.var_width_number,
						min = 0, max = 50000, step = jump, width = 6, command = self.applyResize)
		tooltips.AddDescription(self.entry_width, _("Width of selection"))
		self.entry_width.pack(side = LEFT, padx=5)


		label = TLabel(self.panel, image='size_v')
		label.pack(side = LEFT)
		
		self.entry_height = TSpinbox(self.panel,  var=0, vartype=1, textvariable = self.var_height_number,
						min = 0, max = 50000, step = jump, width = 6, command = self.applyResize)
		tooltips.AddDescription(self.entry_height, _("Height of selection"))
		self.entry_height.pack(side = LEFT, padx=5)
		
		self.ReSubscribe()
		config.preferences.Subscribe(CHANGED, self.update_pref)
Пример #18
0
	def __init__(self, parent):
		CtxSubPanel.__init__(self, parent)
		self.radius1 = DoubleVar(self.mw.root, 0)
		self.radius2 = DoubleVar(self.mw.root, 0)
		label = TLabel(self.panel, image='context_rect_rx')
		label.pack(side=LEFT, padx=2)
		self.entry_radius1 = TSpinbox(self.panel, var=0, vartype=1, textvariable=self.radius1,
						min=0, max=100, step=1, width=6, command=self.applyRadius1)
		self.entry_radius1.pack(side=LEFT, padx=2)
		tooltips.AddDescription(self.entry_radius1, _('Horizontal radius of rounded corners'))

		#--------------
		sep = FlatFrame(self.panel, width=4, height=2)
		sep.pack(side=LEFT)
		#--------------

		label = TLabel(self.panel, image='context_rect_ry')
		label.pack(side=LEFT, padx=2)
		self.entry_radius2 = TSpinbox(self.panel, var=0, vartype=1, textvariable=self.radius2,
						min=0, max=100, step=1, width=6, command=self.applyRadius1)
		self.entry_radius2.pack(side=LEFT, padx=2)
		tooltips.AddDescription(self.entry_radius2, _('Vertical radius of rounded corners'))

		self.ReSubscribe()
Пример #19
0
 def __init__(self, parent):
     CtxSubPanel.__init__(self, parent)
     self.start = DoubleVar(self.mw.root, 0)
     self.end = DoubleVar(self.mw.root, 0)
     self.builded = 0
     self.ReSubscribe()
Пример #20
0
	def __init__(self, parent):
		CtxSubPanel.__init__(self, parent)
		self.start = DoubleVar(self.mw.root, 0)
		self.end = DoubleVar(self.mw.root, 0)
		self.builded = 0
		self.ReSubscribe()
Пример #21
0
    def __init__(self, parent):
        CtxSubPanel.__init__(self, parent)

        self.var_font_name = StringVar(self.mw.root, " ")
        self.var_style_name = StringVar(self.mw.root, " ")
        self.var_font_size = StringVar(self.mw.root, " ")

        label = TLabel(self.panel, image="context_font_name")
        label.pack(side=LEFT, padx=2)
        tooltips.AddDescription(label, _("Font name"))
        self.font_name = TCombobox(
            self.panel,
            state="readonly",
            postcommand=self.name_changed,
            values=self.make_families(),
            width=25,
            style="PseudoActive",
            textvariable=self.var_font_name,
        )
        self.font_name.pack(side=LEFT, padx=2)

        label = TLabel(self.panel, text=" ")
        label.pack(side=LEFT)

        label = TLabel(self.panel, image="context_font_style")
        label.pack(side=LEFT)
        tooltips.AddDescription(label, _("Font style"))
        self.style_name = TCombobox(
            self.panel,
            state="readonly",
            postcommand=self.style_changed,
            values=(),
            width=18,
            style="PseudoActive",
            textvariable=self.var_style_name,
        )
        self.style_name.pack(side=LEFT, padx=2)

        label = TLabel(self.panel, text=" ")
        label.pack(side=LEFT)

        label = TLabel(self.panel, image="context_font_size")
        label.pack(side=LEFT)
        tooltips.AddDescription(label, _("Font size"))
        self.font_size = TCombobox(
            self.panel,
            state="normal",
            postcommand=self.apply_changes,
            values=self.make_sizes(),
            width=5,
            style="ComboNormal",
            textvariable=self.var_font_size,
        )
        self.font_size.pack(side=LEFT, padx=2)

        ######################################
        self.var_bold = StringVar(self.mw.root, "")
        self.var_italic = StringVar(self.mw.root, "")
        self.var_underline = StringVar(self.mw.root, "")

        self.bold_check = UpdatedRadiobutton(
            self.panel,
            value="bold",
            image="context_text_bold",
            command=self.bold_action,
            variable=self.var_bold,
            style="ToolbarRadiobutton",
        )
        self.bold_check.pack(side=LEFT, padx=2)
        tooltips.AddDescription(self.bold_check, _("Bold"))

        self.italic_check = UpdatedRadiobutton(
            self.panel,
            value="italic",
            image="context_text_italic",
            command=self.italic_action,
            variable=self.var_italic,
            style="ToolbarRadiobutton",
        )
        self.italic_check.pack(side=LEFT, padx=2)
        tooltips.AddDescription(self.italic_check, _("Italic"))

        # 		self.underline_check = UpdatedRadiobutton(self.panel, value = 'under', image='context_text_under_disabled', state='disabled',
        # 								command=self.action, variable = self.var_underline, style='ToolbarRadiobutton')
        # 		self.underline_check.pack(side=LEFT, padx=2)
        # 		tooltips.AddDescription(self.underline_check, _('Underline'))

        self.ReSubscribe()
Пример #22
0
 def __init__(self, parent):
     CtxSubPanel.__init__(self, parent)
     self.builded = 0
     self.ReSubscribe()
Пример #23
0
	def __init__(self, parent):
		CtxSubPanel.__init__(self, parent)

		self.USER_SPECIFIC = _("<Custom Size>")

		root = self.mw.root
		self.var_format_name = StringVar(root)
		self.var_format_name.set(config.preferences.default_paper_format)
		self.page_orientation = config.preferences.default_page_orientation

		label = TLabel(self.panel, text=_("Page:"))
		label.pack(side=LEFT, padx=2)
		self.page_formats = TCombobox(self.panel, state='readonly', postcommand=self.set_format,
									 values=self.make_formats(), width=17, style='ComboNormal',
									 textvariable=self.var_format_name)
		tooltips.AddDescription(self.page_formats, _("Page formats"))
		self.page_formats.pack(side=LEFT, padx=2)

		#--------------
		sep = FlatFrame(self.panel, width=5, height=2)
		sep.pack(side=LEFT)
		#--------------

		var_width_number = DoubleVar(root)
		var_height_number = DoubleVar(root)
		var_width_unit = StringVar(root)
		var_height_unit = StringVar(root)
		unit = config.preferences.default_unit
		self.var_width = LengthVar(10, unit, var_width_number, var_width_unit)
		self.var_height = LengthVar(10, unit, var_height_number, var_height_unit)
		jump = config.preferences.default_unit_jump

		label = TLabel(self.panel, text=_("H:"))
		label.pack(side=LEFT)
		self.widthentry = TSpinbox(self.panel, textvariable=var_width_number, command=self.applyResize,
								vartype=1, min=5, max=50000, step=jump, width=7)
		tooltips.AddDescription(self.widthentry, _("Page width"))
		self.widthentry.pack(side=LEFT, padx=2)

		#--------------
		sep = FlatFrame(self.panel, width=5, height=2)
		sep.pack(side=LEFT)
		#--------------

		label = TLabel(self.panel, text=_("V:"))
		label.pack(side=LEFT)
		self.heightentry = TSpinbox(self.panel, textvariable=var_height_number, command=self.applyResize,
		 						vartype=1, min=5, max=50000, step=jump, width=7)
		tooltips.AddDescription(self.heightentry, _("Page height"))
		self.heightentry.pack(side=LEFT, padx=2)

		self.portrait_val = StringVar(root)
		self.landscape_val = StringVar(root)

		self.portrait = TCheckbutton(self.panel, image='context_portrait', variable=self.portrait_val,
								   command=self.set_portrait, style='ToolBarCheckButton')
		tooltips.AddDescription(self.portrait, _("Portrait"))
		self.portrait.pack(side=LEFT, padx=2)
		self.landscape = TCheckbutton(self.panel, image='context_landscape', variable=self.landscape_val,
									command=self.set_landscape, style='ToolBarCheckButton')
		tooltips.AddDescription(self.landscape, _("Landscape"))
		self.landscape.pack(side=LEFT)
		config.preferences.Subscribe(CHANGED, self.update_pref)
		self.doc.Subscribe(PAGE, self.update_pref)
		self.doc.Subscribe(UNDO, self.update_pref)
Пример #24
0
    def __init__(self, parent):
        CtxSubPanel.__init__(self, parent)

        self.USER_SPECIFIC = _("<Custom Size>")

        root = self.mw.root
        self.var_format_name = StringVar(root)
        self.var_format_name.set(config.preferences.default_paper_format)
        self.page_orientation = config.preferences.default_page_orientation

        label = TLabel(self.panel, text=_("Page:"))
        label.pack(side=LEFT, padx=2)
        self.page_formats = TCombobox(self.panel,
                                      state='readonly',
                                      postcommand=self.set_format,
                                      values=self.make_formats(),
                                      width=17,
                                      style='ComboNormal',
                                      textvariable=self.var_format_name)
        tooltips.AddDescription(self.page_formats, _("Page formats"))
        self.page_formats.pack(side=LEFT, padx=2)

        #--------------
        sep = FlatFrame(self.panel, width=5, height=2)
        sep.pack(side=LEFT)
        #--------------

        var_width_number = DoubleVar(root)
        var_height_number = DoubleVar(root)
        var_width_unit = StringVar(root)
        var_height_unit = StringVar(root)
        unit = config.preferences.default_unit
        self.var_width = LengthVar(10, unit, var_width_number, var_width_unit)
        self.var_height = LengthVar(10, unit, var_height_number,
                                    var_height_unit)
        jump = config.preferences.default_unit_jump

        label = TLabel(self.panel, text=_("H:"))
        label.pack(side=LEFT)
        self.widthentry = TSpinbox(self.panel,
                                   textvariable=var_width_number,
                                   command=self.applyResize,
                                   vartype=1,
                                   min=5,
                                   max=50000,
                                   step=jump,
                                   width=7)
        tooltips.AddDescription(self.widthentry, _("Page width"))
        self.widthentry.pack(side=LEFT, padx=2)

        #--------------
        sep = FlatFrame(self.panel, width=5, height=2)
        sep.pack(side=LEFT)
        #--------------

        label = TLabel(self.panel, text=_("V:"))
        label.pack(side=LEFT)
        self.heightentry = TSpinbox(self.panel,
                                    textvariable=var_height_number,
                                    command=self.applyResize,
                                    vartype=1,
                                    min=5,
                                    max=50000,
                                    step=jump,
                                    width=7)
        tooltips.AddDescription(self.heightentry, _("Page height"))
        self.heightentry.pack(side=LEFT, padx=2)

        self.portrait_val = StringVar(root)
        self.landscape_val = StringVar(root)

        self.portrait = TCheckbutton(self.panel,
                                     image='context_portrait',
                                     variable=self.portrait_val,
                                     command=self.set_portrait,
                                     style='ToolBarCheckButton')
        tooltips.AddDescription(self.portrait, _("Portrait"))
        self.portrait.pack(side=LEFT, padx=2)
        self.landscape = TCheckbutton(self.panel,
                                      image='context_landscape',
                                      variable=self.landscape_val,
                                      command=self.set_landscape,
                                      style='ToolBarCheckButton')
        tooltips.AddDescription(self.landscape, _("Landscape"))
        self.landscape.pack(side=LEFT)
        config.preferences.Subscribe(CHANGED, self.update_pref)
        self.doc.Subscribe(PAGE, self.update_pref)
        self.doc.Subscribe(UNDO, self.update_pref)
Пример #25
0
    def __init__(self, parent):
        CtxSubPanel.__init__(self, parent)

        self.var_font_name = StringVar(self.mw.root, ' ')
        self.var_style_name = StringVar(self.mw.root, ' ')
        self.var_font_size = StringVar(self.mw.root, ' ')

        label = TLabel(self.panel, image='context_font_name')
        label.pack(side=LEFT, padx=2)
        tooltips.AddDescription(label, _('Font name'))
        self.font_name = TCombobox(self.panel,
                                   state='readonly',
                                   postcommand=self.name_changed,
                                   values=self.make_families(),
                                   width=25,
                                   style='PseudoActive',
                                   textvariable=self.var_font_name)
        self.font_name.pack(side=LEFT, padx=2)

        label = TLabel(self.panel, text=' ')
        label.pack(side=LEFT)

        label = TLabel(self.panel, image='context_font_style')
        label.pack(side=LEFT)
        tooltips.AddDescription(label, _('Font style'))
        self.style_name = TCombobox(self.panel,
                                    state='readonly',
                                    postcommand=self.style_changed,
                                    values=(),
                                    width=18,
                                    style='PseudoActive',
                                    textvariable=self.var_style_name)
        self.style_name.pack(side=LEFT, padx=2)

        label = TLabel(self.panel, text=' ')
        label.pack(side=LEFT)

        label = TLabel(self.panel, image='context_font_size')
        label.pack(side=LEFT)
        tooltips.AddDescription(label, _('Font size'))
        self.font_size = TCombobox(self.panel,
                                   state='normal',
                                   postcommand=self.apply_changes,
                                   values=self.make_sizes(),
                                   width=5,
                                   style='ComboNormal',
                                   textvariable=self.var_font_size)
        self.font_size.pack(side=LEFT, padx=2)

        ######################################
        self.var_bold = StringVar(self.mw.root, '')
        self.var_italic = StringVar(self.mw.root, '')
        self.var_underline = StringVar(self.mw.root, '')

        self.bold_check = UpdatedRadiobutton(self.panel,
                                             value='bold',
                                             image='context_text_bold',
                                             command=self.bold_action,
                                             variable=self.var_bold,
                                             style='ToolbarRadiobutton')
        self.bold_check.pack(side=LEFT, padx=2)
        tooltips.AddDescription(self.bold_check, _('Bold'))

        self.italic_check = UpdatedRadiobutton(self.panel,
                                               value='italic',
                                               image='context_text_italic',
                                               command=self.italic_action,
                                               variable=self.var_italic,
                                               style='ToolbarRadiobutton')
        self.italic_check.pack(side=LEFT, padx=2)
        tooltips.AddDescription(self.italic_check, _('Italic'))

        #		self.underline_check = UpdatedRadiobutton(self.panel, value = 'under', image='context_text_under_disabled', state='disabled',
        #								command=self.action, variable = self.var_underline, style='ToolbarRadiobutton')
        #		self.underline_check.pack(side=LEFT, padx=2)
        #		tooltips.AddDescription(self.underline_check, _('Underline'))

        self.ReSubscribe()
Пример #26
0
 def __init__(self, parent):
     CtxSubPanel.__init__(self, parent)
     self.builded = 0
     self.ReSubscribe()
Пример #27
0
	def __init__(self, parent):
		CtxSubPanel.__init__(self, parent)
		b = TCommandButton(self.panel, self.mw.commands.ConvertToCurve, style='Toolbutton', image='context_to_curve')
		b.pack(side = LEFT)
		tooltips.AddDescription(b, _('Convert to curve'))