def _createNonHeaderWidgets(self): self.imagePropsStaticBox = wx.StaticBox(self, wx.ID_ANY, _extstr(u"imagedialog.ImageProperties")) #$NON-NLS-1$ self.sizeStaticBox = wx.StaticBox(self, wx.ID_ANY, _extstr(u"imagedialog.Size")) #$NON-NLS-1$ self.alignmentStaticBox = wx.StaticBox(self, wx.ID_ANY, _extstr(u"imagedialog.Alignment")) #$NON-NLS-1$ self.borderStaticBox = wx.StaticBox(self, wx.ID_ANY, _extstr(u"imagedialog.Border")) #$NON-NLS-1$ self.srcLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _extstr(u"imagedialog.Src")) #$NON-NLS-1$ #$NON-NLS-2$ self.altTextLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _extstr(u"imagedialog.ALTText")) #$NON-NLS-1$ #$NON-NLS-2$ self.titleLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _extstr(u"imagedialog.Title")) #$NON-NLS-1$ #$NON-NLS-2$ self.classLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _extstr(u"imagedialog.Class")) #$NON-NLS-1$ #$NON-NLS-2$ self.widthLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _extstr(u"imagedialog.Width")) #$NON-NLS-1$ #$NON-NLS-2$ self.heightLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _extstr(u"imagedialog.Height")) #$NON-NLS-1$ #$NON-NLS-2$ wildcard = u"Image files|*.gif;*.jpg;*.png;*.jpeg" #$NON-NLS-1$ self.filePicker = wx.FilePickerCtrl(self, wildcard=wildcard,style=wx.FLP_OPEN|wx.FLP_FILE_MUST_EXIST )#|wx.FLP_USE_TEXTCTRL) self.srcText = ZValidatingTextCtrl(ZFileUrlSelectionValidator(_extstr(u"imagedialog.InvalidImageURLError")), self, wx.ID_ANY) #$NON-NLS-1$ self.altText = wx.TextCtrl(self, wx.ID_ANY) self.titleText = wx.TextCtrl(self, wx.ID_ANY) self.classText = wx.TextCtrl(self, wx.ID_ANY) self.lockAspect = wx.CheckBox(self,wx.ID_ANY, u"%s" % _extstr(u"imagedialog.LockAspect")) #$NON-NLS-2$ #$NON-NLS-1$ flags = ZIntegerSelectionValidator.ALLOW_EMPTY | ZIntegerSelectionValidator.ALLOW_ZERO | ZIntegerSelectionValidator.POSITIVE_ONLY self.widthText = ZValidatingTextCtrl(ZIntegerSelectionValidator(flags=flags), self, wx.ID_ANY) self.heightText = ZValidatingTextCtrl(ZIntegerSelectionValidator(flags=flags), self, wx.ID_ANY) alignments = [] for aname in ZImageAlignMenuLabels.ALIGN_KEYWORDS: alignments.append( ZImageAlignMenuLabels.ALIGN_LABELS[aname] ) #$NON-NLS-1$ self.alignChoices = wx.Choice(self, wx.ID_ANY, (100, 50), choices = alignments) self.borderStyleLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _extstr(u"imagedialog.Style")) #$NON-NLS-1$ #$NON-NLS-2$ self.borderWidthLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _extstr(u"imagedialog.Width")) #$NON-NLS-1$ #$NON-NLS-2$ self.borderColorLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _extstr(u"imagedialog.Color")) #$NON-NLS-1$ #$NON-NLS-2$ borders = [] for bname in ZImageBorderMenuLabels.BORDER_KEYWORDS: borders.append( ZImageBorderMenuLabels.BORDER_LABELS[bname] ) self.borderStyles = wx.Choice(self, wx.ID_ANY, (200, 50), choices = borders) self.borderWidthValidator = ZCssLengthSelectionValidator() self.borderWidthText = ZValidatingTextCtrl(self.borderWidthValidator, self, wx.ID_ANY) self.borderColorPicker = wx.ColourPickerCtrl(self) self.marginStaticBox = wx.StaticBox(self, wx.ID_ANY, _extstr(u"imagedialog.Margin")) #$NON-NLS-1$ self.marginLeftLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _extstr(u"imagedialog.Left")) #$NON-NLS-1$ #$NON-NLS-2$ self.marginRightLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _extstr(u"imagedialog.Right")) #$NON-NLS-1$ #$NON-NLS-2$ self.marginTopLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _extstr(u"imagedialog.Top")) #$NON-NLS-1$ #$NON-NLS-2$ self.marginBotLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _extstr(u"imagedialog.Bottom")) #$NON-NLS-1$ #$NON-NLS-2$ self.marginTopText = ZValidatingTextCtrl(ZCssLengthSelectionValidator(flags=ZCssLengthSelectionValidator.ALLOW_EMPTY), self, wx.ID_ANY) self.marginBotText = ZValidatingTextCtrl(ZCssLengthSelectionValidator(flags=ZCssLengthSelectionValidator.ALLOW_EMPTY), self, wx.ID_ANY) self.marginLeftText = ZValidatingTextCtrl(ZCssLengthSelectionValidator(flags=ZCssLengthSelectionValidator.ALLOW_EMPTY), self, wx.ID_ANY) self.marginRightText = ZValidatingTextCtrl(ZCssLengthSelectionValidator(flags=ZCssLengthSelectionValidator.ALLOW_EMPTY), self, wx.ID_ANY)
def _createNonHeaderWidgets(self): self.doNotGenRadioButton = wx.RadioButton(self, wx.ID_ANY, _extstr(u"imagehandlerdialog.DoNotGenerateOption")) #$NON-NLS-1$ self.genRadioButton = wx.RadioButton(self, wx.ID_ANY, _extstr(u"imagehandlerdialog.GenerateOption")) #$NON-NLS-1$ self.tnSettingsGroupBox = wx.StaticBox(self, wx.ID_ANY, _extstr(u"imagehandlerdialog.ThumbnailSettings")) #$NON-NLS-1$ self.sizeLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _extstr(u"imagehandlerdialog.Size")) #$NON-NLS-1$ #$NON-NLS-2$ sizeChoices = [] for size in ZThumbnailSizeMenuLabels.SIZE_KEYWORDS: sizeChoices.append(ZThumbnailSizeMenuLabels.SIZE_LABELS[size]) self.sizeChoice = wx.Choice(self, wx.ID_ANY, (100, 50), choices = sizeChoices) self.alignLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _blogappextstr(u"imagedialog.Alignment")) #$NON-NLS-1$ #$NON-NLS-2$ alignments = [] for aname in ZImageAlignMenuLabels.ALIGN_KEYWORDS: alignments.append( ZImageAlignMenuLabels.ALIGN_LABELS[aname] ) #$NON-NLS-1$ self.alignChoice = wx.Choice(self, wx.ID_ANY, (100, 50), choices = alignments) self.borderStaticBox = wx.StaticBox(self, wx.ID_ANY, _blogappextstr(u"imagedialog.Border")) #$NON-NLS-1$ self.borderStyleLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _blogappextstr(u"imagedialog.Style")) #$NON-NLS-1$ #$NON-NLS-2$ self.borderWidthLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _blogappextstr(u"imagedialog.Width")) #$NON-NLS-1$ #$NON-NLS-2$ self.borderColorLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _blogappextstr(u"imagedialog.Color")) #$NON-NLS-1$ #$NON-NLS-2$ borders = [] for bname in ZImageBorderMenuLabels.BORDER_KEYWORDS: borders.append( ZImageBorderMenuLabels.BORDER_LABELS[bname] ) self.borderStyleChoice = wx.Choice(self, wx.ID_ANY, (200, 50), choices = borders) self.borderWidthValidator = ZCssLengthSelectionValidator() self.borderWidthText = ZValidatingTextCtrl(self.borderWidthValidator, self, wx.ID_ANY) self.borderColorPicker = wx.ColourPickerCtrl(self) self.marginStaticBox = wx.StaticBox(self, wx.ID_ANY, _blogappextstr(u"imagedialog.Margin")) #$NON-NLS-1$ self.marginLeftLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _blogappextstr(u"imagedialog.Left")) #$NON-NLS-1$ #$NON-NLS-2$ self.marginRightLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _blogappextstr(u"imagedialog.Right")) #$NON-NLS-1$ #$NON-NLS-2$ self.marginTopLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _blogappextstr(u"imagedialog.Top")) #$NON-NLS-1$ #$NON-NLS-2$ self.marginBotLabel = wx.StaticText(self, wx.ID_ANY, u"%s:" % _blogappextstr(u"imagedialog.Bottom")) #$NON-NLS-1$ #$NON-NLS-2$ self.marginTopText = ZValidatingTextCtrl(ZCssLengthSelectionValidator(flags=ZCssLengthSelectionValidator.ALLOW_EMPTY), self, wx.ID_ANY, size=wx.Size(25, -1)) self.marginBotText = ZValidatingTextCtrl(ZCssLengthSelectionValidator(flags=ZCssLengthSelectionValidator.ALLOW_EMPTY), self, wx.ID_ANY, size=wx.Size(25, -1)) self.marginLeftText = ZValidatingTextCtrl(ZCssLengthSelectionValidator(flags=ZCssLengthSelectionValidator.ALLOW_EMPTY), self, wx.ID_ANY, size=wx.Size(25, -1)) self.marginRightText = ZValidatingTextCtrl(ZCssLengthSelectionValidator(flags=ZCssLengthSelectionValidator.ALLOW_EMPTY), self, wx.ID_ANY, size=wx.Size(25, -1))
def _createContentWidgets(self): self.settingsStaticBox = wx.StaticBox( self, wx.ID_ANY, _extstr(u"tabledialog.TableSettings")) #$NON-NLS-1$ if self.model.isInsertMode(): self.rowsLabel = wx.StaticText( self, wx.ID_ANY, u"%s:" % _extstr(u"tabledialog.Rows")) #$NON-NLS-1$ #$NON-NLS-2$ self.rowsText = ZValidatingTextCtrl( ZIntegerSelectionValidator( flags=ZIntegerSelectionValidator.POSITIVE_ONLY), self, wx.ID_ANY) self.colsLabel = wx.StaticText( self, wx.ID_ANY, u"%s:" % _extstr(u"tabledialog.Cols")) #$NON-NLS-1$ #$NON-NLS-2$ self.colsText = ZValidatingTextCtrl( ZIntegerSelectionValidator( flags=ZIntegerSelectionValidator.POSITIVE_ONLY), self, wx.ID_ANY) flags = ZCssLengthSelectionValidator.ALLOW_EMPTY self.paddingLabel = wx.StaticText( self, wx.ID_ANY, u"%s:" % _extstr(u"tabledialog.CellPadding")) #$NON-NLS-1$ #$NON-NLS-2$ self.paddingText = ZValidatingTextCtrl( ZCssLengthSelectionValidator(flags=flags), self, wx.ID_ANY) self.spacingLabel = wx.StaticText( self, wx.ID_ANY, u"%s:" % _extstr(u"tabledialog.CellSpacing")) #$NON-NLS-1$ #$NON-NLS-2$ self.spacingText = ZValidatingTextCtrl( ZCssLengthSelectionValidator(flags=flags), self, wx.ID_ANY) self.borderLabel = wx.StaticText( self, wx.ID_ANY, u"%s:" % _extstr(u"tabledialog.Border")) #$NON-NLS-1$ #$NON-NLS-2$ self.borderText = ZValidatingTextCtrl( ZCssLengthSelectionValidator(flags=flags), self, wx.ID_ANY) self.widthLabel = wx.StaticText( self, wx.ID_ANY, u"%s:" % _extstr(u"tabledialog.Width")) #$NON-NLS-1$ #$NON-NLS-2$ self.widthText = ZValidatingTextCtrl(ZCssLengthSelectionValidator(), self, wx.ID_ANY)