示例#1
0
 def render(self) -> ui.components:
     return [
         ui.Panel(items=[
             ui.Segment(items=[ui.Label('Event Log')]),
             ui.Table(items=self.lines)
         ])
     ]
示例#2
0
    def render(self) -> ui.components:
        items = [ui.Segment(items=[ui.Label('Variables')])
                 ]  #type: List[ui.Component]

        variables = []  #type: List[ui.Component]
        for v in self.variables:
            variables.append(VariableComponent(v))
        items.append(ui.Table(items=variables))

        return [ui.Panel(items=items)]
    def render(self) -> ui.components:
        buttons = []  #type: List[ui.Component]
        if self.state == RUNNING:
            buttons = [
                ui.Label("Running", width=6),
                ui.Button(self.listener.OnSettings,
                          items=[ui.Img(ui.Images.shared.settings)]),
                ui.Button(self.listener.OnStop,
                          items=[ui.Img(ui.Images.shared.stop)]),
                ui.Button(self.listener.OnPause,
                          items=[ui.Img(ui.Images.shared.pause)]),
            ]
        if self.state == PAUSED:
            buttons = [
                ui.Label("Paused", width=6),
                ui.Button(self.listener.OnSettings,
                          items=[ui.Img(ui.Images.shared.settings)]),
                ui.Button(self.listener.OnStop,
                          items=[ui.Img(ui.Images.shared.stop)]),
                ui.Button(self.listener.OnResume,
                          items=[ui.Img(ui.Images.shared.play)]),
                ui.Button(self.listener.OnStepOver,
                          items=[ui.Img(ui.Images.shared.down)]),
                ui.Button(self.listener.OnStepOut,
                          items=[ui.Img(ui.Images.shared.left)]),
                ui.Button(self.listener.OnStepIn,
                          items=[ui.Img(ui.Images.shared.right)]),
            ]
        if self.state == STOPPED:
            buttons = [
                ui.Label(self.name, width=6),
                ui.Button(self.listener.OnSettings,
                          items=[ui.Img(ui.Images.shared.settings)]),
                ui.Button(self.listener.OnPlay,
                          items=[ui.Img(ui.Images.shared.play)]),
            ]
        if self.state == LOADING:
            buttons = [
                ui.Label(self.name, width=6),
                ui.Button(self.listener.OnSettings,
                          items=[ui.Img(ui.Images.shared.settings)]),
                ui.Button(self.listener.OnStop,
                          items=[ui.Img(ui.Images.shared.stop)]),
                LoadingComponent()
            ]

        return [
            ui.Panel(items=[
                ui.Segment(items=buttons),
                FiltersComponent(self.breakpoints),
                BreakpintsComponent(self.breakpoints,
                                    self.listener.OnExpandBreakpoint),
            ]),
        ]
示例#4
0
	def render(self) -> ui.components:			
		self.thread_components = []
		for index, thread in enumerate(self.threads):
			assert self.debugger
			item = ThreadComponent(self.debugger, thread)
			self.thread_components.append(item)
		return [
			ui.Panel(items = [
				ui.Segment(items = [
					ui.Label('Call Stack')
				]),
				# FIXME?? Table should not take List
				ui.Table(items = self.thread_components) #type: ignore 
			])
		]
示例#5
0
    def render(self) -> ui.Block.Children:
        items = []  #type: List[ui.Block]

        scopes_items = []  #type: List[ui.Block]

        # expand the first scope only
        first = True
        for v in self.scopes:
            scopes_item = ScopeComponent(v)
            if first:
                first = False
                scopes_item.scope.toggle_expand()
            scopes_items.append(scopes_item)

        items.append(ui.Table(items=scopes_items))

        return [
            ui.HorizontalSpacer(variables_panel_width(self.layout)),
            ui.Panel(items=items)
        ]
示例#6
0
    def render(self) -> ui.Block.Children:
        buttons = []  #type: List[ui.Block]

        play = False
        stop = False
        pause = False
        controls = False

        if self.state == RUNNING:
            stop = True
            play = True
            pause = True
            controls = True

        if self.state == PAUSED:
            stop = True
            play = True
            pause = False
            controls = True

        if self.state == STOPPED:
            stop = False
            play = True
            controls = False

        if self.state == LOADING:
            stop = True
            play = True
            controls = False

        items = []

        if play:
            items.append(
                DebuggerItem(self.callbacks.on_play,
                             ui.Img(ui.Images.shared.play)))
        else:
            items.append(
                DebuggerItem(self.callbacks.on_play,
                             ui.Img(ui.Images.shared.play)))
        if stop:
            items.append(
                DebuggerItem(self.callbacks.on_stop,
                             ui.Img(ui.Images.shared.stop)))
        else:
            items.append(
                DebuggerItem(self.callbacks.on_stop,
                             ui.Img(ui.Images.shared.stop_disable)))

        if not controls:
            items.append(
                DebuggerItem(self.callbacks.on_pause,
                             ui.Img(ui.Images.shared.pause_disable)))
        elif pause:
            items.append(
                DebuggerItem(self.callbacks.on_pause,
                             ui.Img(ui.Images.shared.pause)))
        else:
            items.append(
                DebuggerItem(self.callbacks.on_resume,
                             ui.Img(ui.Images.shared.resume)))

        if controls:
            items.extend([
                DebuggerItem(self.callbacks.on_step_over,
                             ui.Img(ui.Images.shared.down)),
                DebuggerItem(self.callbacks.on_step_out,
                             ui.Img(ui.Images.shared.left)),
                DebuggerItem(self.callbacks.on_step_in,
                             ui.Img(ui.Images.shared.right)),
            ])
        else:
            items.extend([
                DebuggerItem(self.callbacks.on_step_over,
                             ui.Img(ui.Images.shared.down_disable)),
                DebuggerItem(self.callbacks.on_step_out,
                             ui.Img(ui.Images.shared.left_disable)),
                DebuggerItem(self.callbacks.on_step_in,
                             ui.Img(ui.Images.shared.right_disable)),
            ])

        items_new = []
        for item in items:
            items_new.append(ui.Padding(item, bottom=0.2))
        return [
            ui.Panel(items=items_new),
        ]