def __init__(self, title='', message='', *args, **kwargs):
        """
        Args:
            title (str): The title of the dialog.
            message (str): The message description.
            kwargs: See Widget.__init__()
        """
        super(GenericDialog, self).__init__(*args, **kwargs)
        self.set_layout_orientation(Widget.LAYOUT_VERTICAL)
        self.style.update({'display':'block', 'overflow':'auto', 'margin':'0px auto'})

        if len(title) > 0:
            t = Label(title)
            t.add_class('DialogTitle')
            self.append(t, "title")

        if len(message) > 0:
            m = Label(message)
            m.style['margin'] = '5px'
            self.append(m, "message")

        self.container = Widget()
        self.container.style.update({'display':'block', 'overflow':'auto', 'margin':'5px'})
        self.container.set_layout_orientation(Widget.LAYOUT_VERTICAL)
        self.conf = Button('Ok')
        self.conf.set_size(100, 30)
        self.conf.style['margin'] = '3px'
        self.cancel = Button('Cancel')
        self.cancel.set_size(100, 30)
        self.cancel.style['margin'] = '3px'
        hlay = Widget(height=35)
        hlay.style['display'] = 'block'
        hlay.style['overflow'] = 'visible'
        hlay.append(self.conf, "confirm_button")
        hlay.append(self.cancel, "cancel_button")
        self.conf.style['float'] = 'right'
        self.cancel.style['float'] = 'right'

        self.append(self.container, "central_container")
        self.append(hlay, "buttons_container")

        self.conf.onclick.connect(self.confirm_dialog)
        self.cancel.onclick.connect(self.cancel_dialog)

        self.inputs = {}

        self._base_app_instance = None
        self._old_root_widget = None
def __init__ ( self , title = '' , message = '' , * args , ** kwargs ) : super ( GenericDialog , self ) . __init__ ( * args , ** kwargs ) self . set_layout_orientation ( Widget . LAYOUT_VERTICAL ) self . style . update ( { 'display' : 'block' , 'overflow' : 'auto' , 'margin' : '0px auto' } ) if len ( title ) > 0 : t = Label ( title ) t . add_class ( 'DialogTitle' ) self . append ( t , "title" ) if len ( message ) > 0 : m = Label ( message ) m . style [ 'margin' ] = '5px' self . append ( m , "message" ) self . container = Widget ( ) self . container . style . update ( { 'display' : 'block' , 'overflow' : 'auto' , 'margin' : '5px' } ) self . container . set_layout_orientation ( Widget . LAYOUT_VERTICAL ) self . conf = Button ( 'Ok' ) self . conf . set_size ( 100 , 30 ) self . conf . style [ 'margin' ] = '3px' self . cancel = Button ( 'Cancel' ) self . cancel . set_size ( 100 , 30 ) self . cancel . style [ 'margin' ] = '3px' hlay = Widget ( height = 35 ) hlay . style [ 'display' ] = 'block' hlay . style [ 'overflow' ] = 'visible' hlay . append ( self . conf , "confirm_button" ) hlay . append ( self . cancel , "cancel_button" ) self . conf . style [ 'float' ] = 'right' self . cancel . style [ 'float' ] = 'right' self . append ( self . container , "central_container" ) self . append ( hlay , "buttons_container" ) self . conf . onclick . connect ( self . confirm_dialog ) self . cancel . onclick . connect ( self . cancel_dialog ) self . inputs = { } self . _base_app_instance = None self . _old_root_widget = None
Args:
            title (str): The title of the dialog.
            message (str): The message description.
            kwargs: See Widget.__init__()