예제 #1
0
 def __init__(self, parent, *args, **kw):
     Notebook.__init__(self, parent, *args, **kw)
     self.parent = parent
     self.last_modified_tab = -1
     self.nb_tabs = 0
     self.all_tabs = []
     self.nb_filled_tabs = 0
예제 #2
0
파일: cim.py 프로젝트: ZanderBrown/Tiborcim
    def __init__(self, parent):
        Notebook.__init__(self, parent, style='Type.TNotebook')
        logger = logging.getLogger(__name__)

        s = Style()
        s.configure('Type.TNotebook', tabposition="se")
        
        self.page_tiborcim = Frame(self)
        self.page_python = Frame(self)
        self.add(self.page_tiborcim, text='Tiborcim')
        self.add(self.page_python, text='Python')

        self.text_tiborcim = CimTiborcimText(self.page_tiborcim, self)

        self.vbar_python = Scrollbar(self.page_python, name='vbar_python')
        self.xbar_python = Scrollbar(self.page_python, name='xbar_python', orient="horizontal")
        self.text_python = Text(self.page_python, wrap="none", state="disabled", borderwidth='0p')
        self.vbar_python['command'] = self.text_python.yview
        self.vbar_python.pack(side="right", fill="y")
        self.text_python['yscrollcommand'] = self.vbar_python.set
        self.xbar_python['command'] = self.text_python.xview
        self.xbar_python.pack(side="bottom", fill="x")
        self.text_python['xscrollcommand'] = self.xbar_python.set
        self.text_python.pack(expand=1, fill="both")

        self.viewmode = "tiborcim"
        self.saved = True
        self.filename = None
예제 #3
0
 def __init__(self, parent, *args, **kw):
     Notebook.__init__(self, parent, *args, **kw)
     self.parent = parent
     self.last_modified_tab = -1
     self.nb_tabs = 0
     self.all_tabs = []
     self.nb_filled_tabs = 0
예제 #4
0
파일: core.py 프로젝트: scott91e1/pypad
 def __init__(self, parent=None):
     Notebook.__init__(self, parent)
     self.parent = parent
     self._untitled_index = 0
     self.pack(**_DEFAULT_PACK_OPT)
     self._buffers = []
     self.add(Buffer(parent=self))
     self.select(0)
     self.enable_traversal()
     self.bind('<<NotebookTabChanged>>', self.update_titlebar)
예제 #5
0
파일: core.py 프로젝트: Nazek42/pypad
 def __init__(self, parent=None):
     Notebook.__init__(self, parent)
     self.parent = parent
     self._untitled_index = 0
     self.pack(**_DEFAULT_PACK_OPT)
     self._buffers = []
     self.add(Buffer(parent=self))
     self.select(0)
     self.enable_traversal()
     self.bind("<<NotebookTabChanged>>", self.update_titlebar)
예제 #6
0
파일: utils.py 프로젝트: wong-nw/Pipeliner
    def __init__(self, *args, **kwargs):
        if not self.__initialized:
            self.__initialize_custom_style()
            self.__inititialized = True

        kwargs["style"] = "CustomNotebook"
        Notebook.__init__(self, *args, **kwargs)

        self._active = None

        self.bind("<ButtonPress-1>", self.on_close_press, True)
        self.bind("<ButtonRelease-1>", self.on_close_release)
예제 #7
0
    def __init__(self, parent):
        Notebook.__init__(self, parent)
        self.parent = parent
        self.mainframe = parent.mainframe
        self.root = parent.root
        self.mainframe.filemenu.notebook = self

        self.editors = []

        self.bind('<ButtonRelease-1>', self.after_click)
        self.bind('<Button-3>', self.on_rclick)
        
        self.menu = NoteBookMenu(self)
예제 #8
0
    def __init__(self, parent):
        Notebook.__init__(self, parent)
        self.parent = parent
        self.mainframe = parent.mainframe
        self.root = parent.root
        self.mainframe.filemenu.notebook = self

        self.editors = []

        self.bind('<ButtonRelease-1>', self.after_click)
        self.bind('<Button-3>', self.on_rclick)

        self.menu = NoteBookMenu(self)
예제 #9
0
    def __init__(self, master, project):
        Notebook.__init__(self, master)
        self.grid(column=0, row=0, sticky=(N, S, W, E))
        self.rowconfigure(0, weight=1)
        self.columnconfigure(0, weight=1)

        self.project = project
        self.tab_editor = None
        self.on_tab_change = None
        self.can_edit_tab = False
        self.editor_var = StringVar()
        self.bind('<Double-Button-1>', self._dblclick)
        self.bind('<<NotebookTabChanged>>', self._tab_changed)
        self.update_tabs()
예제 #10
0
 def __init__(self, parent, current_categories, data_from_params_file,
              str_var_for_input_output_boxes, weights_status_str, *args,
              **kw):
     Notebook.__init__(self, parent, *args, **kw)
     self.parent = parent
     self.params = Parameters()
     self.current_categories = current_categories
     self.input_categories_frame = None
     self.output_categories_frame = None
     self.params_from_file_lbl = None
     self.data_from_params_file = data_from_params_file
     self.str_var_for_input_output_boxes = str_var_for_input_output_boxes
     self.weight_tab = None
     self.load_without_data = IntVar()
     self.options_frame = None
     self.create_widgets(weights_status_str)
예제 #11
0
    def __init__(self, *args):
        Notebook.__init__(self, *args)
        self.pack(expand=True, fill=BOTH)

        style = Style()
        style.theme_create('CustomTapStyle',
                           settings={
                               'TNotebook.Tab': {
                                   'configure': {
                                       'padding': [50, 10],
                                       'borderwidth': 1,
                                   },
                                   "map": {
                                       'background': [("selected", '#00FF00')]
                                   }
                               }
                           })
        style.theme_use("CustomTapStyle")
예제 #12
0
 def __init__(self, master=None, width=0):
     Notebook.__init__(self, master=master, width=width)
     self.width = width
     self._main_tab = MainTab(self)
     self.game_tab = GameTab(self)
     self.settings_tab = SettingsTab(self)
     self._developer_tab = DeveloperTab(self)
     for tab in [
             self._main_tab, self.game_tab, self.settings_tab,
             self._developer_tab
     ]:
         self._position_tab(tab)
     self._enable_hot_keys()
     self.grid(row=0, column=0)
     if not self.master.is_game_in_progress.get():
         self.tab(1, state=DISABLED)
     if not self.master.debug_mode:
         self.hide(3)
     self.tab(3, text='Dev')
예제 #13
0
  def __init__(self, master=None, **kw):

    Notebook.__init__(self, master, **kw)
    self.bind("<<NotebookTabChanged>>", self._on_tab_changed)
예제 #14
0
	def __init__(self,*args,**kwargs):
		Notebook.__init__(self,*args,**kwargs)
		self.currentFrames = set()
예제 #15
0
    def __init__(self, master=None, **kw):

        Notebook.__init__(self, master, **kw)
        self.bind("<<NotebookTabChanged>>", self._on_tab_changed)
예제 #16
0
 def __init__(self, *args, **kwargs):
     Notebook.__init__(self, *args, **kwargs)
     self.currentFrames = set()
예제 #17
0
 def __init__(self, parent):
     """Initialize the main window."""
     Notebook.__init__(self, parent)
     self.pack(fill=tk.BOTH, expand=tk.YES)
예제 #18
0
 def __init__(self, *args):
     Notebook.__init__(self, *args)
     self.pack(expand = 1, fill ="both")
예제 #19
0
 def __init__(self, *args, **kwargs):
     Notebook.__init__(self, *args, **kwargs)
     self.bindtags((self, '.', 'all'))
예제 #20
0
 def __init__(self, parent):
     Notebook.__init__(self, parent)
     self.parent = parent
     self.frames = []
     self.bind('<ButtonRelease-1>', self.tab_changed)