Beispiel #1
0
def StackBrowser(root, flist=None, stack=None):
    top = Toplevel(root)
    sc = ScrolledCanvas(top, bg="white", highlightthickness=0)
    sc.frame.pack(expand=1, fill="both")
    item = StackTreeItem(flist)
    node = TreeNode(sc.canvas, None, item)
    node.expand()
Beispiel #2
0
def StackBrowser(root, flist=None, stack=None):
    top = Toplevel(root)
    sc = ScrolledCanvas(top, bg="white", highlightthickness=0)
    sc.frame.pack(expand=1, fill="both")
    item = StackTreeItem(flist)
    node = TreeNode(sc.canvas, None, item)
    node.expand()
Beispiel #3
0
def StackBrowser(root, flist=None, tb=None, top=None):
    if top is None:
        from Tkinter import Toplevel
        top = Toplevel(root)
    sc = ScrolledCanvas(top, bg="white", highlightthickness=0)
    sc.frame.pack(expand=1, fill="both")
    item = StackTreeItem(flist, tb)
    node = TreeNode(sc.canvas, None, item)
    node.expand()
Beispiel #4
0
def StackBrowser(root, flist=None, tb=None, top=None):
    if top is None:
        from Tkinter import Toplevel
        top = Toplevel(root)
    sc = ScrolledCanvas(top, bg="white", highlightthickness=0)
    sc.frame.pack(expand=1, fill="both")
    item = StackTreeItem(flist, tb)
    node = TreeNode(sc.canvas, None, item)
    node.expand()
Beispiel #5
0
def test():
    import sys
    from Tkinter import Toplevel
    import PyShell
    root = Toplevel(PyShell.root)
    root.configure(bd=0, bg="yellow")
    root.focus_set()
    sc = ScrolledCanvas(root, bg="white", highlightthickness=0, takefocus=1)
    sc.frame.pack(expand=1, fill="both")
    item = make_objecttreeitem("sys", sys)
    node = TreeNode(sc.canvas, None, item)
    node.expand()
def _test():
    import sys
    from Tkinter import Tk
    root = Tk()
    root.configure(bd=0, bg="yellow")
    root.focus_set()
    sc = ScrolledCanvas(root, bg="white", highlightthickness=0, takefocus=1)
    sc.frame.pack(expand=1, fill="both")
    item = make_objecttreeitem("sys", sys)
    node = TreeNode(sc.canvas, None, item)
    node.update()
    root.mainloop()
def test():
    import sys
    from Tkinter import Toplevel
    import PyShell
    root = Toplevel(PyShell.root)
    root.configure(bd=0, bg="yellow")
    root.focus_set()
    sc = ScrolledCanvas(root, bg="white", highlightthickness=0, takefocus=1)
    sc.frame.pack(expand=1, fill="both")
    item = make_objecttreeitem("sys", sys)
    node = TreeNode(sc.canvas, None, item)
    node.expand()
Beispiel #8
0
def _test():
    import sys
    from Tkinter import Tk
    root = Tk()
    root.configure(bd=0, bg="yellow")
    root.focus_set()
    sc = ScrolledCanvas(root, bg="white", highlightthickness=0, takefocus=1)
    sc.frame.pack(expand=1, fill="both")
    item = make_objecttreeitem("sys", sys)
    node = TreeNode(sc.canvas, None, item)
    node.update()
    root.mainloop()
Beispiel #9
0
def test():
    root = Tk()
    sys.exitfunc = root.quit
    root.configure(bd=0, bg="yellow")
    root.title("terminal directory changer")
    root.focus_set()
    sc = ScrolledCanvas(root, bg="white", highlightthickness=0, takefocus=1)
    sc.frame.pack(expand=1, fill="both")
    item = MyFileTreeItem('/')
    node = TreeNode(sc.canvas, None, item)
    node.expand()
    root.mainloop()
Beispiel #10
0
 def remote_stack_viewer(self):
     import RemoteObjectBrowser
     oid = self.rpcclt.remotequeue("exec", "stackviewer", ("flist",), {})
     if oid is None:
         self.tkconsole.root.bell()
         return
     item = RemoteObjectBrowser.StubObjectTreeItem(self.rpcclt, oid)
     from TreeWidget import ScrolledCanvas, TreeNode
     top = Toplevel(self.tkconsole.root)
     sc = ScrolledCanvas(top, bg="white", highlightthickness=0)
     sc.frame.pack(expand=1, fill="both")
     node = TreeNode(sc.canvas, None, item)
     node.expand()
Beispiel #11
0
 def remote_stack_viewer(self):
     import RemoteObjectBrowser
     oid = self.rpcclt.remotequeue("exec", "stackviewer", ("flist", ), {})
     if oid is None:
         self.tkconsole.root.bell()
         return
     item = RemoteObjectBrowser.StubObjectTreeItem(self.rpcclt, oid)
     from TreeWidget import ScrolledCanvas, TreeNode
     top = Toplevel(self.tkconsole.root)
     sc = ScrolledCanvas(top, bg="white", highlightthickness=0)
     sc.frame.pack(expand=1, fill="both")
     node = TreeNode(sc.canvas, None, item)
     node.expand()
Beispiel #12
0
 def remote_stack_viewer(self):
     import RemoteObjectBrowser
     oid = self.rpcclt.remotequeue("exec", "stackviewer", ("flist",), {})
     if oid is None:
         self.tkconsole.root.bell()
         return
     item = RemoteObjectBrowser.StubObjectTreeItem(self.rpcclt, oid)
     from TreeWidget import ScrolledCanvas, TreeNode
     top = Toplevel(self.tkconsole.root)
     theme = idleConf.GetOption('main','Theme','name')
     background = idleConf.GetHighlight(theme, 'normal')['background']
     sc = ScrolledCanvas(top, bg=background, highlightthickness=0)
     sc.frame.pack(expand=1, fill="both")
     node = TreeNode(sc.canvas, None, item)
     node.expand()
Beispiel #13
0
 def remote_stack_viewer(self):
     import RemoteObjectBrowser
     oid = self.rpcclt.remotequeue("exec", "stackviewer", ("flist", ), {})
     if oid is None:
         self.tkconsole.root.bell()
         return
     item = RemoteObjectBrowser.StubObjectTreeItem(self.rpcclt, oid)
     from TreeWidget import ScrolledCanvas, TreeNode
     top = Toplevel(self.tkconsole.root)
     theme = idleConf.GetOption('main', 'Theme', 'name')
     background = idleConf.GetHighlight(theme, 'normal')['background']
     sc = ScrolledCanvas(top, bg=background, highlightthickness=0)
     sc.frame.pack(expand=1, fill="both")
     node = TreeNode(sc.canvas, None, item)
     node.expand()
def _object_browser(parent):
    import sys
    from tkinter import Tk
    root = Tk()
    root.title("Test ObjectBrowser")
    width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
    root.geometry("+%d+%d" % (x, y + 150))
    root.configure(bd=0, bg="yellow")
    root.focus_set()
    sc = ScrolledCanvas(root, bg="white", highlightthickness=0, takefocus=1)
    sc.frame.pack(expand=1, fill="both")
    item = make_objecttreeitem("sys", sys)
    node = TreeNode(sc.canvas, None, item)
    node.update()
    root.mainloop()
Beispiel #15
0
 def build_tree(self):
     self.item = FileTreeItem(
         self.root, self.browsePath, filetypes=["cdr", "cmx", "ccx", "CDR", "CMX", "CCX"], preview=self.preview
     )
     self.node = TreeNode(self.tree.canvas, None, self.item)
     self.node.expand()
     self.preview.clearPreview()
Beispiel #16
0
 def init(self, flist):
     self.flist = flist
     # reset pyclbr
     pyclbr._modules.clear()
     # create top
     self.top = top = ListedToplevel(flist.root)
     top.protocol("WM_DELETE_WINDOW", self.close)
     top.bind("<Escape>", self.close)
     if self._htest:  # place dialog below parent if running htest
         top.geometry(
             "+%d+%d" %
             (flist.root.winfo_rootx(), flist.root.winfo_rooty() + 200))
     self.settitle()
     top.focus_set()
     # create scrolled canvas
     theme = idleConf.CurrentTheme()
     background = idleConf.GetHighlight(theme, 'normal')['background']
     sc = ScrolledCanvas(top,
                         bg=background,
                         highlightthickness=0,
                         takefocus=1)
     sc.frame.pack(expand=1, fill="both")
     item = self.rootnode()
     self.node = node = TreeNode(sc.canvas, None, item)
     node.update()
     node.expand()
Beispiel #17
0
class FileViewer:

    """The file tree browser """

    def __init__(self, browsePath=os_utils.gethome()):
        self.browsePath = browsePath
        self.build_window()

    def build_window(self):
        self.root = Tkinter.Tk()
        self.root.title("CDR/CMX/CDRX Explorer")

        if os.name == "nt":
            self.root.option_readfile("tkDefaultsWin", "interactive")
            self.browsePath = "../../"
        else:
            self.root.option_readfile("tkDefaults", "interactive")

        self.root.geometry("600x600+30+50")

        frame = Tkinter.Frame(self.root, border=5, relief="flat")
        frame.pack(side="top", expand=1, fill="both")

        treeFrame = Tkinter.Frame(frame, border=1, relief="flat", bg="#595D61")
        treeFrame.pack(side="left", expand=1, fill="both")

        self.preview = PreviewPanel(frame)
        self.preview.frame.pack(side="right", anchor="ne")

        self.refreshButton = WebButton(self.preview.frame, text="Refresh", command=self.build_tree)
        self.refreshButton.frame.pack(side="bottom", pady=10)

        self.tree = ScrolledCanvas(treeFrame, bg="#EDEDED", highlightthickness=0, takefocus=1)
        self.tree.frame.pack(side="top", expand=1, fill="both")
        self.build_tree()

    def build_tree(self):
        self.item = FileTreeItem(
            self.root, self.browsePath, filetypes=["cdr", "cmx", "ccx", "CDR", "CMX", "CCX"], preview=self.preview
        )
        self.node = TreeNode(self.tree.canvas, None, self.item)
        self.node.expand()
        self.preview.clearPreview()
Beispiel #18
0
def main():
    parser = ArgumentParser(description='browse a bookmarks_xxx.json file')
    parser.add_argument('jbfile',
                        help='the json file containing the bookmarks')
    args = parser.parse_args()
    root = Tk()
    sys.exitfunc = root.quit
    root.configure(bd=0, bg="yellow")
    root.title("bookmarks browser")
    root.focus_set()
    sc = ScrolledCanvas(root, bg="white", highlightthickness=0, takefocus=1)
    sc.frame.pack(expand=1, fill="both")
    fn = args.jbfile
    D = eval(file(fn).read())
    D['title'] = fn
    item = MyFileTreeItem(D)
    node = TreeNode(sc.canvas, None, item)
    node.expand()
    root.mainloop()
class FileViewer:

	"""The file tree browser """

	def __init__(self, browsePath=os_utils.gethome()):
		self.browsePath=browsePath
		self.build_window()	
		
	def build_window(self):
		self.root = Tkinter.Tk()
		self.root.title('CDR/CMX/CDRX Explorer')
		
		if os.name == 'nt':
			self.root.option_readfile('tkDefaultsWin', 'interactive')
			self.browsePath='../../'
		else:
			self.root.option_readfile('tkDefaults', 'interactive')
		
		self.root.geometry('600x600+30+50')
		
		frame = Tkinter.Frame(self.root, border=5, relief='flat')
		frame.pack(side='top', expand=1, fill='both')
		
		treeFrame = Tkinter.Frame(frame, border=1, relief='flat', bg='#595D61')
		treeFrame.pack(side='left', expand=1, fill='both')
		
		self.preview=PreviewPanel(frame)
		self.preview.frame.pack(side='right', anchor='ne')
		
		self.refreshButton=WebButton(self.preview.frame, text='Refresh', command=self.build_tree)
		self.refreshButton.frame.pack(side='bottom', pady=10)
		
		self.tree = ScrolledCanvas(treeFrame, bg='#EDEDED', highlightthickness=0, takefocus=1)
		self.tree.frame.pack(side='top', expand=1, fill='both')
		self.build_tree()

	def build_tree(self):
		self.item = FileTreeItem(self.root, self.browsePath, filetypes=['cdr','cmx','ccx','CDR','CMX','CCX'], preview=self.preview)
		self.node = TreeNode(self.tree.canvas, None, self.item)
		self.node.expand()
		self.preview.clearPreview()
Beispiel #20
0
 def init(self, flist):
     self.flist = flist
     # reset pyclbr
     pyclbr._modules.clear()
     # create top
     self.top = top = ListedToplevel(flist.root)
     top.protocol("WM_DELETE_WINDOW", self.close)
     top.bind("<Escape>", self.close)
     self.settitle()
     top.focus_set()
     # create scrolled canvas
     sc = ScrolledCanvas(top, bg="white", highlightthickness=0, takefocus=1)
     sc.frame.pack(expand=1, fill="both")
     item = self.rootnode()
     self.node = node = TreeNode(sc.canvas, None, item)
     node.update()
     node.expand()
 def init(self, flist):
     self.flist = flist
     # reset pyclbr
     pyclbr._modules.clear()
     # create top
     self.top = top = ListedToplevel(flist.root)
     top.protocol("WM_DELETE_WINDOW", self.close)
     top.bind("<Escape>", self.close)
     self.settitle()
     top.focus_set()
     # create scrolled canvas
     theme = idleConf.GetOption('main','Theme','name')
     background = idleConf.GetHighlight(theme, 'normal')['background']
     sc = ScrolledCanvas(top, bg=background, highlightthickness=0, takefocus=1)
     sc.frame.pack(expand=1, fill="both")
     item = self.rootnode()
     self.node = node = TreeNode(sc.canvas, None, item)
     node.update()
     node.expand()
	def build_tree(self):
		self.item = FileTreeItem(self.root, self.browsePath, filetypes=['cdr','cmx','ccx','CDR','CMX','CCX'], preview=self.preview)
		self.node = TreeNode(self.tree.canvas, None, self.item)
		self.node.expand()
		self.preview.clearPreview()
Beispiel #23
0
# XXX TO DO:
Beispiel #24
0
# XXX TO DO:
Beispiel #25
0
import os
Beispiel #26
0
"""Class browser.
Beispiel #27
0
import os