예제 #1
0
파일: GView.py 프로젝트: naojsoft/gview
    def __init__(self, logger, app, ev_quit):
        self.logger = logger
        self.app = app
        self.ev_quit = ev_quit

        self.histlimit = 5000
        self._plot_w = None

        self.zv = ZView.ZView(logger, self)

        from ginga.gw import Widgets, GwHelp

        self.top = self.app.make_window('GView')
        self.top.add_callback('close', lambda w: self.quit())

        vbox = Widgets.VBox()
        vbox.set_border_width(2)
        vbox.set_spacing(1)
        self.top.set_widget(vbox)
        self.top.resize(800, 600)

        mbar = Widgets.Menubar()
        vbox.add_widget(mbar, stretch=0)

        filemenu = mbar.add_name("File")
        filemenu.add_separator()

        item = filemenu.add_name("Quit")
        item.add_callback('activated', lambda *args: self.quit())

        nb = Widgets.TabWidget()
        vbox.add_widget(nb, stretch=1)

        sbar = Widgets.StatusBar()
        vbox.add_widget(sbar, stretch=0)

        vbox = Widgets.VBox()
        vbox.set_border_width(2)
        vbox.set_spacing(1)

        vbox.add_widget(Widgets.Label("Type command here:"))
        self.cmd_w = Widgets.TextEntry()
        # TODO: this is not fetching a fixed font
        font = GwHelp.get_font("fixed", 12)
        self.cmd_w.set_font(font)
        vbox.add_widget(self.cmd_w, stretch=0)
        self.cmd_w.add_callback('activated', self.exec_cmd_cb)

        vbox.add_widget(Widgets.Label("Output:"))
        self.hist_w = Widgets.TextArea(wrap=True, editable=True)
        self.hist_w.set_font(font)
        self.hist_w.set_limit(self.histlimit)
        vbox.add_widget(self.hist_w, stretch=1)

        nb.add_widget(vbox, "Command")

        self.top.show()
예제 #2
0
    def __init__(self, logger, app, ev_quit):
        self.logger = logger
        self.app = app
        self.ev_quit = ev_quit

        self.histlimit = 5000
        self._plot_w = None

        self.zv = ZView.ZView(logger, self)

        from ginga.gw import Widgets, GwHelp

        self.top = self.app.make_window('GView')
        self.top.add_callback('close', lambda w: self.quit())

        vbox = Widgets.VBox()
        vbox.set_border_width(2)
        vbox.set_spacing(1)
        self.top.set_widget(vbox)
        self.top.resize(800, 600)

        mbar = Widgets.Menubar()
        vbox.add_widget(mbar, stretch=0)

        filemenu = mbar.add_name("File")
        filemenu.add_separator()

        item = filemenu.add_name("Quit")
        item.add_callback('activated', lambda *args: self.quit())

        nb = Widgets.TabWidget()
        vbox.add_widget(nb, stretch=1)

        sbar = Widgets.StatusBar()
        vbox.add_widget(sbar, stretch=0)

        vbox = Widgets.VBox()
        vbox.set_border_width(2)
        vbox.set_spacing(1)

        vbox.add_widget(Widgets.Label("Type command here:"))
        self.cmd_w = Widgets.TextEntry()
        # TODO: this is not fetching a fixed font
        font = GwHelp.get_font("fixed", 12)
        self.cmd_w.set_font(font)
        vbox.add_widget(self.cmd_w, stretch=0)
        self.cmd_w.add_callback('activated', self.exec_cmd_cb)

        vbox.add_widget(Widgets.Label("Output:"))
        self.hist_w = Widgets.TextArea(wrap=True, editable=True)
        self.hist_w.set_font(font)
        self.hist_w.set_limit(self.histlimit)
        vbox.add_widget(self.hist_w, stretch=1)

        nb.add_widget(vbox, "Command")

        self.top.show()
예제 #3
0
파일: GingaGw.py 프로젝트: rupak0577/ginga
 def getFont(self, fontType, pointSize):
     font_family = self.settings.get(fontType)
     return GwHelp.get_font(font_family, pointSize)
예제 #4
0
파일: GingaGw.py 프로젝트: jochym/ginga
 def getFont(self, fontType, pointSize):
     font_family = self.settings.get(fontType)
     return GwHelp.get_font(font_family, pointSize)
예제 #5
0
 def get_font(self, font_family, point_size):
     #font_family = self.settings.get(font_type, 'sans')
     font = GwHelp.get_font(font_family, point_size)
     return font
예제 #6
0
 def get_font(self, font_family, point_size):
     return GwHelp.get_font(font_family, point_size)