示例#1
0
	def build(self):
		grid = wal.GridPanel(self.panel, rows=4, cols=2, vgap=5, hgap=5)
		self.panel.pack(grid, expand=True, fill=True, padding_all=5)
		grid.add_growable_col(1)
		grid.add_growable_row(3)

		grid.pack(wal.Label(grid, _('Palette name:')))
		self.name_entry = wal.Entry(grid, value=self.palette.model.name)
		grid.pack(self.name_entry, fill=True)

		grid.pack(wal.Label(grid, _('Palette source:')))
		self.source_entry = wal.Entry(grid, value=self.palette.model.source)
		grid.pack(self.source_entry, fill=True)

		grid.pack(wal.Label(grid, _('Columns:')))
		cols = self.palette.model.columns
		size = len(self.palette.model.colors)
		self.cols = wal.IntSpin(grid, value=cols, range_val=(1, size),
							spin_overlay=config.spin_overlay)
		grid.pack(self.cols)

		grid.pack(wal.Label(grid, _('Description:')))
		self.comm_entry = wal.Entry(grid, value=self.palette.model.comments,
									multiline=True)
		grid.pack(self.comm_entry, fill=True)
    def __init__(self, parent, printer, app):
        self.printer = printer
        self.app = app
        wal.LabeledPanel.__init__(self, parent, _('Document metainfo'))

        grid = wal.GridPanel(self, 4, 2, 2, 5)
        grid.add_growable_col(1)

        grid.pack(wal.Label(grid, _('Title:')))
        self.title = wal.Entry(grid, self.printer.meta_title)
        grid.pack(self.title, fill=True)

        grid.pack(wal.Label(grid, _('Subject:')))
        self.subject = wal.Entry(grid, self.printer.meta_subject)
        grid.pack(self.subject, fill=True)

        grid.pack(wal.Label(grid, _('Author:')))
        self.author = wal.Entry(grid, self.printer.meta_author)
        grid.pack(self.author, fill=True)

        grid.pack(wal.Label(grid, _('Keywords:')))
        self.keywords = wal.Entry(grid, self.printer.meta_keywords)
        grid.pack(self.keywords, fill=True)

        self.pack(grid, fill=True, expand=True, padding_all=7)
示例#3
0
    def build(self):
        name, copyrigth, info = get_profile_descr(self.filepath)
        filename = os.path.basename(self.filepath)
        copyrigth = copyrigth or '--'
        info = info or '--'
        grid = wal.GridPanel(self.panel, rows=4, cols=2, vgap=5, hgap=5)
        grid.add_growable_col(1)
        grid.add_growable_row(2)
        grid.add_growable_row(3)
        grid.pack(wal.Label(grid, _('Name:')))
        grid.pack(wal.Label(grid, name, True))
        grid.pack(wal.Label(grid, _('File:')))
        grid.pack(wal.Label(grid, filename))

        panel = wal.VPanel(grid)
        panel.pack(wal.Label(grid, _('Copyright:')), align_center=False)
        grid.pack(panel, fill=True)

        grid.pack(wal.Entry(grid, copyrigth, multiline=True, editable=False),
                  fill=True)

        panel = wal.VPanel(grid)
        panel.pack(wal.Label(grid, _('Description:')), align_center=False)
        grid.pack(panel, fill=True)

        grid.pack(wal.Entry(grid, info, multiline=True, editable=False),
                  fill=True)
        self.panel.pack(grid, fill=True, expand=True)
示例#4
0
    def build(self):
        self.metainfo = deepcopy(self.doc.model.metainfo)
        if self.metainfo[3]: self.metainfo[3] = b64decode(self.metainfo[3])

        grid = wal.GridPanel(self, 4, 2, 5, 5)
        grid.add_growable_col(1)
        grid.add_growable_row(3)

        grid.pack(wal.Label(grid, _('Author:')))
        self.author_field = wal.Entry(grid, '' + self.metainfo[0])
        grid.pack(self.author_field, fill=True)

        grid.pack(wal.Label(grid, _('License:')))
        self.license_field = wal.Entry(grid, '' + self.metainfo[1])
        grid.pack(self.license_field, fill=True)

        grid.pack(wal.Label(grid, _('Keywords:')))
        self.keys_field = wal.Entry(grid, '' + self.metainfo[2])
        grid.pack(self.keys_field, fill=True)

        grid.pack(wal.Label(grid, _('Notes:')))
        self.notes_field = wal.Entry(grid,
                                     '' + self.metainfo[3],
                                     multiline=True)
        grid.pack(self.notes_field, fill=True)

        self.pack(grid, fill=True, expand=True, padding_all=5)
	def __init__(self):
		wal.MainWindow.__init__(self)
		self.set_size(300, 200)
		self.txt0 = wal.Entry(self, 'Red', cmd=self.callback,
							check_focus=True, check_enter=True)
		txt1 = wal.Entry(self, 'Green')
		txt2 = wal.Entry(self, 'Blue')
		txt1.set_sensitive(False)
		txt2.set_editable(False)
		self.pack_all((self.txt0, txt1, txt2), padding=10)
示例#6
0
文件: panels.py 项目: zcy330/sk1-wx
    def build(self):
        grid = wal.GridPanel(self.cont, 8, 1, 5, 15)
        grid.add_growable_col(0)
        self.all_opt = wal.Radiobutton(grid,
                                       _('All'),
                                       group=True,
                                       onclick=self.update)
        self.sel_opt = wal.Radiobutton(grid,
                                       _('Selection'),
                                       onclick=self.update)
        self.cpage_opt = wal.Radiobutton(grid,
                                         _('Current page'),
                                         onclick=self.update)
        self.pages_opt = wal.Radiobutton(grid,
                                         _('Pages:'),
                                         onclick=self.update)
        self.pages_entry = wal.Entry(grid, '1', onchange=self.pages_changed)
        grid.pack(self.all_opt)
        grid.pack(self.sel_opt)
        grid.pack(self.cpage_opt)
        grid.pack(self.pages_opt)
        grid.pack(self.pages_entry, fill=True)
        title = _('Enter page numbers or page ranges.')
        title += '\n' + _('For example: 1,2,5-6')
        grid.pack(wal.Label(self, title, fontsize=-1))
        self.cont.pack(grid, fill=True, padding_all=5)

        self.pages_entry.set_enable(False)
        self.all_opt.set_value(True)
        if not self.printout.is_selection():
            self.sel_opt.set_enable(False)
        if not self.printout.get_num_pages() > 1:
            self.cpage_opt.set_enable(False)
            self.pages_opt.set_enable(False)
示例#7
0
 def build(self):
     self.pack(wal.Label(self, TXT), align_center=False, padding_all=5)
     self.editor = wal.Entry(self,
                             onchange=self.check_input,
                             onenter=self.process_input)
     self.pack(self.editor, fill=True, padding_all=5)
     self.set_dash(self.dash)
    def build(self):
        grid = wal.GridPanel(self, rows=5, cols=2, hgap=5, vgap=5)
        grid.add_growable_col(1)

        grid.pack(wal.Label(grid, _('Text filler:')))
        self.filler = wal.Entry(grid, config.font_preview_text)
        grid.pack(self.filler, fill=True)

        grid.pack(wal.Label(grid, _('Font size:')))
        self.fontsize = wal.IntSpin(grid, config.font_preview_size, (5, 50))
        grid.pack(self.fontsize)

        grid.pack(wal.Label(grid, _('Font color:')))
        self.fontcolor = wal.ColorButton(grid, config.font_preview_color)
        grid.pack(self.fontcolor)

        grid.pack(wal.Label(grid, _('Selection color:')))
        color = self.fontcolor.val255_to_dec(wal.UI_COLORS['selected_text_bg'])
        self.selcolor = wal.ColorButton(grid, color)
        grid.pack(self.selcolor)

        grid.pack(wal.Label(grid, _('Preview width:')))
        self.pwidth = wal.IntSpin(grid, config.font_preview_width, (100, 1000))
        grid.pack(self.pwidth)

        self.pack(grid, align_center=False, fill=True, padding=5)
        self.built = True
示例#9
0
    def __init__(self):
        wal.MainWindow.__init__(self)
        self.set_size(SIZE)

        self.pack(wal.Label(self, 'Regular entry'))

        self.entry1 = wal.Entry(self, 'entry', onchange=self.on_change,
            onenter=self.on_enter)
        self.pack(self.entry1)

        self.pack(wal.Label(self, 'Readonly entry'))

        self.entry2 = wal.Entry(self, 'r\o entry', editable=False)
        self.pack(self.entry2)

        self.pack(wal.Label(self, 'Multiline entry'))

        self.entry3 = wal.Entry(self, 'Multiline \nentry', multiline=True)
        self.pack(self.entry3, fill=True, expand=True)
示例#10
0
 def build(self):
     name, copyrigth, info = get_profile_descr(self.filepath)
     filename = os.path.basename(self.filepath)
     if not copyrigth: copyrigth = '--'
     if not info: info = '--'
     grid = wal.GridPanel(self.panel, vgap=5, hgap=5)
     grid.add_growable_col(1)
     grid.add_growable_row(2)
     grid.add_growable_row(3)
     grid.pack(wal.Label(grid, _('Name:')))
     grid.pack(wal.Label(grid, name, True))
     grid.pack(wal.Label(grid, _('File:')))
     grid.pack(wal.Label(grid, filename))
     grid.pack(wal.Label(grid, _('Copyrigth:')))
     grid.pack(wal.Entry(grid, copyrigth, multiline=True, editable=False),
               fill=True)
     grid.pack(wal.Label(grid, _('Description:')))
     grid.pack(wal.Entry(grid, info, multiline=True, editable=False),
               fill=True)
     self.panel.pack(grid, fill=True, expand=True)
示例#11
0
 def __init__(self, parent):
     wal.VPanel.__init__(self, parent)
     sep = "------------------------------\n"
     dev = "\nIgor E. Novikov\n"
     dev += "(sK1 2.0, wxWidgets version; sK1, Tk version)\n"
     dev += "<*****@*****.**>\n\n" + sep
     dev += 'sK1 2.0 is based on sK1 0.9.x and Skencil 0.6.x experience.'
     dev += '\n' + sep
     dev += "Bernhard Herzog (Skencil, Tk version)\n"
     dev += "<*****@*****.**>\n" + sep
     entry = wal.Entry(self, dev, multiline=True, editable=False)
     self.pack(entry, expand=True, fill=True, padding=5)
示例#12
0
 def build(self):
     self.toolbar = ConsoleToolbar(self, self)
     self.pack(self.toolbar, fill=True)
     hpanel = wal.HPanel(self)
     self.pack(hpanel, fill=True, expand=True)
     self.lpanel = wal.VPanel(hpanel)
     self.lpanel.set_bg(LEFT_PANEL)
     self.lpanel.pack((26, 26))
     hpanel.pack(self.lpanel, fill=True)
     hpanel.pack(wal.PLine(hpanel, SEP), fill=True)
     self.entry = wal.Entry(hpanel, '', multiline=True, editable=False,
                            richtext=True, no_border=True)
     self.entry.set_bg(BG_COLOR)
     hpanel.pack(self.entry, fill=True, expand=True)
     self.log_path = os.path.join(self.app.appdata.app_config_dir, 'sk1.log')
     self.load_logs(self.log_path)
示例#13
0
    def __init__(self, parent, cms_ref, color=None, onchange=None):
        wal.VPanel.__init__(self, parent)
        self.cms = cms_ref
        if color:
            self.color = color
        else:
            self.color = get_registration_black()
        if onchange:
            self.callback = onchange

        name_panel = wal.HPanel(self)
        name_panel.pack(wal.Label(name_panel, 'Name:'), padding=5)
        self.name_field = wal.Entry(name_panel,
                                    width=30,
                                    onchange=self.on_change)
        name_panel.pack(self.name_field)
        self.pack(name_panel, padding_all=5)

        grid = wal.GridPanel(self, 3, 4, 3, 5)

        grid.pack((1, 1))
        self.rgb_txt = wal.Label(grid, '---')
        grid.pack(self.rgb_txt)
        grid.pack((1, 1))
        grid.pack((1, 1))

        grid.pack((1, 1))
        self.cmyk_txt = wal.Label(grid, '---')
        grid.pack(self.cmyk_txt)
        grid.pack((1, 1))
        grid.pack((1, 1))

        grid.pack(wal.Label(grid, 'A:'))
        self.alpha_slider = ColoredAlphaSlider(grid,
                                               onchange=self.on_slider_change)
        grid.pack(self.alpha_slider)
        self.alpha_spin = wal.FloatSpin(grid,
                                        range_val=(0.0, 100.0),
                                        onchange=self.on_change,
                                        onenter=self.on_change)
        grid.pack(self.alpha_spin)
        grid.pack(wal.Label(self, '%'))

        self.pack(grid)
示例#14
0
	def __init__(self, parent, attrs):
		wal.VPanel.__init__(self, parent)
		hpanel = wal.HPanel(self)

		vp = wal.VPanel(hpanel)
		vp.set_bg(wal.UI_COLORS['border'])
		self.attrs_list = wal.SimpleList(vp, [],
								on_select=self.attrs_changed,
								on_activate=self.attrs_changed)
		vp.pack(self.attrs_list, expand=True, fill=True, padding_all=1)
		hpanel.pack(vp, expand=True, fill=True)

		hpanel.pack((10, 10))

		self.value = wal.Entry(hpanel, '', multiline=True, editable=False)
		hpanel.pack(self.value, expand=True, fill=True)

		self.pack(hpanel, fill=True, expand=True, padding_all=10)

		self.status_label = wal.Label(self, '---')
		self.pack(self.status_label, fill=True, align_center=False, padding_all=10)

		self.set_prn_attrs(attrs)
示例#15
0
    def __init__(self, parent, details):
        wal.VPanel.__init__(self, parent)
        hpanel = wal.HPanel(self)

        self.details_list = wal.SimpleList(hpanel, [],
                                           on_select=self.details_changed,
                                           on_activate=self.details_changed)
        hpanel.pack(self.details_list, expand=True, fill=True)

        hpanel.pack((10, 10))

        self.value = wal.Entry(hpanel, '', multiline=True, editable=False)
        hpanel.pack(self.value, expand=True, fill=True)

        self.pack(hpanel, fill=True, expand=True, padding_all=10)

        self.status_label = wal.Label(self, '---')
        self.pack(self.status_label,
                  fill=True,
                  align_center=False,
                  padding_all=10)

        self.set_prn_details(details)
示例#16
0
 def build(self):
     self.entry = wal.Entry(self, self.text, multiline=True)
     self.pack(self.entry, padding_all=5, fill=True, expand=True)
示例#17
0
 def build(self):
     self.entry = wal.Entry(self, self.text, width=self.width)
     self.pack(self.entry, padding_all=10, fill=True)
示例#18
0
 def __init__(self, parent):
     wal.VPanel.__init__(self, parent)
     entry = wal.Entry(self, TRANSLATORS, multiline=True, editable=False)
     self.pack(entry, expand=True, fill=True, padding=5)
示例#19
0
 def __init__(self, parent):
     wal.VPanel.__init__(self, parent)
     entry = wal.Entry(self, LICENSE, multiline=True, editable=False)
     self.pack(entry, expand=True, fill=True, padding_all=5)