Exemple #1
0
    def build(self):
        # ----- Menubar
        self.menubar = AppMenuBar(self.app, self)
        print 'AppMenuBar'
        self.set_menubar(self.menubar)
        print 'Menubar'
        # ----- Toolbar
        if config.ui_style == appconst.GUI_CLASSIC:
            self.toolbar = build_toolbar(self)
        print 'Toolbar'

        # ----- MDI Area
        self.mdi = MDIArea(self.app, self)
        self.pack(self.mdi, expand=True, fill=True)
        if not config.new_doc_on_start:
            self.mdi.hide()
        print 'MDI Area'

        # ----- Stub panel
        self.stub = AppStubPanel(self)
        self.pack(self.stub, expand=True, fill=True)
        if config.new_doc_on_start:
            self.stub.hide()
        print 'Stub'

        self.layout()
Exemple #2
0
class AppMainWindow(wal.MainWindow):
    menubar = None
    mdi = None
    stub = None
    palette_panel = None
    statusbar = None
    toolbar = None

    def __init__(self, app):
        self.app = app
        wal.MainWindow.__init__(self,
                                app,
                                '',
                                config.mw_size,
                                maximized=config.mw_maximized,
                                on_close=self.app.exit)
        self.set_minsize(config.mw_min_size)
        self.set_icons(
            os.path.join(config.resource_dir, 'icons', 'generic',
                         'sk1-icon.ico'))

    def build(self):
        # ----- Menubar
        self.menubar = AppMenuBar(self.app, self)
        # ----- Toolbar
        self.toolbar = build_toolbar(self)

        # ----- MDI Area
        self.mdi = MDIArea(self.app, self)
        self.pack(self.mdi, expand=True, fill=True)
        if not config.new_doc_on_start:
            self.mdi.hide()

        # ----- Stub panel
        self.stub = AppStubPanel(self)
        self.pack(self.stub, expand=True, fill=True)
        if config.new_doc_on_start:
            self.stub.hide()

        self.layout()

    def set_title(self, title=''):
        appname = self.app.appdata.app_name
        if title:
            title = '[%s] - %s' % (title, appname)
        else:
            title = appname
        wal.MainWindow.set_title(self, title)

    def show_mdi(self, value):
        if value and not self.mdi.is_shown():
            self.stub.hide()
            self.mdi.layout()
            self.mdi.show()
        elif not value and self.mdi.is_shown():
            self.stub.Layout()
            self.stub.show()
            self.mdi.hide()
        self.layout()
Exemple #3
0
class AppMainWindow(wal.MainWindow):

	menubar = None
	mdi = None
	stub = None
	palette_panel = None
	statusbar = None

	def __init__(self, app):
		self.app = app
		wal.MainWindow.__init__(self, '', config.mw_size,
							maximized=config.mw_maximized,
							on_close=self.app.exit)
		self.set_minsize(config.mw_min_size)
		self.set_icons(os.path.join(config.resource_dir, 'icons',
								'generic', 'sk1-icon.ico'))

	def build(self):
		#----- Menubar
		self.menubar = AppMenuBar(self.app, self)
		#----- Toolbar
		self.toolbar = ToolbarCreator(self).tb

		#----- MDI Area
		self.mdi = MDIArea(self.app, self)
		self.pack(self.mdi, expand=True, fill=True)
		if not config.new_doc_on_start:self.mdi.hide()

		#----- Stub panel
		self.stub = AppStubPanel(self)
		self.pack(self.stub, expand=True, fill=True)
		if config.new_doc_on_start:self.stub.hide()

		self.layout()

	def set_title(self, title=''):
		appname = self.app.appdata.app_name
		if title: title = '[%s] - %s' % (title, appname)
		else: title = appname
		wal.MainWindow.set_title(self, title)

	def show_mdi(self, value):
		if value and not self.mdi.is_shown():
			self.stub.hide()
			self.mdi.layout()
			self.mdi.show()
		elif not value and self.mdi.is_shown():
			self.stub.Layout()
			self.stub.show()
			self.mdi.hide()
		self.layout()
Exemple #4
0
	def build(self):
		#----- Menubar
		self.menubar = AppMenuBar(self.app, self)
		#----- Toolbar
		self.toolbar = ToolbarCreator(self).tb

		#----- MDI Area
		self.mdi = MDIArea(self.app, self)
		self.pack(self.mdi, expand=True, fill=True)
		if not config.new_doc_on_start:self.mdi.hide()

		#----- Stub panel
		self.stub = AppStubPanel(self)
		self.pack(self.stub, expand=True, fill=True)
		if config.new_doc_on_start:self.stub.hide()

		self.layout()
Exemple #5
0
	def build(self):
		#----- Menubar
		self.menubar = AppMenuBar(self.app, self)
		#----- Toolbar
		self.toolbar = ToolbarCreator(self).tb

		#----- MDI Area
		self.mdi = MDIArea(self.app, self)
		self.pack(self.mdi, expand=True, fill=True)
		if not config.new_doc_on_start:self.mdi.hide()

		#----- Stub panel
		self.stub = AppStubPanel(self)
		self.pack(self.stub, expand=True, fill=True)
		if config.new_doc_on_start:self.stub.hide()

		self.layout()