MCPcopy Index your code
hub / github.com/rawpython/remi / __init__

Method __init__

remi/gui.py:2411–2458  ·  view source on GitHub ↗

Args: title (str): The title of the dialog. message (str): The message description. kwargs: See Container.__init__()

(self, title='', message='', *args, **kwargs)

Source from the content-addressed store, hash-verified

2409 """
2410
2411 def __init__(self, title='', message='', *args, **kwargs):
2412 """
2413 Args:
2414 title (str): The title of the dialog.
2415 message (str): The message description.
2416 kwargs: See Container.__init__()
2417 """
2418 super(GenericDialog, self).__init__(*args, **kwargs)
2419 self.set_layout_orientation(Container.LAYOUT_VERTICAL)
2420 self.style.update({'display': 'block', 'overflow': 'auto', 'margin': '0px auto'})
2421
2422 if len(title) > 0:
2423 t = Label(title)
2424 t.add_class('DialogTitle')
2425 self.append(t, "title")
2426
2427 if len(message) > 0:
2428 m = Label(message)
2429 m.css_margin = '5px'
2430 self.append(m, "message")
2431
2432 self.container = Container()
2433 self.container.style.update({'display': 'block', 'overflow': 'auto', 'margin': '5px'})
2434 self.container.set_layout_orientation(Container.LAYOUT_VERTICAL)
2435 self.conf = Button('Ok')
2436 self.conf.set_size(100, 30)
2437 self.conf.css_margin = '3px'
2438 self.cancel = Button('Cancel')
2439 self.cancel.set_size(100, 30)
2440 self.cancel.css_margin = '3px'
2441 hlay = Container(height=35)
2442 hlay.css_display = 'block'
2443 hlay.style['overflow'] = 'visible'
2444 hlay.append(self.conf, "confirm_button")
2445 hlay.append(self.cancel, "cancel_button")
2446 self.conf.style['float'] = 'right'
2447 self.cancel.style['float'] = 'right'
2448
2449 self.append(self.container, "central_container")
2450 self.append(hlay, "buttons_container")
2451
2452 self.conf.onclick.connect(self.confirm_dialog)
2453 self.cancel.onclick.connect(self.cancel_dialog)
2454
2455 self.inputs = {}
2456
2457 self._base_app_instance = None
2458 self._old_root_widget = None
2459
2460 def add_field_with_label(self, key, label_description, field):
2461 """

Callers

nothing calls this directly

Calls 11

appendMethod · 0.95
LabelClass · 0.85
ContainerClass · 0.85
ButtonClass · 0.85
add_classMethod · 0.80
connectMethod · 0.80
__init__Method · 0.45
updateMethod · 0.45
appendMethod · 0.45
set_sizeMethod · 0.45

Tested by

no test coverage detected