def __init__(self, parent): MyWizPage.__init__(self, parent) vb = wm.vbox() l = wm.label( self, """Set the server parameters. Make sure to set a port number\nthat is not already in use.""" ) vb.add(l, 0) hb = wm.hbox() l = wm.label(self, 'Address:') hb.add(l, 0) s = wm.string(self, '127.0.0.1') hb.add(s, 5) self.s_addr = s l = wm.label(self, 'Port:') hb.add(l, 0) s = wm.string(self, '8000') hb.add(s, 5) self.s_port = s vb.add(hb, 0) self.SetSizer(vb)
def __init__(self, parent): MyWizPage.__init__(self, parent) vb = wm.vbox() l = wm.label( self, """Choose a location to store your wiki. I recommend\ncreating a new folder, or picking an empty folder here.""" ) vb.add(l, 0) hb = wm.hbox() l = wm.label(self, 'Folder:') hb.add(l, 0) s = wm.string(self, '') hb.add(s, 5) self.s_rootdir = s b = wm.button(self, 'Browse ...', self.on_browse) hb.add(b, 2) vb.add(hb, 0) self.SetSizer(vb) self.Bind(wiz.EVT_WIZARD_PAGE_CHANGING, self.on_changing)
def __init__(self, parent): MyWizPage.__init__(self, parent) vb = wm.vbox() l = wm.label(self, """Pick a name for your wiki SQLite file.""") vb.add(l, 0) hb = wm.hbox() l = wm.label(self, 'Filename:') hb.add(l, 0) s = wm.string(self, 'wiki.db') hb.add(s, 5) self.s_filename = s vb.add(hb, 0) l = wm.label( self, "Your wiki will be stored in as a single SQLite database file.\nThis file will be stored in your wiki folder." ) fn = l.GetFont() fn.SetStyle(wx.FONTSTYLE_SLANT) l.SetFont(fn) vb.add(l, 0) self.SetSizer(vb)
def __init__(self, parent): MyWizPage.__init__(self, parent) vb = wm.vbox() l = wm.label( self, """Choose a storage format. Don't worry too much\nabout your choice here, you can always change it later.""" ) vb.add(l, 0) h = hlink.HyperLinkCtrl( self, label="More about storage formats", URL="http://wikklytext.com/wiki/WhichFormat_.html") vb.add(h, 0) rb = wm.radiobox( self, "Storage Format", [ 'Text files. Creates one .txt file per wiki item.', 'TiddlyWiki file. Entire wiki is stored in a single .html file.', 'SQLite Database. Wiki is stored in a single database file.' ], nr_cols=1) vb.add(rb, 0) rb.set(2) self.rb_format = rb self.SetSizer(vb)
def __init__(self, parent): MyWizPage.__init__(self, parent) vb = wm.vbox() l = wm.label( self, """Welcome to WikklyText!\n\nTo get started, I need to know where you'd like me to store your personal settings.""" ) vb.add(l, 0) h = hlink.HyperLinkCtrl( self, label="More about these options", URL="http://wikklytext.com/wiki/WikGuiConfigFolder.html") vb.add(h, 0) rb = wm.radiobox( self, "Choose a Configuration Path", [ "User folder (%s)" % CfgPathUser(), "Executable folder (%s)" % CfgPathExe(), "Other folder" ], nr_cols=1) vb.add(rb, 0) self.rb = rb self.SetSizer(vb)
def __init__(self, parent): wx.Panel.__init__(self, parent, -1, style=wx.WANTS_CHARS) tID = wx.NewId() vbox = wm.vbox() self.images = wx.ImageList(15, 16) self.img_uparrow = self.images.Add(wikimages.getUpArrowBitmap()) self.img_downarrow = self.images.Add(wikimages.getDownArrowBitmap()) self.img_greenball = self.images.Add(wikimages.getGreenBallBitmap()) self.img_hollowcircle = self.images.Add( wikimages.getHollowCircleBitmap()) self.img_error = self.images.Add(wikimages.getErrorBitmap()) self.list = WikListCtrl( self, tID, style=wx.LC_REPORT #| wx.BORDER_SUNKEN | wx.BORDER_NONE | wx.LC_EDIT_LABELS | wx.LC_SORT_ASCENDING #| wx.LC_NO_HEADER #| wx.LC_VRULES #| wx.LC_HRULES #| wx.LC_SINGLE_SEL ) self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.on_doubleclick, self.list) self.list.SetImageList(self.images, wx.IMAGE_LIST_SMALL) vbox.Add(self.list, 1, wx.EXPAND) self.init_columns() # Now that the list exists we can init the other base class, # see wx/lib/mixins/listctrl.py self.itemDataMap = {} listmix.ColumnSorterMixin.__init__(self, 4) #self.SortListItems(0, True) for path in get_wiki_list(): self.add_wiki(path) # make running PIDs to wiki paths self.procmap = {} # catch processes when they exit self.Bind(wx.EVT_END_PROCESS, self.on_process_ended) self.timer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self.on_timer, self.timer) self.timer.Start(1000, oneShot=True) self.SetSizer(vbox) vbox.SetSizeHints(self) self.SetAutoLayout(True)
def __init__(self, parent): wx.Panel.__init__(self, parent, -1, style=wx.WANTS_CHARS) tID = wx.NewId() vbox = wm.vbox() self.images = wx.ImageList(15,16) self.img_uparrow = self.images.Add(wikimages.getUpArrowBitmap()) self.img_downarrow = self.images.Add(wikimages.getDownArrowBitmap()) self.img_greenball = self.images.Add(wikimages.getGreenBallBitmap()) self.img_hollowcircle = self.images.Add(wikimages.getHollowCircleBitmap()) self.img_error = self.images.Add(wikimages.getErrorBitmap()) self.list = WikListCtrl(self, tID, style=wx.LC_REPORT #| wx.BORDER_SUNKEN | wx.BORDER_NONE | wx.LC_EDIT_LABELS | wx.LC_SORT_ASCENDING #| wx.LC_NO_HEADER #| wx.LC_VRULES #| wx.LC_HRULES #| wx.LC_SINGLE_SEL ) self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.on_doubleclick, self.list) self.list.SetImageList(self.images, wx.IMAGE_LIST_SMALL) vbox.Add(self.list, 1, wx.EXPAND) self.init_columns() # Now that the list exists we can init the other base class, # see wx/lib/mixins/listctrl.py self.itemDataMap = {} listmix.ColumnSorterMixin.__init__(self, 4) #self.SortListItems(0, True) for path in get_wiki_list(): self.add_wiki(path) # make running PIDs to wiki paths self.procmap = {} # catch processes when they exit self.Bind(wx.EVT_END_PROCESS, self.on_process_ended) self.timer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self.on_timer, self.timer) self.timer.Start(1000, oneShot=True) self.SetSizer(vbox) vbox.SetSizeHints(self) self.SetAutoLayout(True)
def __init__(self, parent): MyWizPage.__init__(self, parent) vb = wm.vbox() rt = RichTextCtrl(self, style=wx.VSCROLL | wx.HSCROLL) self.rt = rt rt.SetEditable(False) vb.add(rt, 1) self.SetSizer(vb) self.Bind(wiz.EVT_WIZARD_PAGE_CHANGED, self.on_changed)
def __init__(self, parent, title): wx.Frame.__init__(self,parent,-1,title) vb = wm.vbox() t = wm.text(self, '') vb.add(t,1,border=0) self.text = t t.set_editable(False) self.Bind(wx.EVT_CLOSE, self.on_close) self.SetSizer(vb) vb.SetSizeHints(self) self.SetAutoLayout(True) self.SetSize((400,300))
def __init__(self, parent, title): wx.Frame.__init__(self, parent, -1, title) vb = wm.vbox() t = wm.text(self, '') vb.add(t, 1, border=0) self.text = t t.set_editable(False) self.Bind(wx.EVT_CLOSE, self.on_close) self.SetSizer(vb) vb.SetSizeHints(self) self.SetAutoLayout(True) self.SetSize((400, 300))
def __init__(self, parent): MyWizPage.__init__(self, parent) vb = wm.vbox() l = wm.label( self, """I will set some parameters to optimize performance for your\nintended usage. Please select the most appropriate choice below:""" ) vb.add(l, 0) #h = hlink.HyperLinkCtrl(self, label="More about storage formats", URL="http://wikklytext.com/wiki/WhichFormat_.html") #vb.add(h,0) rb = wm.radiobox( self, "Storage Media", ['Local Hard Drive', 'Networked Hard Drive', 'USB Device'], nr_cols=1) vb.add(rb, 0) rb.set(0) self.rb_storage = rb self.SetSizer(vb)
def __init__(self,parent): wx.Frame.__init__(self,parent,-1,'Wik Control Center') vbox = wm.vbox() p = WikListCtrlPanel(self) vbox.add(p,6,border=0) self.panel = p hb = wm.hbox() b = wxbuttons.GenBitmapTextButton(self, bitmap = wikimages.getAddBitmap(), label = 'Add ...') hb.add(b,1,border=0) self.Bind(wx.EVT_BUTTON, self.on_add, b) b = wxbuttons.GenBitmapTextButton(self, bitmap = wikimages.getBrowseBitmap(), label = 'Browse') hb.add(b,1,border=0) self.Bind(wx.EVT_BUTTON, self.on_browse, b) b = wxbuttons.GenBitmapTextButton(self, bitmap = wikimages.getReloadBitmap(), label = 'Restart') hb.add(b,1,border=0) self.Bind(wx.EVT_BUTTON, self.on_restart, b) b = wxbuttons.GenBitmapTextButton(self, bitmap = wikimages.getRedXBitmap(), label = 'Stop') hb.add(b,1,border=0) self.Bind(wx.EVT_BUTTON, self.on_stop, b) vbox.add(hb,1,border=0) hb = wm.hbox() b = wxbuttons.GenBitmapTextButton(self, bitmap = wikimages.getWrenchBitmap(), label = 'Configure ...') hb.add(b,1,border=0) self.Bind(wx.EVT_BUTTON, self.on_configure, b) b = wxbuttons.GenBitmapTextButton(self, bitmap = wikimages.getInspectBitmap(), label = 'View Log') hb.add(b,1,border=0) self.Bind(wx.EVT_BUTTON, self.on_viewlog, b) b = wxbuttons.GenBitmapTextButton(self, bitmap = wikimages.getTrashBitmap(), label = 'Remove') hb.add(b,1,border=0) self.Bind(wx.EVT_BUTTON, self.on_remove, b) b = wxbuttons.GenBitmapTextButton(self, bitmap = wikimages.getHelpBitmap(), label = 'Help') hb.add(b,1,border=0) self.Bind(wx.EVT_BUTTON, self.on_help, b) vbox.add(hb, 1, border=0) self.Bind(wx.EVT_CLOSE, self.on_close) self.SetIcon(wikimages.getMainIconIcon()) self.SetSizer(vbox) vbox.SetSizeHints(self) self.SetAutoLayout(True) wx.CallAfter(self.on_startup)
def __init__(self, parent): wx.Dialog.__init__(self, parent, -1, "Wiki Configuration") vb = wm.vbox() hb = wm.hbox() l = wm.label(self, 'Location:') hb.add(l,0) s = wm.string(self, '') hb.add(s, 5) self.s_rootdir = s b = wm.button(self, 'Browse ...', self.on_choose_rootdir) hb.add(b, 2) self.b_browse_rootdir = b vb.add(hb,1) hb = wm.hbox() l = wm.label(self, 'Storage format:') hb.add(l,0) self.l_format = l cb = wm.combo(self, ['Text (.txt) files', 'TiddlyWiki (.html) file', 'SQLite database'], self.on_choose_format) hb.add(cb,1) self.cb_format = cb vb.add(hb,1) hb = wm.hbox() l = wm.label(self, 'Filename:') hb.add(l,0) self.l_filename = l s = wm.string(self, '') hb.add(s, 5) self.s_filename = s b = wm.button(self, 'Browse ...') hb.add(b, 2) self.b_browse_file = b vb.add(hb,1) hb = wm.hbox() l = wm.label(self, 'Server address:') hb.add(l,0) self.l_server_addr = l s = wm.string(self, '127.0.0.1') hb.add(s, 5) self.s_server_addr = s l = wm.label(self, 'Port:') hb.add(l,0) self.l_server_port = l s = wm.string(self, '8000') hb.add(s, 5) self.s_server_port = s vb.add(hb,1) hb = wm.hbox() b = wm.button(self,'Save',self.on_save) hb.add(b,1) b = wm.button(self, 'Cancel',self.on_cancel) hb.add(b,1) b = wm.button(self, 'Help') hb.add(b,1) vb.add(hb,1) self.SetSizer(vb) vb.SetSizeHints(self) self.SetAutoLayout(True) wx.CallAfter(self.update_enables)
def __init__(self, parent): wx.Frame.__init__(self, parent, -1, 'Wik Control Center') vbox = wm.vbox() p = WikListCtrlPanel(self) vbox.add(p, 6, border=0) self.panel = p hb = wm.hbox() b = wxbuttons.GenBitmapTextButton(self, bitmap=wikimages.getAddBitmap(), label='Add ...') hb.add(b, 1, border=0) self.Bind(wx.EVT_BUTTON, self.on_add, b) b = wxbuttons.GenBitmapTextButton(self, bitmap=wikimages.getBrowseBitmap(), label='Browse') hb.add(b, 1, border=0) self.Bind(wx.EVT_BUTTON, self.on_browse, b) b = wxbuttons.GenBitmapTextButton(self, bitmap=wikimages.getReloadBitmap(), label='Restart') hb.add(b, 1, border=0) self.Bind(wx.EVT_BUTTON, self.on_restart, b) b = wxbuttons.GenBitmapTextButton(self, bitmap=wikimages.getRedXBitmap(), label='Stop') hb.add(b, 1, border=0) self.Bind(wx.EVT_BUTTON, self.on_stop, b) vbox.add(hb, 1, border=0) hb = wm.hbox() b = wxbuttons.GenBitmapTextButton(self, bitmap=wikimages.getWrenchBitmap(), label='Configure ...') hb.add(b, 1, border=0) self.Bind(wx.EVT_BUTTON, self.on_configure, b) b = wxbuttons.GenBitmapTextButton(self, bitmap=wikimages.getInspectBitmap(), label='View Log') hb.add(b, 1, border=0) self.Bind(wx.EVT_BUTTON, self.on_viewlog, b) b = wxbuttons.GenBitmapTextButton(self, bitmap=wikimages.getTrashBitmap(), label='Remove') hb.add(b, 1, border=0) self.Bind(wx.EVT_BUTTON, self.on_remove, b) b = wxbuttons.GenBitmapTextButton(self, bitmap=wikimages.getHelpBitmap(), label='Help') hb.add(b, 1, border=0) self.Bind(wx.EVT_BUTTON, self.on_help, b) vbox.add(hb, 1, border=0) self.Bind(wx.EVT_CLOSE, self.on_close) self.SetIcon(wikimages.getMainIconIcon()) self.SetSizer(vbox) vbox.SetSizeHints(self) self.SetAutoLayout(True) wx.CallAfter(self.on_startup)
def __init__(self, parent): wx.Dialog.__init__(self, parent, -1, "Wiki Configuration") vb = wm.vbox() hb = wm.hbox() l = wm.label(self, 'Location:') hb.add(l, 0) s = wm.string(self, '') hb.add(s, 5) self.s_rootdir = s b = wm.button(self, 'Browse ...', self.on_choose_rootdir) hb.add(b, 2) self.b_browse_rootdir = b vb.add(hb, 1) hb = wm.hbox() l = wm.label(self, 'Storage format:') hb.add(l, 0) self.l_format = l cb = wm.combo(self, [ 'Text (.txt) files', 'TiddlyWiki (.html) file', 'SQLite database' ], self.on_choose_format) hb.add(cb, 1) self.cb_format = cb vb.add(hb, 1) hb = wm.hbox() l = wm.label(self, 'Filename:') hb.add(l, 0) self.l_filename = l s = wm.string(self, '') hb.add(s, 5) self.s_filename = s b = wm.button(self, 'Browse ...') hb.add(b, 2) self.b_browse_file = b vb.add(hb, 1) hb = wm.hbox() l = wm.label(self, 'Server address:') hb.add(l, 0) self.l_server_addr = l s = wm.string(self, '127.0.0.1') hb.add(s, 5) self.s_server_addr = s l = wm.label(self, 'Port:') hb.add(l, 0) self.l_server_port = l s = wm.string(self, '8000') hb.add(s, 5) self.s_server_port = s vb.add(hb, 1) hb = wm.hbox() b = wm.button(self, 'Save', self.on_save) hb.add(b, 1) b = wm.button(self, 'Cancel', self.on_cancel) hb.add(b, 1) b = wm.button(self, 'Help') hb.add(b, 1) vb.add(hb, 1) self.SetSizer(vb) vb.SetSizeHints(self) self.SetAutoLayout(True) wx.CallAfter(self.update_enables)