Example #1
0
    def __init__(self, root):
        self.root = root
        root.title('DINOCOIN Service Application' + ' Ver. ' +
                   self.root.version)
        #root.attributes("-topmost", True)
        root.columnconfigure(0, weight=1)
        root.rowconfigure(0, weight=1)
        # Create the panes and frames
        vertical_pane = ttk.PanedWindow(self.root, orient=VERTICAL)
        vertical_pane.grid(row=0, column=0, sticky="nsew")
        horizontal_pane = ttk.PanedWindow(vertical_pane, orient=HORIZONTAL)
        vertical_pane.add(horizontal_pane)
        form_frame = ttk.Labelframe(horizontal_pane, text="Manuel control")
        form_frame.columnconfigure(1, weight=1)
        horizontal_pane.add(form_frame, weight=1)
        console_frame = ttk.Labelframe(horizontal_pane, text="Log")
        console_frame.columnconfigure(0, weight=1)
        console_frame.rowconfigure(0, weight=1)
        horizontal_pane.add(console_frame, weight=1)
        third_frame = ttk.Labelframe(vertical_pane, text="Status ")
        vertical_pane.add(third_frame, weight=1)
        # Initialize all frames

        self.form = FormUi(form_frame)

        self.console = ConsoleUi(console_frame)
        self.third = ThirdUi(third_frame)
        self.MainTask = MainTask(self.root)
        self.MainTask.start()
        self.root.protocol('WM_DELETE_WINDOW', self.quit)
        self.root.bind('<Control-q>', self.quit)
        signal.signal(signal.SIGINT, self.quit)
Example #2
0
    def create_analysis(self, master):
        # Create paned windows
        all_pane = ttk.PanedWindow(master, orient=tk.VERTICAL)
        top_pane = ttk.PanedWindow(all_pane, orient=tk.HORIZONTAL)
        bottom_pane = ttk.PanedWindow(all_pane, orient=tk.HORIZONTAL)

        # Create top label frames
        f_config = ttk.Labelframe(top_pane, text='Configurations')
        f_current = ttk.Labelframe(top_pane, text='Current run')

        # Show Configurations to reserve size
        display_data(f_config, list(self.configs.values()),
                     list(self.configs.keys()))
        top_pane.add(f_config, weight=20)
        top_pane.add(f_current, weight=52)
        # top_pane.pack(side=tk.TOP, fill=tk.BOTH, expand=True)

        # Create bottom pane
        rnds = self.configs.get("num_rounds", 1)
        f_at_tx = ttk.Labelframe(bottom_pane, text=f'@ tx = {rnds}')
        f_at_100 = ttk.Labelframe(bottom_pane, text='@ all nodes 100% AoD')
        bottom_pane.add(f_at_tx, weight=20)
        bottom_pane.add(f_at_100, weight=31)

        # add panes to all_pane
        all_pane.add(top_pane)
        all_pane.add(bottom_pane)
        all_pane.pack(side=tk.TOP, fill=tk.BOTH, expand=True)

        # Show data
        display_data(f_current, self.data[0], self.headers_current)

        return f_config, f_current, f_at_tx, f_at_100
Example #3
0
    def __init__(self, luciferManager, parent, *args, **kwargs):
        """The Full GUI Application Setup"""
        super().__init__(parent, *args, **kwargs)
        self.parent = parent
        self.luciferManager = luciferManager

        self.base_font_name = self.find_font(
            ['TkDefaultFont', 'arial', 'helvetica'])
        self.base_font_size = 8
        self.font = (self.base_font_name, self.base_font_size)

        self.isRightPaneEnabled = tk.IntVar(self)
        self.isConsoleEnabled = tk.IntVar(self)
        self.isVarViewEnabled = tk.IntVar(self)
        self.isModuleViewEnabled = tk.IntVar(self)

        self.enable_Panes()
        self.setup_App()
        self.configure_grid()

        self.mainPane = ttk.PanedWindow(orient=tk.HORIZONTAL)
        self.statusFrame = LuciferStatus(self.luciferManager, self.parent,
                                         self)
        self.toolbar = LuciferToolbar(self.luciferManager, self.parent, self)
        self.console = LuciferConsole(self.luciferManager, self.parent, self)
        self.rightPane = ttk.PanedWindow(orient=tk.VERTICAL)
        self.moduleView = LuciferModulesView(self.luciferManager, self.parent,
                                             self)
        self.varView = LuciferVarView(self.luciferManager, self.parent, self)

        self.pack_all()

        self.load_settings()
Example #4
0
    def __init__(self, master, filepath=None):
        super().__init__(master)
        self.master = master
        self.pack(side=TOP, fill=BOTH, expand=True)

        paneH = ttk.PanedWindow(self,orient=HORIZONTAL)
        paneVL = ttk.PanedWindow(paneH,orient=VERTICAL)
        self.netlisteditor = NetlistEditor(paneVL,filepath)
        self.netlisteditor.configure(font=font.Font(family="Courier", size=10))
        self.netlisteditor.pack(side=TOP,fill=BOTH,expand=True)
        self.console = ConsoleOutput(paneVL)
        self.console.pack(side=TOP,fill=BOTH,expand=True)
        self.plot = PlotView(paneH)

        paneH.pack(side=TOP, fill=BOTH, expand=True)
        paneVL.add(self.netlisteditor, weight=3)
        paneVL.add(self.console, weight=1)
        paneH.add(paneVL, weight=1)
        paneH.add(self.plot,weight=1)

        self.statusbar = Statusbar(self)
        self.statusbar.pack(side=BOTTOM, fill=X)

        self.netlisteditor.bind('<KeyRelease>', self.onKRelease)
        self.netlisteditor.bind('<ButtonRelease>', self.onBRelease)
        self.netlisteditor.focus_set()

        self.doneQueue = queue.Queue()
        self.worker_stopping = []
        self.finishedError = True
Example #5
0
 def __init__(self):
     themed_tk.ThemedTk.__init__(self)
     style.theme.apply(self)
     self.nav = Nav(self)
     self.horizontal_panel = ttk.PanedWindow(self, orient="horizontal")
     self.vertical_panel = ttk.PanedWindow(self, orient="vertical")
     self.top_view = Notebook(self, labels=False)
     self.bottom_view = Notebook(self, labels=False)
     self.treenotebook = Notebook(self, **style.theme.treenotebook)
     self.projecttree = ProjectTree(self)
     self.objecttree = ObjectTree(self)
     self.editor = Editor(self)
     self.console = Console(self)
     self.docviewer = DocViewer(self)
     self.output = Output(self)
     self.workspace = WorkSpace(self)
     self.menu = Menu(self)
     self.modules = ObjectContainer(getitem=self.getmodule,
                                    setitem=self.projecttree.addmodule)
     self.objects = ObjectContainer(setitem=self.on_set_object,
                                    delitem=self.on_delete_object)
     self.selected = None
     self.treenotebook.add("Project", self.projecttree,
                           **style.theme.treenotebook_tab)
     self.treenotebook.add("Objects", self.objecttree,
                           **style.theme.treenotebook_tab)
     self.horizontal_panel.add(self.treenotebook)
     self.horizontal_panel.add(self.vertical_panel)
     self.vertical_panel.add(self.top_view)
     self.vertical_panel.add(self.bottom_view)
     self.savedata = SaveData(self)
     self.savedata.load(firstload=True)
     self.nav.pack(side="left", fill="both")
     self.horizontal_panel.pack(side="left", fill="both", expand=True)
Example #6
0
 def __init__(self, root):
     self.root = root
     root.title('Hatherstone pre-amp test program')
     root.columnconfigure(0, weight=1)
     root.rowconfigure(0, weight=1)
     # Create the panes and frames
     vertical_pane = ttk.PanedWindow(self.root, orient=VERTICAL)
     vertical_pane.grid(row=0, column=0, sticky="nsew")
     horizontal_pane = ttk.PanedWindow(vertical_pane, orient=HORIZONTAL)
     vertical_pane.add(horizontal_pane)
     form_frame = ttk.Labelframe(horizontal_pane, text="Unit Under Test")
     form_frame.columnconfigure(1, weight=1)
     horizontal_pane.add(form_frame, weight=1)
     console_frame = ttk.Labelframe(horizontal_pane, text="Console")
     console_frame.columnconfigure(0, weight=1)
     console_frame.rowconfigure(0, weight=1)
     horizontal_pane.add(console_frame, weight=1)
     #third_frame = ttk.Labelframe(vertical_pane, text="Third Frame")
     #vertical_pane.add(third_frame, weight=1)
     # Initialize all frames
     self.form = FormUi(form_frame)
     self.console = ConsoleUi(console_frame)
     self.root.protocol('WM_DELETE_WINDOW', self.quit)
     self.root.bind('<Control-q>', self.quit)
     signal.signal(signal.SIGINT, self.quit)
Example #7
0
    def __init__(self, master=None):
        self.master = master
        ttk.Frame.__init__(self, master, width=750, height=600, padding=10)
        self.pack(expand=True, fill=tk.BOTH)

        # Define base layout
        self.input_pane = ttk.PanedWindow(self, orient=tk.VERTICAL)
        self.input_pane.grid(column=0, row=0, padx=10, pady=10)
        self.output_pane = ttk.PanedWindow(self,
                                           width=375,
                                           height=600,
                                           orient=tk.VERTICAL)
        self.output_pane.grid(column=1, row=0, padx=10, pady=10)

        # Change default global fonts
        default_font = font.nametofont("TkDefaultFont")
        default_font.configure(size=10)
        text_font = font.nametofont("TkTextFont")
        text_font.configure(size=10)

        # Controller for interfacing with core main.py functionality
        self.controller = Controller()

        # Create widgets
        self.display_widgets()
        self.create_menu()
Example #8
0
    def create_widgets(self):
        # prepare the basic pane
        base_pane = ttk.PanedWindow(self, orient=tk.VERTICAL)
        base_pane.pack(fill=tk.BOTH, expand=1)
        g_button_frame = ttk.Frame(base_pane)
        g_button_frame.pack(side=tk.TOP, fill=tk.BOTH, expand=1)
        base_pane.add(g_button_frame)
        gain_frame = ttk.PanedWindow(base_pane, orient=tk.HORIZONTAL)
        gain_frame.pack(side=tk.LEFT, fill=tk.BOTH, expand=1)
        base_pane.add(gain_frame)
        scale_frame = ttk.Frame(gain_frame)
        scale_frame.pack(side=tk.LEFT, fill=tk.NONE, expand=1)
        gain_frame.add(scale_frame)
        r_button_frame = ttk.Frame(gain_frame)
        r_button_frame.pack(side=tk.LEFT, fill=tk.BOTH, expand=1)
        gain_frame.add(r_button_frame)

        # put widgets
        self.widgets_list\
            = self.get_eotf_ctrl_widgets_array(g_button_frame, r_button_frame,
                                               scale_frame)
        self.set_widgets(self.widgets_list, g_button_frame, r_button_frame,
                         scale_frame)
        self.set_callback_to_widgets(self.widgets_list, self.pre_callback_func,
                                     self.reset_func)
Example #9
0
    def __init__(self, root):
        self.root = root
        self.serial = ''
        root.title('Douche Carte Arnaud')
        root.columnconfigure(0, weight=1)
        root.rowconfigure(0, weight=1)
        # Create the panes and frames
        vertical_pane = ttk.PanedWindow(self.root, orient=VERTICAL)
        vertical_pane.grid(row=0, column=0, sticky="nsew")
        horizontal_pane = ttk.PanedWindow(vertical_pane, orient=HORIZONTAL)
        vertical_pane.add(horizontal_pane)
        form_frame = ttk.Labelframe(horizontal_pane, text="Current")
        form_frame.columnconfigure(1, weight=1)
        horizontal_pane.add(form_frame, weight=1)
        console_frame = ttk.Labelframe(horizontal_pane, text="Logs")
        console_frame.columnconfigure(0, weight=1)
        console_frame.rowconfigure(0, weight=1)
        horizontal_pane.add(console_frame, weight=1)
        third_frame = ttk.Labelframe(vertical_pane, text="Infos")
        vertical_pane.add(third_frame, weight=1)
        # Initialize all frames
        self.form = FormUi(form_frame)
        self.console = ConsoleUi(console_frame)
        self.third = ThirdUi(third_frame)

        self.root.protocol('WM_DELETE_WINDOW', self.quit)
        self.root.bind('<Control-q>', self.quit)
        signal.signal(signal.SIGINT, self.quit)

        self.root.bind('<Key>', self.get_key)
        logger.info('Ready to go')

        if working_credentials == "loginFail":
            showerror("CREDENTIALS",
                      "Wrong credentials in config.ini please change them")
    def __init__(self, root):
        self.root = root
        root.title('Logging Handler')
        root.columnconfigure(0, weight=1)
        root.rowconfigure(0, weight=1)

        # Create the panes and frames
        vertical_pane = ttk.PanedWindow(self.root, orient=VERTICAL)
        vertical_pane.grid(row=0, column=0, sticky="nsew")

        horizontal_pane = ttk.PanedWindow(vertical_pane, orient=HORIZONTAL)
        vertical_pane.add(horizontal_pane)

        form_frame = ttk.Labelframe(horizontal_pane, text="MyForm")
        form_frame.columnconfigure(1, weight=1)
        horizontal_pane.add(form_frame, weight=1)

        console_frame = ttk.Labelframe(horizontal_pane, text="Console")
        console_frame.columnconfigure(0, weight=1)
        console_frame.rowconfigure(0, weight=1)
        horizontal_pane.add(console_frame, weight=1)

        third_frame = ttk.Labelframe(vertical_pane, text="Third Frame")
        vertical_pane.add(third_frame, weight=1)
        # Initialize all frames
        self.form = FormUi(form_frame)
        self.console = ConsoleUi(console_frame)
        self.third = ThirdUi(third_frame)
        self.clock = Clock()
        self.clock.start()
        self.root.protocol('WM_DELETE_WINDOW', self.quit)
        self.root.bind('<Control-q>', self.quit)
        signal.signal(signal.SIGINT, self.quit)
Example #11
0
    def __init__(self):
        themed_tk.ThemedTk.__init__(self)
        self.set_theme("arc")
        ttk.Style(self)

        self.horizontal_panel = ttk.PanedWindow(self, orient="horizontal")
        self.vertical_panel = ttk.PanedWindow(self, orient="vertical")
        self.side_view = Notebook(self, has_labels=True)

        self.node = NodeEditor(self)
        self.console = Interpreter(self)
        self.modules = ModuleTree(self)
        self.objects = ObjectTree(self)

        self.vertical_panel.add(self.node.frame)
        self.vertical_panel.add(self.console.frame)
        self.side_view.add("Modules", self.modules)
        self.side_view.add("Objects", self.objects)
        self.horizontal_panel.add(self.side_view.frame)
        self.horizontal_panel.add(self.vertical_panel)
        self.horizontal_panel.pack(side="left", fill="both", expand=True)

        self.animate = Animation(self)
        self.project = SaveData(self)
        self.menu = MainMenu(self)
        self.config(menu=self.menu)
        self.project.load(is_first_load=True)
Example #12
0
    def __init__(self, root):
        self.root = root
        root.title('Antivirus DocTalla')
        root.columnconfigure(0, weight=1)
        root.rowconfigure(0, weight=1)
        # Create the panes and frames

        vertical_pane = ttk.PanedWindow(self.root, orient=VERTICAL)
        vertical_pane.grid(row=0, column=0, sticky="nsew")
        horizontal_pane = ttk.PanedWindow(vertical_pane, orient=HORIZONTAL)
        vertical_pane.add(horizontal_pane)

        form_frame = ttk.Labelframe(horizontal_pane, text="Анализатор")
        form_frame.columnconfigure(1, weight=1)
        horizontal_pane.add(form_frame, weight=1)

        console_frame = ttk.Labelframe(
            horizontal_pane, text="Результаты сканирования")
        console_frame.columnconfigure(0, weight=1)
        console_frame.rowconfigure(0, weight=1)
        horizontal_pane.add(console_frame, weight=1)

        third_frame = ttk.Labelframe(vertical_pane, text="Copyright")
        vertical_pane.add(third_frame, weight=1)

        # Initialize all frames
        self.form = FormUi(form_frame)
        self.console = ConsoleUi(console_frame)
        self.third = BottomUi(third_frame)
        self.root.protocol('WM_DELETE_WINDOW', self.quit)
        self.root.bind('<Control-q>', self.quit)
        signal.signal(signal.SIGINT, self.quit)
Example #13
0
    def __init__(self, root: Tk, model: Model):
        self.model = model

        Grid.rowconfigure(root, 0, weight=1)
        Grid.columnconfigure(root, 0, weight=1)

        # Horizontal PanedWindow
        pw = ttk.PanedWindow(root, orient=HORIZONTAL)
        self.pw = pw
        pw.grid(column=0, row=0, sticky="nesw")

        # Card selection
        cards_frame = ttk.LabelFrame(pw, text="Cards")
        pw.add(cards_frame)
        cards_tree = ttk.Treeview(cards_frame,
                                  show="tree",
                                  selectmode="browse")
        self.cards_tree = cards_tree
        self.render_card_list()
        cards_tree.bind("<<TreeviewSelect>>", self._on_select_card)
        cards_tree.grid(column=0, row=0, sticky="nesw")
        Grid.rowconfigure(cards_frame, 0, weight=1)
        Grid.columnconfigure(cards_frame, 0, weight=1)

        # Main text editor
        text_editor = Text(pw)
        self.text_editor = text_editor
        text_editor.bind("<Control-a>", self._on_text_ctrl_a)
        pw.add(text_editor)

        # Rightmost vertical paned window
        vpw = ttk.PanedWindow(pw, orient=VERTICAL)
        pw.add(vpw)

        ## Template picker
        templates_frame = ttk.LabelFrame(vpw, text="Templates")
        vpw.add(templates_frame)
        templates_tree = ttk.Treeview(templates_frame, show="tree")
        templates_tree.grid(column=0, row=0, sticky="nsew")
        Grid.rowconfigure(templates_frame, 0, weight=1)
        Grid.columnconfigure(templates_frame, 0, weight=1)
        self.templates_tree = templates_tree
        self.render_template_list()
        templates_tree.bind("<<TreeviewSelect>>", self._on_select_template)

        ## Preview
        preview_frame = ttk.LabelFrame(vpw,
                                       text="Preview",
                                       height=300,
                                       width=300)
        vpw.add(preview_frame)

        style = ttk.Style()
        if sys.platform == "win32":
            style.theme_use("vista")
        elif sys.platform == "darwin":
            style.theme_use("aqua")
        else:
            style.theme_use("clam")
    def __createWidgets(self) -> None:
        # <pane>
        self.pane = ttk.PanedWindow(self, orient=tix.HORIZONTAL)
        self.pane.rowconfigure(0, weight=1)
        self.pane.rowconfigure(1, weight=1)
        self.pane.columnconfigure(1, weight=1)
        self.pane.grid(column=0, row=0, sticky=tuple(STICK_HORIZONTAL))

        self.key_label = ttk.Label(self.pane)
        self.key_label["text"] = "Key:"
        self.key_label.grid(column=0, row=0, sticky=tuple(STICK_W))

        self.key_value = tk.StringVar()
        self.key = ttk.Entry(self.pane, textvariable=self.key_value)
        self.key.grid(column=1,
                      row=0,
                      sticky=tuple(STICK_ALL),
                      padx=(5, 2),
                      pady=(1, 2))
        self.key.focus_set()

        self.salt_label = ttk.Label(self.pane)
        self.salt_label["text"] = "Salt:"
        self.salt_label.grid(column=0, row=1, sticky=tuple(STICK_W))

        self.salt_value = tk.StringVar()
        self.salt = ttk.Entry(self.pane, textvariable=self.salt_value)
        self.salt.grid(column=1,
                       row=1,
                       sticky=tuple(STICK_ALL),
                       padx=(5, 2),
                       pady=(2, 1))

        self.button = ttk.Button(self.pane)
        self.button["text"] = "计算!"
        self.button["command"] = self.generate_password
        self.button.grid(column=2,
                         rowspan=2,
                         row=0,
                         sticky=tuple(STICK_VERTICAL),
                         padx=(2, 0))
        # </pane>

        # <scrollpane>
        self.scrollpane = ttk.PanedWindow(self, orient=tix.HORIZONTAL)
        self.scrollpane.grid(column=0, row=1, sticky=tuple(STICK_ALL), padx=5)
        self.scrollpane.columnconfigure(0, weight=1)
        self.scrollpane.rowconfigure(0, weight=1)

        self.text = tix.Text(self.scrollpane, autosep=1)
        self.text.grid(column=0, row=0, sticky=tuple(STICK_ALL))
        self.text['state'] = 'disabled'

        self.scrollbar = ttk.Scrollbar(self.scrollpane,
                                       orient=tix.VERTICAL,
                                       command=self.text.yview)
        self.scrollbar.grid(column=1, row=0, sticky=tuple(STICK_ALL))

        self.text['yscrollcommand'] = self.scrollbar.set
Example #15
0
    def __init__(self, root):
        self.root = root
        root.columnconfigure(0, weight=1)
        root.rowconfigure(0, weight=1)
        self.root.protocol('WM_DELETE_WINDOW', self.quit)
        self.root.bind('<Control-q>', self.quit)
        self.root.title("INGtoYNAB Converter")

        # The main notebook, each tab consists of one PanedWindow with mutiple Labelframe windiws
        notebook = ttk.Notebook(self.root)
        notebook.grid(column=1, row=1, columnspan=2)

        # extend bindings to top level window allowing
        #   CTRL+TAB - cycles thru tabs
        #   SHIFT+CTRL+TAB - previous tab
        #   ALT+K - select tab using mnemonic (K = underlined letter)
        notebook.enable_traversal()

        first_tab = ttk.PanedWindow(self.root, orient=VERTICAL)
        first_tab.grid(row=0, column=0, sticky="nsew")

        # Create the panes and frames
        main_frame = ttk.Labelframe(first_tab, text="Info")
        main_frame.columnconfigure(1, weight=1)
        main_frame.rowconfigure(0, weight=1)
        first_tab.add(main_frame)

        settings_frame = ttk.Labelframe(first_tab, text="Settings")
        settings_frame.columnconfigure(1, weight=1)
        settings_frame.rowconfigure(0, weight=1)
        first_tab.add(settings_frame)

        console_frame = ttk.Labelframe(first_tab, text="Console")
        console_frame.columnconfigure(0, weight=1)
        console_frame.rowconfigure(0, weight=1)
        first_tab.add(console_frame)

        second_tab = ttk.PanedWindow(self.root, orient=VERTICAL)
        second_tab.grid(row=0, column=0, sticky="nsew")

        notebook.add(first_tab,
                     text='Convert Transactions',
                     underline=0,
                     padding=2)
        notebook.add(second_tab,
                     text='Manage Payees/Categories',
                     underline=0,
                     padding=2)

        # Initialize all frames
        self.main = MainUi(main_frame)
        self.settings = SettingsUi(settings_frame, self, self.root)
        self.console = ConsoleUi(console_frame)

        signal.signal(signal.SIGINT, self.quit)
Example #16
0
    def __createWidgets(self):
        self.update()
        # _h = int(self.winfo_height())
        # _w = int(self.winfo_width())

        self.ButtonFrame = ttk.Frame(self)
        self.LoggingFrame = ttk.Frame(self)
        self.MainFrame = ttk.PanedWindow(self, orient=tk.VERTICAL, width=1000)
        self.FileListBoxFrame = ttk.Frame(self.MainFrame, width=1000)
        self.CanvasFrame = ttk.PanedWindow(self.MainFrame,
                                           orient=tk.HORIZONTAL,
                                           width=1000)
        self.KeepCanvasFrame = ttk.Frame(self.CanvasFrame,
                                         height=500,
                                         width=800,
                                         style='Keep.TFrame')
        self.TossCanvasFrame = ttk.Frame(self.CanvasFrame,
                                         height=500,
                                         width=200,
                                         style='Toss.TFrame')

        yScroll = ttk.Scrollbar(self.LoggingFrame, orient=tk.VERTICAL)
        self.Logging = tk.Text(self.LoggingFrame,
                               height=10,
                               width=0,
                               bg=cl.BLACK,
                               fg=cl.WHITE,
                               yscrollcommand=yScroll.set)
        yScroll['command'] = self.Logging.yview
        self.Logging.pack(side=tk.BOTTOM, fill=tk.BOTH, expand=True)
        yScroll.pack(side=tk.RIGHT, fill=tk.Y)

        self.__createButtons()
        self.__createFileListBox()
        self.KeepPlotCanvas = None
        self.TossPlotCanvas = None
        self.KeepToolBar = None
        self.TossToolBar = None

        self.CanvasFrame.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
        self.MainFrame.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
        self.CanvasFrame.add(self.KeepCanvasFrame)
        self.CanvasFrame.add(self.TossCanvasFrame)
        self.MainFrame.add(self.CanvasFrame)
        self.MainFrame.add(self.FileListBoxFrame)
        self.ButtonFrame.pack(side=tk.BOTTOM, fill=tk.Y, expand=False)
        self.LoggingFrame.pack(side=tk.BOTTOM, fill=tk.BOTH, expand=False)
        self.logger = logging.getLogger('parser.gui')
        self.handler = GUIHandler(self.Logging)
        self.logger.addHandler(self.handler)
        self.logger.setLevel(getattr(logging, self.opts.loglevel.upper()))
        self.logger.info("Logging...")
        self.handler.flush()
Example #17
0
	def __init__(self, *args, debug=False, disable=[]):
		themed_tk.ThemedTk.__init__(self)
		self.set_theme("arc")
		ttk.Style(self)

		self.horizontal_panel = ttk.PanedWindow(self, orient="horizontal")
		self.vertical_panel = ttk.PanedWindow(self, orient="vertical")
		self.side_view = Notebook(self, has_labels=True)

		self.node = NodeEditor(self)
		self.console = Interpreter(self, disable=disable)
		self.modules = ModuleTree(self)
		self.objects = ObjectTree(self)

		self.vertical_panel.add(self.node.frame)
		self.vertical_panel.add(self.console.frame)
		self.side_view.add("Modules", self.modules)
		self.side_view.add("Objects", self.objects)
		self.horizontal_panel.add(self.side_view.frame)
		self.horizontal_panel.add(self.vertical_panel)
		self.horizontal_panel.pack(side="left", fill="both", expand=True)

		self.animate = Animation(self)
		self.project = SaveData(self)
		self.menu = MainMenu(self)
		self.config(menu=self.menu)

		self.title("Math Inspector")
		self.debug = debug

		mathfile = AUTOSAVE_PATH
		pyfiles = []
		for i in args:
			if not os.path.isfile(i):
				builtin_print("mathinspector failed to launch: " + i + " is not a file\n")
				exit()

			name, ext = name_ext(i)
			if ext == ".math":
				mathfile = os.path.abspath(i)
			elif ext == ".py":
				mathfile = ""
				pyfiles.append(os.path.abspath(i))
			else:
				builtin_print("mathinspector failed to launch: " + ext + " is not a currently supported file type.\n")
				exit()

		self.project.load(mathfile, is_first_load=True, sashpos=240 if pyfiles else 0)

		for i in pyfiles:
			self.modules.addfile(i)
    def __init__(self, root):
        """ create the application, having 3 panes.
        """
        self.root = root
        root.title('OCF MQTT Spy')

        menubar = tk.Menu(root)
        filemenu = tk.Menu(menubar, tearoff=0)
        filemenu.add_command(label="Config", command=donothing)
        filemenu.add_separator()
        filemenu.add_command(label="Exit", command=root.quit)

        helpmenu = tk.Menu(menubar, tearoff=0)
        helpmenu.add_command(label="About...", command=donothing)

        root.config(menu=menubar)
        root.columnconfigure(0, weight=1)
        root.rowconfigure(0, weight=1)

        # Create the panes and frames
        vertical_pane = ttk.PanedWindow(self.root, orient=VERTICAL)
        vertical_pane.grid(row=0, column=0, sticky="nsew")
        # vertical_pane.grid(row=1, column=1, sticky="nsew")
        horizontal_pane = ttk.PanedWindow(vertical_pane, orient=HORIZONTAL)

        vertical_pane.add(horizontal_pane)
        form_frame = ttk.Labelframe(horizontal_pane,
                                    text="Publish Information")
        form_frame.columnconfigure(1, weight=1)
        horizontal_pane.add(form_frame, weight=1)

        console_frame = ttk.Labelframe(horizontal_pane, text="Console")
        console_frame.columnconfigure(0, weight=1)
        console_frame.rowconfigure(0, weight=1)
        horizontal_pane.add(console_frame, weight=1)

        third_frame = ttk.Labelframe(vertical_pane, text="Return topic info")
        vertical_pane.add(third_frame, weight=1)

        # Initialize all frames
        self.form = FormUi(form_frame)
        self.form.app = self
        self.console = ConsoleUi(console_frame)
        self.console.app = self
        self.third = ThirdUi(third_frame)
        self.third.app = self
        # self.third.labelText = 'OCF/*/oic%2Fd/R'
        self.root.protocol('WM_DELETE_WINDOW', self.quit)
        self.root.bind('<Control-q>', self.quit)
        signal.signal(signal.SIGINT, self.quit)
Example #19
0
    def __init__(self, root):
        self.root = root
        root.title('SUN Font Utility '+sys.argv[0]+'      '+cfg["bfVersion"])
        root.columnconfigure(0, weight=1)
        root.rowconfigure(0, weight=1)
        
        # Create the panes and frames
        vertical_pane = ttk.PanedWindow(self.root, orient=VERTICAL)
        vertical_pane.grid(row=0, column=0, sticky="nsew")
        
        horizontal_pane = ttk.PanedWindow(vertical_pane, orient=HORIZONTAL)
        vertical_pane.add(horizontal_pane)
        
        form_frame = ttk.Labelframe(horizontal_pane, text="")
        form_frame.columnconfigure(1, weight=1)
        horizontal_pane.add(form_frame, weight=1)
        
        form_frame1 = ttk.Labelframe(horizontal_pane, text="Commands")
        form_frame1.columnconfigure(1, weight=1)
        horizontal_pane.add(form_frame1, weight=1)

        console_frame = ttk.Labelframe(horizontal_pane, text="Console")
        console_frame.columnconfigure(0, weight=1)
        console_frame.rowconfigure(0, weight=1)
        horizontal_pane.add(console_frame, weight=1)
        
        control_frame = ttk.Labelframe(vertical_pane, text="Control")
        vertical_pane.add(control_frame, weight=1)
 
        # Initialize all frames
        self.Input = InputUi(form_frame)
        self.Cbf = CBFrame(form_frame1)
        #self.Cbf.start()
        
        self.console = ConsoleUi(console_frame)
        self.control = ControlUi(control_frame)
        
         # Create textLogger
        logging.= logging.getlogging.)
        guiHandler = self.console
        guiHandler.setFormatter(CustomFormatter())
        logging.addHandler(guiHandler)
        logging.setLevel(logging.DEBUG)
        logging.info('version %s', cfg["bfVersion"])    
        

        self.root.protocol('WM_DELETE_WINDOW', self.quit)
        self.root.bind('<Control-q>', self.quit)
        signal.signal(signal.SIGINT, self.quit)
Example #20
0
        def draw_panes(parent):

            pmain = ttk.PanedWindow(parent, orient=HORIZONTAL)
            fleft = ttk.Frame(pmain)
            fright = ttk.Frame(pmain)
            sline = ttk.Separator(fleft, orient=VERTICAL)

            # pmain['sashwidth'] = 10
            # pmain['handlepad'] = 30

            sline.grid(column=0, row=0, sticky='wns')
            pmain.grid(column=0, row=0, sticky='nswe')

            fleft.columnconfigure(0, weight=1)
            fleft.rowconfigure(0, weight=1)
            fright.columnconfigure(0, weight=1)
            fright.rowconfigure(0, weight=1)

            pmain.add(fleft)
            pmain.add(fright)
            # pmain.add(fleft, minsize=_PANE_L_MIN_SIZE)
            # pmain.add(fright, minsize=_PANE_R_MIN_SIZE)

            draw_pane_left(fleft)
            draw_pane_right(fright)
Example #21
0
    def __init__(self):
        self.__client = None
        self.__server_addr = ''

        self.__tk = tk.Tk()
        self.__tk.withdraw()

        screenwidth = self.__tk.winfo_screenwidth()
        screenheight = self.__tk.winfo_screenheight()

        width = int(0.95 * screenwidth)
        #height = int(0.8 * screenheight)
        height = 600
        winleft = int((screenwidth - width) / 2)
        wintop = int((screenheight - height) / 2)

        width = str(width)
        height = str(height)
        winleft = str(winleft)
        wintop = str(wintop)

        geometry = '=' + width + 'x' + height + '+' + winleft + '+' + wintop
        self.__tk.geometry(geometry)
        self.__tk.deiconify()

        self.__tk.grid_rowconfigure(0, weight=1)
        self.__tk.grid_columnconfigure(0, weight=1)

        self.__tk.protocol("WM_DELETE_WINDOW", self.__exit)
        self.__exit_in_progress = False

        self.__mainframe = ttk.Frame(master=self.__tk)
        self.__mainframe.grid(sticky=tk.NSEW)

        self.__panes = ttk.PanedWindow(master=self.__mainframe,
                                       orient='horizontal')

        self.__panes.grid(row=0, column=0, sticky=tk.NSEW, pady=8, padx=8)

        self.__mainframe.grid_rowconfigure(0, weight=1)
        self.__mainframe.grid_columnconfigure(0, weight=1)

        self.__style = ttk.Style()
        self.__style.configure('TButton', relief='flat')
        self.__style.configure('TEntry', relief='flat', padding=4)
        self.__style.configure('Treeview', rowheight=28)

        self.__set_title()
        self.__pref_window = PreferencesWindow(self.__tk)

        self.__menubar = tk.Menu(self.__tk)
        self.__menubar.add(tk.COMMAND,
                           label='Preferences',
                           command=self.__pref_window.pref_menu)

        self.__tk['menu'] = self.__menubar

        self.__pref_window.prefs_load()
        self.__files_pane = FilesPane(None, self.__panes)
        self.__tasks_pane = TasksPane(None, self.__panes)
Example #22
0
    def paned_window(self):
        self.panedwindow = ttk.Panedwindow(self.parent, orient = tk.HORIZONTAL)
        self.panedwindow.pack(expand = True, fill = tk.BOTH)

        self.left_pane = ttk.Frame(self.panedwindow, height = root.winfo_screenheight() - 140, relief = tk.SUNKEN)
        self.middle_pane = ttk.Frame(self.panedwindow, height = (root.winfo_screenheight() - 140), relief = tk.SUNKEN)
        self.right_pane = ttk.Frame(self.panedwindow, height = (root.winfo_screenheight() - 140), relief = tk.SUNKEN)
        self.panedwindow.add(self.left_pane, weight = 1)
        self.panedwindow.add(self.middle_pane, weight = 1) 
        self.panedwindow.add(self.right_pane, weight = 10)

        self.panedwindow_left = ttk.Panedwindow(self.left_pane, orient = tk.VERTICAL)
        self.panedwindow_left.pack(expand = True, fill = tk.BOTH)
        self.pane_projects = ttk.Frame(self.panedwindow_left, height = (root.winfo_screenheight() - 140) / 2, relief = tk.SUNKEN)
        self.pane_actions = ttk.Frame(self.panedwindow_left, height = (root.winfo_screenheight() - 140) / 2, relief = tk.SUNKEN)
        self.panedwindow_left.add(self.pane_projects, weight = 1)
        self.panedwindow_left.add(self.pane_actions, weight = 1)

        self.panewindow_middle = ttk.PanedWindow(self.middle_pane, orient = tk.VERTICAL)
        self.panewindow_middle.pack(expand = True, fill = tk.BOTH)
        self.pane_canvas = ttk.Frame(self.panewindow_middle, relief = tk.SUNKEN)
        self.pane_resources = ttk.Frame(self.panewindow_middle, width = 100, relief = tk.SUNKEN)
        self.panewindow_middle.add(self.pane_canvas, weight = 5)
        self.panewindow_middle.add(self.pane_resources, weight = 1)

        self.menubar = Menubar(self.parent)
        self.properties = Properties(self.right_pane)
        self.canvas = Canvas(self.properties)
        self.toolbar = Toolbar(self.pane_canvas, self.canvas)
        self.project_explorer = ProjectExplorer(self.pane_projects)
        self.canvas.create_Ui(self.pane_canvas)
        self.actions = Actions(self.pane_actions, self.canvas, self.properties)
        self.resources = Resources(self.pane_resources)
Example #23
0
    def __init__(self, parent, prompt="", default=""):
        self.popup = tk.Toplevel(parent)
        self.popup.title(prompt)
        self.popup.transient(parent)
        self.parent = parent
        self.popup.columnconfigure(0, weight=1)

        # Create window
        self.bottom_pane = ttk.PanedWindow(self.popup, orient=HORIZONTAL)
        self.bottom_pane.grid(row=1, column=0, sticky="nsew")

        self.transaction_frame = ttk.Labelframe(self.bottom_pane,
                                                text="Unknown Transaction")
        self.transaction_frame.columnconfigure(1, weight=1)
        self.bottom_pane.add(self.transaction_frame, weight=5)

        self.category_frame = ttk.Labelframe(self.bottom_pane,
                                             text="Add Category")
        self.category_frame.grid(columnspan=1)

        self.category_frame.columnconfigure(0, weight=1)
        self.category_frame.rowconfigure(0, weight=1)
        self.bottom_pane.add(self.category_frame, weight=1)

        # Initalize
        self.transactions = TransactionUI(self.transaction_frame, self)
        self.category = CategoryUi(self, self.category_frame, self.popup)
        self.var = tk.StringVar()
Example #24
0
    def __init__(self, master=None):
        tk.Toplevel.__init__(self, master)
        self.title("FON Tools")

        nb = ttk.Notebook(self)
        pageConfiguration = ttk.Frame(nb)
        pageOverview = ttk.Frame(nb)
        pageExpansions = ttk.Frame(nb)
        pageRisks = ttk.Frame(nb)
        pageUABombing = ttk.Frame(nb)
        nb.add(pageConfiguration, text='Configuration')
        nb.add(pageOverview, text='Overview')
        nb.add(pageExpansions, text='Expansions')
        nb.add(pageRisks, text='Risks')
        nb.add(pageUABombing, text='UA-Bombing')
        nb.pack(expand=1, fill="both")

        self.configuration_frame = ttk.PanedWindow(pageConfiguration)
        self.configuration_frame.updatedb_btn = ttk.Button(
            self.configuration_frame,
            text="Update Database",
            command=self.update_tick)
        self.configuration_frame.updatedb_btn.pack()
        self.configuration_frame.pack(expand=True, fill='both', side=LEFT)
        self.overview_frame = OverviewPanedWindow(pageOverview)
        self.expansions_frame = ExpansionsPanedWindow(pageExpansions)
        self.risks_frame = RisksPanedWindow(pageRisks)
        self.conn = bgs.get_db_connection()
Example #25
0
    def build_pane(self, weight):
        self.frame = ttk.Frame(self.parent)
        self.parent.add(self.frame, weight=weight)
        self.menu_frame = ttk.Frame(self.frame)  #, background=bg_color())
        self.menu_frame.pack(side='top', fill='x')

        self.add_module_button = tk.Label(
            self.menu_frame,
            image=icons.get_icon("plus-lightgray"),
            bg=bg_color(),
            cursor='hand2')
        self.add_module_button.bind('<Button-1>', self.add_empty_module_window)
        #self.add_module_button = tk.Button(self.menu_frame, text='Add Module', fg=text_color(), bg=bg_color(), cursor='hand2')
        self.add_module_button.pack(side='left', padx=20)
        #self.add_module_button.bind('<Button-1>', self.add_module_window)

        self.close_icon = icons.get_icon('x-lightgray')
        self.x_button = tk.Label(self.menu_frame,
                                 text='-',
                                 fg=text_color(),
                                 bg=bg_color(),
                                 cursor='hand2')
        self.x_button.pack(side='right', padx=20)
        self.x_button.bind(
            '<Button-1>',
            lambda event, pane=self: self.hide_pane_callback(pane=self)
        )  #lambda event, pane_name=self.name: destroy_callback(pane_name=pane_name))

        self.pane = ttk.PanedWindow(self.frame, orient=self.orient)
        self.pane.pack(side='top', fill='both', expand=True)
        self.hidden = False
Example #26
0
	def createWidgets(self):
		# The window
		self.root = tk.Tk()
		self.root.title("Glen's Checkers")
		self.root.bind("<Escape>", lambda e: self.root.destroy())
		self.root.geometry(f"{self.boardSize*2}x{self.boardSize*2}")

		# Paned Window
		self.pWindow = ttk.PanedWindow(self.root, orient="horizontal")
		self.pWindow.pack(fill="both", expand=1)

		# Frame container for board canvas
		self.boardFrame = tk.Frame(self.pWindow, bg="gray75")
		self.boardFrame.bind("<Configure>", self.resizeBoard)

		# Board Canvas
		self.canvas = sqCanvas(self.boardFrame)
		self.canvas.pack()

		# Frame for control panel
		self.controlFrame = tk.Frame(self.pWindow, bg="pink")

		# Button Bar Frame
		self.buttonBarFrame = tk.Frame(self.controlFrame, bg="blue")
		self.buttonBarFrame.pack(anchor="n", fill='x', expand=1)

		# Button Bar Label
		self.buttonBarLabel = tk.Label(self.buttonBarFrame, text="Button Bar")
		self.buttonBarLabel.pack()
		
		# Add widgets to paned window
		self.pWindow.add(self.boardFrame, weight=1)
		self.pWindow.add(self.controlFrame, weight=1)
Example #27
0
    def _wedget_txrx(self):
        # TX RX
        pw_txrx = ttk.PanedWindow(self.master, orient="horizontal")
        pw_txrx.pack(expand=False, side="top")

        ## TX
        lf_tx = ttk.LabelFrame(pw_txrx, text="TX")
        lf_tx.pack(expand=False, side="left")

        self.lb_tx = tk.Listbox(master=lf_tx,
                                height=20,
                                width=30,
                                state="disable")
        self.lb_tx.pack(expand=False)

        self.btn_txexp = ttk.Button(master=lf_tx,
                                    text="TX Export",
                                    command=self.exp_tx_btn,
                                    state="disable")
        self.btn_txexp.pack(expand=False, side="right")

        ## RX
        lf_rx = ttk.LabelFrame(pw_txrx, text="RX")
        lf_rx.pack(expand=False, side="right")

        self.lb_rx = tk.Listbox(lf_rx, height=20, width=30, state="disable")
        self.lb_rx.pack(expand=False)

        self.btn_rxexp = ttk.Button(lf_rx,
                                    text="RX Export",
                                    command=self.exp_rx_btn,
                                    state="disable")
        self.btn_rxexp.pack(expand=False, side="right")
Example #28
0
    def __init__(self, dbpath=":memory:", *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.title("SQLiteGUI")

        # setup menubar
        self.menu = ApplicationMenu(self)
        self.config(menu=self.menu)

        self.mainpain = ttk.PanedWindow(self, orient=tk.HORIZONTAL)
        self.mainpain.pack(fill=tk.BOTH, expand=True, side=tk.TOP)

        self.tables_and_queries = TablesAndQueriesBook(self)
        self.mainpain.add(self.tables_and_queries)

        self.db_statusbar = DatabaseStatusBar(self)
        self.db_statusbar.pack(fill=tk.X, side=tk.BOTTOM)
        self.use_database(dbpath)

        self.mainwidget = mainWidget.MainWidget(self)
        self.mainpain.add(self.mainwidget)
        # self.mainwidget.load_window("frame_a")

        ttk.Separator(self, orient=tk.HORIZONTAL).pack(fill=tk.X, pady=3)

        # set up bindings etc, load the database
        self.bind('<Control-o>', lambda a: self.open_database_file_gui())
        self.bind('<Control-s>', lambda a: self.save_database())
        self.protocol("WM_DELETE_WINDOW", self.exit)
Example #29
0
    def build_display(self, frame):
        self.pane = ttk.PanedWindow(frame, orient=tk.HORIZONTAL)
        self.pane.pack(expand=True, fill="both")

        self.build_nav(self.pane)
        self.pane.add(self.nav_frame, weight=1)

        self.build_main_frame(self.pane)
        self.pane.add(self.main_frame, weight=6)
    def _create_wnd_struct(self, parent):
        outer = ttk.PanedWindow(parent, orient=HORIZONTAL, name='outer')
        outer.pack(expand=Y, fill=BOTH, padx=10, pady=(6, 10))

        left = ttk.PanedWindow(outer, orient=VERTICAL, name='left')
        right = ttk.PanedWindow(outer, orient=VERTICAL, name='right')
        outer.add(left)
        outer.add(right)

        ltop = ttk.LabelFrame(left, text='Button', padding=3, name='ltop')
        lbot = ttk.LabelFrame(left, text='Clocks', padding=3, name='lbot')
        left.add(ltop)
        left.add(lbot)

        rtop = ttk.LabelFrame(right, text='Progress', padding=3, name='rtop')
        rbot = ttk.LabelFrame(right, text='Text', padding=3, name='rbot')
        right.add(rtop)
        right.add(rbot)