def __init__(self, parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.TR_HAS_BUTTONS | wx.TR_HIDE_ROOT | wx.TR_MULTIPLE, validator=wx.DefaultValidator, name="FitTree"): wx.TreeCtrl.__init__(self, parent, id, pos, size, style) # Define the control # This is set by the mainFrame # self.control = pdfguicontrol() # Define bitmaps datasetbmp = wx.Bitmap(iconpath("datasetitem.png")) phasebmp = wx.Bitmap(iconpath("phaseitem.png")) fitbmp = wx.Bitmap(iconpath("fititem.png")) calcbmp = wx.Bitmap(iconpath("calculationitem.png")) isz = (16, 16) il = wx.ImageList(isz[0], isz[1]) self.fitbmid = il.Add(fitbmp) self.dtsbmid = il.Add(datasetbmp) self.phabmid = il.Add(phasebmp) self.clcbmid = il.Add(calcbmp) self.SetImageList(il) self.treeImageList = il return
def __init__(self, parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.TR_HAS_BUTTONS|wx.TR_HIDE_ROOT|wx.TR_MULTIPLE, validator=wx.DefaultValidator, name="FitTree"): wx.TreeCtrl.__init__(self, parent, id, pos, size, style) # Define the control # This is set by the mainFrame # self.control = pdfguicontrol() # Define bitmaps datasetbmp = wx.Bitmap(iconpath("datasetitem.png")) phasebmp = wx.Bitmap(iconpath("phaseitem.png")) fitbmp = wx.Bitmap(iconpath("fititem.png")) calcbmp = wx.Bitmap(iconpath("calculationitem.png")) isz = (16,16) il = wx.ImageList(isz[0], isz[1]) self.fitbmid = il.Add(fitbmp) self.dtsbmid = il.Add(datasetbmp) self.phabmid = il.Add(phasebmp) self.clcbmid = il.Add(calcbmp) self.SetImageList(il) self.treeImageList = il return
def __init__(self, canvas): NavToolbar.__init__(self, canvas) # Load customized icon image save_icon_fp = iconpath('exportplotdata.png') save_icon = wx.Bitmap(save_icon_fp) # Add new buttons self.AddSimpleTool(DATA_SAVE_ID, save_icon, 'Export plot data', 'Export plot data to file') return
def __init__(self, *args, **kwds): PDFPanel.__init__(self) wx.Panel.__init__(self, *args, **kwds) kwds["style"] = wx.TAB_TRAVERSAL bitmap = wx.Bitmap(iconpath("titlepage.png")) self.bitmap_1 = wx.StaticBitmap(self, -1, bitmap) self.__set_properties() self.__do_layout() return
def __init__(self, *args, **kwds): PDFPanel.__init__(self) wx.Panel.__init__(self, *args, **kwds) kwds["style"] = wx.TAB_TRAVERSAL image = wx.Image(iconpath("titlepage.png"), wx.BITMAP_TYPE_PNG) bitmap = wx.BitmapFromImage(image) self.bitmap_1 = wx.StaticBitmap(self, -1, bitmap) self.__set_properties() self.__do_layout() return
def __init__(self, canvas): NavToolbar.__init__(self, canvas) wx12.patchToolBarMethods(self) # Load customized icon image save_icon_fp = iconpath('exportplotdata.png') save_icon = wx.Bitmap(save_icon_fp) # Add new buttons self.AddTool(DATA_SAVE_ID, "Export data", save_icon, shortHelp='Export plot data to file') return
def __init__(self, *args, **kwds): # begin wxGlade: DialogAbout.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE wx.Dialog.__init__(self, *args, **kwds) self.SetSize((600, 595)) self.bitmap_logo = wx.StaticBitmap(self, wx.ID_ANY, wx.Bitmap(iconpath("logo.png"))) self.label_title = wx.StaticText(self, wx.ID_ANY, "PDFgui") self.label_version = wx.StaticText(self, wx.ID_ANY, "") self.label_build = wx.StaticText(self, wx.ID_ANY, "Build:") self.label_svnrevision = wx.StaticText(self, wx.ID_ANY, "") self.label_copyright = wx.StaticText(self, wx.ID_ANY, "") self.label_author = wx.StaticText(self, wx.ID_ANY, "author") self.hyperlink = wx.lib.agw.hyperlink.HyperLinkCtrl(self, wx.ID_ANY, _homepage, URL=_homepage) self.hyperlink_license = wx.lib.agw.hyperlink.HyperLinkCtrl( self, wx.ID_ANY, _license, URL=_license) self.static_line_1 = wx.StaticLine(self, wx.ID_ANY) self.label_acknowledgement = wx.StaticText(self, wx.ID_ANY, "") self.hyperlink_paper = wx.lib.agw.hyperlink.HyperLinkCtrl(self, wx.ID_ANY, _paper, URL=_paper) self.static_line_2 = wx.StaticLine(self, wx.ID_ANY) self.bitmap_button_nsf = wx.BitmapButton(self, wx.ID_ANY, wx.NullBitmap) self.bitmap_button_danse = wx.BitmapButton(self, wx.ID_ANY, wx.NullBitmap) self.bitmap_button_msu = wx.BitmapButton(self, wx.ID_ANY, wx.NullBitmap) self.bitmap_button_columbia = wx.BitmapButton(self, wx.ID_ANY, wx.NullBitmap) self.static_line_3 = wx.StaticLine(self, wx.ID_ANY) self.button_OK = wx.Button(self, wx.ID_OK, "OK") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.onNsfLogo, self.bitmap_button_nsf) self.Bind(wx.EVT_BUTTON, self.onDanseLogo, self.bitmap_button_danse) self.Bind(wx.EVT_BUTTON, self.onMsuLogo, self.bitmap_button_msu) self.Bind(wx.EVT_BUTTON, self.onColumbiaLogo, self.bitmap_button_columbia) # end wxGlade # randomly shuffle authors' names random.shuffle(_authors) strLabel = ", ".join(_authors) self.label_author.SetLabel(strLabel) # setup acknowledgement and copyright text labels self.label_acknowledgement.SetLabel(_acknowledgement) self.label_copyright.SetLabel(_copyright) # display version and svn revison numbers verwords = __version__.split('.post', 1) version = verwords[0] revision = '0' if len(verwords) == 1 else verwords[1] self.label_version.SetLabel(version) self.label_svnrevision.SetLabel(revision) # set bitmaps for logo buttons logo = wx.Bitmap(iconpath("nsf_logo.png")) self.bitmap_button_nsf.SetBitmapLabel(logo) logo = wx.Bitmap(iconpath("danse_logo.png")) self.bitmap_button_danse.SetBitmapLabel(logo) logo = wx.Bitmap(iconpath("msu_logo.png")) self.bitmap_button_msu.SetBitmapLabel(logo) logo = wx.Bitmap(iconpath("columbia_logo.png")) self.bitmap_button_columbia.SetBitmapLabel(logo) # resize dialog window to fit version number nicely self.Fit() return
def __init__(self, *args, **kwds): # begin wxGlade: DialogAbout.__init__ kwds["style"] = wx.DEFAULT_DIALOG_STYLE wx.Dialog.__init__(self, *args, **kwds) self.bitmap_logo = wx.StaticBitmap(self, -1, wx.Bitmap(iconpath("logo.png"))) self.label_title = wx.StaticText(self, -1, "PDFgui") self.label_version = wx.StaticText(self, -1, "") self.label_build = wx.StaticText(self, -1, "Build:") self.label_svnrevision = wx.StaticText(self, -1, "") self.label_copyright = wx.StaticText(self, -1, "(c) 2005-2009,") self.label_author = wx.StaticText(self, -1, "author") self.hyperlink = wx.lib.agw.hyperlink.HyperLinkCtrl(self, -1, _homepage, URL=_homepage) self.hyperlink_paper = wx.lib.agw.hyperlink.HyperLinkCtrl(self, -1, _paper, URL=_paper) self.hyperlink_license = wx.lib.agw.hyperlink.HyperLinkCtrl(self, -1, _license, URL=_license) self.static_line_1 = wx.StaticLine(self, -1) self.label_acknowledgement = wx.StaticText(self, -1, _acknowledgement) self.static_line_2 = wx.StaticLine(self, -1) self.bitmap_button_nsf = wx.BitmapButton(self, -1, wx.NullBitmap) self.bitmap_button_danse = wx.BitmapButton(self, -1, wx.NullBitmap) self.bitmap_button_msu = wx.BitmapButton(self, -1, wx.NullBitmap) self.bitmap_button_columbia = wx.BitmapButton(self, -1, wx.NullBitmap) self.static_line_3 = wx.StaticLine(self, -1) self.button_OK = wx.Button(self, wx.ID_OK, "OK") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.onNsfLogo, self.bitmap_button_nsf) self.Bind(wx.EVT_BUTTON, self.onDanseLogo, self.bitmap_button_danse) self.Bind(wx.EVT_BUTTON, self.onMsuLogo, self.bitmap_button_msu) self.Bind(wx.EVT_BUTTON, self.onColumbiaLogo, self.bitmap_button_columbia) # end wxGlade # randomly shuffle authors' names random.shuffle(_authors) strLabel = ", ".join(_authors) self.label_author.SetLabel(strLabel) # set copyright year to that of the current release syear = __date__[:4] scprt = self.label_copyright.GetLabel().replace('2009', syear) self.label_copyright.SetLabel(scprt) # display version and svn revison numbers verwords = __version__.split('.post', 1) version = verwords[0] revision = '0' if len(verwords) == 1 else verwords[1] self.label_version.SetLabel(version) self.label_svnrevision.SetLabel(revision) # set bitmaps for logo buttons logo = wx.Bitmap(iconpath("nsf_logo.png")) self.bitmap_button_nsf.SetBitmapLabel(logo) logo = wx.Bitmap(iconpath("danse_logo.png")) self.bitmap_button_danse.SetBitmapLabel(logo) logo = wx.Bitmap(iconpath("msu_logo.png")) self.bitmap_button_msu.SetBitmapLabel(logo) logo = wx.Bitmap(iconpath("columbia_logo.png")) self.bitmap_button_columbia.SetBitmapLabel(logo) # resize dialog window to fit version number nicely self.Fit() return