def __init__(self): ScrolledWindow.__init__(self) MDSplusWidget.__init__(self) tv = TextView() tv.set_wrap_mode(WRAP_WORD) self.buffer = tv.get_buffer() self.add(tv)
def __init__(self): HBox.__init__(self) MDSplusWidget.__init__(self) HBox.set_homogeneous(self, False) self.node_state = CheckButton('') self.button = Button() HBox.pack_start(self, self.node_state, False, False, 0) HBox.pack_start(self, self.button, False, False, 0) HBox.pack_start(self, Label(''), True, False, 0) if not guibuilder: self.button.connect("clicked", self.popupXd) self.button.connect("realize", self.setButtonLabel)
def __init__(self): HBox.__init__(self) MDSplusWidget.__init__(self) HBox.set_homogeneous(self,False) self.node_state=CheckButton('') self.button=Button() HBox.pack_start(self,self.node_state,False,False,0) HBox.pack_start(self,self.button,False,False,0) HBox.pack_start(self,Label(''),True,False,0) if not guibuilder: self.button.connect("clicked",self.popupXd) self.button.connect("realize",self.setButtonLabel)
def __init__(self): ScrolledWindow.__init__(self) MDSplusWidget.__init__(self) self.numChannels=4 self.nodesPerChannel=3 self.dataNidOffset=1 self.startIdxNidOffset=2 self.endIdxNidOffset=3 self.incNidOffset=-1 self.table=Table(homogeneous=False) self.table.set_row_spacings(0) self.add_with_viewport(self.table) self.set_policy(POLICY_NEVER,POLICY_ALWAYS) adj=self.get_vadjustment() if adj is not None: adj.connect("changed",self.adj_changed)
def __init__(self): ScrolledWindow.__init__(self) MDSplusWidget.__init__(self) self.numChannels = 4 self.nodesPerChannel = 3 self.dataNidOffset = 1 self.startIdxNidOffset = 2 self.endIdxNidOffset = 3 self.incNidOffset = -1 self.table = Table(homogeneous=False) self.table.set_row_spacings(0) self.add_with_viewport(self.table) self.set_policy(POLICY_NEVER, POLICY_ALWAYS) adj = self.get_vadjustment() if adj is not None: adj.connect("changed", self.adj_changed)
def __init__(self): Button.__init__(self) MDSplusWidget.__init__(self) if not guibuilder: self.connect("clicked", self.popupXd)
def __init__(self, node=None, value=None): Window.__init__(self) MDSplusWidget.__init__(self) if node is not None: self.node = node else: self.value = value hbtop = HBox(homogeneous=False) self.on = CheckButton(label="On") self.parent_on = CheckButton(label="Parent") self.parent_on.set_sensitive(False) self.path = MDSplusPathWidget() if node is not None: self.path._node = self._node hbtags = HBox(homogeneous=False) self.tags = Entry() self.tags.set_width_chars(60) expression_menu = self.dtype_menu(tuple(), varname="dtype_expression", no_show=True) axis_menu = self.dtype_menu(("Range",), varname="dtype_axis", no_show=True) window_menu = self.dtype_menu(("Window",), varname="dtype_window", no_show=True) dispatch_menu = self.dtype_menu(("Dispatch",), varname="dtype_dispatch", no_show=True) action_menu = self.dtype_menu(("Action",), varname="dtype_action", no_show=True) task_menu = self.dtype_menu(("Method", "Routine"), varname="dtype_task", no_show=True) any_menu = self.dtype_menu( ("Range", "Window", "Dispatch", "Action", "Method", "Routine"), varname="dtype_any", no_show=True ) menus = ( self.dtype_expression, self.dtype_axis, self.dtype_dispatch, self.dtype_action, self.dtype_task, self.dtype_window, self.dtype_any, ) hbtop.pack_start(self.on, False, False, 10) hbtop.pack_start(self.parent_on, False, False, 10) hbtop.pack_start(self.path, False, False, 0) hbtags.pack_start(Label("Tags:"), False, False, 10) hbtags.pack_start(self.tags, False, False, 0) self.action = MDSplusActionWidget() self.windoww = MDSplusWindowWidget() self.sequential = MDSplusSequentialWidget() self.expression = MDSplusExpressionWidget() self.method = MDSplusMethodWidget() self.routine = MDSplusRoutineWidget() self.dispatch = MDSplusDispatchWidget() self.range = MDSplusRangeWidget() self.widgets = ( self.action, self.sequential, self.expression, self.method, self.routine, self.dispatch, self.range, self.windoww, ) self.ok = Button(stock=STOCK_OK) self.cancel = Button(stock=STOCK_CANCEL) self.redo = Button(stock=STOCK_REDO) self.ok.connect("clicked", self.do_ok) self.cancel.connect("clicked", self.do_cancel) self.redo.connect("clicked", self.do_redo) hb2 = HBox() hb2.add(self.ok) hb2.add(self.redo) hb2.add(self.cancel) vb = VBox(homogeneous=False) vb.set_border_width(10) vb.pack_start(hbtop, False, False, 0) vb.pack_start(hbtags, False, False, 0) vb.pack_start(expression_menu, False, False, 0) vb.pack_start(axis_menu, False, False, 0) vb.pack_start(window_menu, False, False, 0) vb.pack_start(dispatch_menu, False, False, 0) vb.pack_start(action_menu, False, False, 0) vb.pack_start(task_menu, False, False, 0) vb.pack_start(any_menu, False, False, 0) for w in self.widgets: w.set_no_show_all(True) vb.pack_start(w, False, False, 0) vb.pack_start(hb2, False, False, 20) self.add(vb) self.do_redo(self.redo) self.putOnApply = True self.nidOffset = -1
def __init__(self): gtk.CheckButton.__init__(self) MDSplusWidget.__init__(self) self.showPath = False
def __init__(self): Button.__init__(self) MDSplusWidget.__init__(self) if not guibuilder: self.connect("clicked",self.popupXd)
def do_reset(self): return MDSplusWidget.doToAll(self.get_toplevel(), "reset")
def do_apply(self): return MDSplusWidget.doToAll(self.get_toplevel(), "apply")
def do_apply(self): return MDSplusWidget.doToAll(self.get_toplevel(),"apply")
def do_reset(self): return MDSplusWidget.doToAll(self.get_toplevel(),"reset")
def __init__(self, node=None, value=None): Window.__init__(self) MDSplusWidget.__init__(self) if node is not None: self.node = node else: self.value = value hbtop = HBox(homogeneous=False) self.on = CheckButton(label="On") self.parent_on = CheckButton(label="Parent") self.parent_on.set_sensitive(False) self.path = MDSplusPathWidget() if node is not None: self.path._node = self._node hbtags = HBox(homogeneous=False) self.tags = Entry() self.tags.set_width_chars(60) expression_menu = self.dtype_menu(tuple(), varname='dtype_expression', no_show=True) axis_menu = self.dtype_menu(('Range', ), varname='dtype_axis', no_show=True) window_menu = self.dtype_menu(('Window', ), varname='dtype_window', no_show=True) dispatch_menu = self.dtype_menu(('Dispatch', ), varname='dtype_dispatch', no_show=True) action_menu = self.dtype_menu(('Action', ), varname='dtype_action', no_show=True) task_menu = self.dtype_menu(('Method', 'Routine'), varname='dtype_task', no_show=True) any_menu = self.dtype_menu( ('Range', 'Window', 'Dispatch', 'Action', 'Method', 'Routine'), varname='dtype_any', no_show=True) menus = (self.dtype_expression, self.dtype_axis, self.dtype_dispatch, self.dtype_action, self.dtype_task, self.dtype_window, self.dtype_any) hbtop.pack_start(self.on, False, False, 10) hbtop.pack_start(self.parent_on, False, False, 10) hbtop.pack_start(self.path, False, False, 0) hbtags.pack_start(Label("Tags:"), False, False, 10) hbtags.pack_start(self.tags, False, False, 0) self.action = MDSplusActionWidget() self.windoww = MDSplusWindowWidget() self.sequential = MDSplusSequentialWidget() self.expression = MDSplusExpressionWidget() self.method = MDSplusMethodWidget() self.routine = MDSplusRoutineWidget() self.dispatch = MDSplusDispatchWidget() self.range = MDSplusRangeWidget() self.widgets = (self.action, self.sequential, self.expression, self.method, self.routine, self.dispatch, self.range, self.windoww) self.ok = Button(stock=STOCK_OK) self.cancel = Button(stock=STOCK_CANCEL) self.redo = Button(stock=STOCK_REDO) self.ok.connect("clicked", self.do_ok) self.cancel.connect("clicked", self.do_cancel) self.redo.connect("clicked", self.do_redo) hb2 = HBox() hb2.add(self.ok) hb2.add(self.redo) hb2.add(self.cancel) vb = VBox(homogeneous=False) vb.set_border_width(10) vb.pack_start(hbtop, False, False, 0) vb.pack_start(hbtags, False, False, 0) vb.pack_start(expression_menu, False, False, 0) vb.pack_start(axis_menu, False, False, 0) vb.pack_start(window_menu, False, False, 0) vb.pack_start(dispatch_menu, False, False, 0) vb.pack_start(action_menu, False, False, 0) vb.pack_start(task_menu, False, False, 0) vb.pack_start(any_menu, False, False, 0) for w in self.widgets: w.set_no_show_all(True) vb.pack_start(w, False, False, 0) vb.pack_start(hb2, False, False, 20) self.add(vb) self.do_redo(self.redo) self.putOnApply = True self.nidOffset = -1