

def build_gui(self, container):
    top = Widgets.VBox()
    top.set_border_width(4)
    (vbox, sw, orientation) = Widgets.get_oriented_box(container)
    vbox.set_border_width(4)
    vbox.set_spacing(2)
    self.msgFont = self.fv.getFont('sansFont', 12)
    tw = Widgets.TextArea(wrap=True, editable=False)
    tw.set_font(self.msgFont)
    self.tw = tw
    fr = Widgets.Expander('Instructions')
    fr.set_widget(tw)
    vbox.add_widget(fr, stretch=0)
    fr = Widgets.Frame('Mosaic')
    captions = [('FOV (deg):', 'label', 'Fov', 'llabel', 'set_fov', 'entry'), ('New Mosaic', 'button', 'Allow expansion', 'checkbutton'), ('Label images', 'checkbutton', 'Match bg', 'checkbutton'), ('Trim Pixels:', 'label', 'Trim Px', 'llabel', 'trim_pixels', 'entry'), ('Num Threads:', 'label', 'Num Threads', 'llabel', 'set_num_threads', 'entry'), ('Merge data', 'checkbutton', 'Drop new', 'checkbutton'), ('Mosaic HDUs', 'checkbutton')]
    (w, b) = Widgets.build_info(captions, orientation=orientation)
    self.w.update(b)
    fov_deg = self.settings.get('fov_deg', 1.0)
    b.fov.set_text(str(fov_deg))
    b.set_fov.set_text(str(fov_deg))
    b.set_fov.add_callback('activated', self.set_fov_cb)
    b.set_fov.set_tooltip('Set size of mosaic FOV (deg)')
    b.allow_expansion.set_tooltip('Allow image to expand the FOV')
    allow_expand = self.settings.get('allow_expand', True)
    b.allow_expansion.set_state(allow_expand)
    b.allow_expansion.add_callback('activated', self.allow_expand_cb)
    b.new_mosaic.add_callback('activated', (lambda w: self.new_mosaic_cb()))
    labelem = self.settings.get('annotate_images', False)
    b.label_images.set_state(labelem)
    b.label_images.set_tooltip('Label tiles with their names (only if allow_expand=False)')
    b.label_images.add_callback('activated', self.annotate_cb)
    trim_px = self.settings.get('trim_px', 0)
    match_bg = self.settings.get('match_bg', False)
    b.match_bg.set_tooltip('Try to match background levels')
    orientation.match_bg.set_state(match_bg)
    b.match_bg.add_callback('activated', self.match_bg_cb)
    b.trim_pixels.set_tooltip('Set number of pixels to trim from each edge')
    b.trim_px.set_text(str(trim_px))
    b.trim_pixels.add_callback('activated', self.trim_pixels_cb)
    b.trim_pixels.set_text(str(trim_px))
    num_threads = self.settings.get('num_threads', 4)
    b.num_threads.set_text(str(num_threads))
    b.set_num_threads.set_text(str(num_threads))
    b.set_num_threads.set_tooltip('Number of threads to use for mosaicing')
    b.set_num_threads.add_callback('activated', self.set_num_threads_cb)
    merge = self.settings.get('merge', False)
    b.merge_data.set_tooltip('Merge data instead of overlay')
    b.merge_data.set_state(merge)
    b.merge_data.add_callback('activated', self.merge_cb)
    drop_new = self.settings.get('drop_creates_new_mosaic', False)
    b.drop_new.set_tooltip('Dropping files on image starts a new mosaic')
    b.drop_new.set_state(drop_new)
    b.drop_new.add_callback('activated', self.drop_new_cb)
    mosaic_hdus = self.settings.get('mosaic_hdus', False)
    b.mosaic_hdus.set_tooltip('Mosaic data HDUs in each file')
    b.mosaic_hdus.set_state(mosaic_hdus)
    b.mosaic_hdus.add_callback('activated', self.mosaic_hdus_cb)
    fr.set_widget(w)
    vbox.add_widget(fr, stretch=0)
    vbox2 = Widgets.VBox()
    hbox = Widgets.HBox()
    hbox.set_spacing(4)
    hbox.set_border_width(4)
    label = Widgets.Label()
    self.w.eval_status = label
    hbox.add_widget(self.w.eval_status, stretch=0)
    hbox.add_widget(Widgets.Label(''), stretch=1)
    vbox2.add_widget(hbox, stretch=0)
    hbox = Widgets.HBox()
    hbox.set_spacing(4)
    hbox.set_border_width(4)
    btn = Widgets.Button('Stop')
    btn.add_callback('activated', (lambda w: self.eval_intr()))
    btn.set_enabled(False)
    self.w.btn_intr_eval = btn
    hbox.add_widget(btn, stretch=0)
    self.w.eval_pgs = Widgets.ProgressBar()
    hbox.add_widget(self.w.eval_pgs, stretch=1)
    vbox2.add_widget(hbox, stretch=0)
    vbox2.add_widget(Widgets.Label(''), stretch=1)
    vbox.add_widget(vbox2, stretch=1)
    self.w.vbox = Widgets.VBox()
    vbox.add_widget(self.w.vbox, stretch=0)
    spacer = Widgets.Label('')
    vbox.add_widget(spacer, stretch=1)
    top.add_widget(sw, stretch=1)
    btns = Widgets.HBox()
    btns.set_spacing(3)
    btn = Widgets.Button('Close')
    btn.add_callback('activated', (lambda w: self.close()))
    btns.add_widget(btn, stretch=0)
    btns.add_widget(Widgets.Label(''), stretch=1)
    top.add_widget(btns, stretch=0)
    container.add_widget(top, stretch=1)
    self.gui_up = True

dataset/ETHPy150Open ejeschke/ginga/ginga/misc/plugins/Mosaic.py Mosaic.build_gui/VarMisuse@447/744 `b`->`orientation`