def get_add_wdg(self):
    style = HtmlElement.style('\n            .spt_add_tab {\n                display: flex;\n                align-items: center;\n                padding-left: 10px;\n            }\n        ')
    div = DivWdg()
    div.add(style)
    div.add_class('spt_add_tab')
    icon_div = DivWdg()
    icon_div.add_class('spt_add_tab_inner')
    from tactic.ui.widget import IconButtonWdg, ButtonNewWdg
    icon = ButtonNewWdg(title='New Tab', icon='FA_PLUS', width=20)
    icon.add_style('display: block')
    icon_div.add_class('hand')
    icon_div.add(icon)
    add_bvr = self.kwargs.get('add_bvr')
    if (not add_bvr):
        add_bvr = '\n                spt.tab.top = bvr.src_el.getParent(".spt_tab_top");\n                spt.tab.add_new();\n            '
    icon_div.add_behavior({'type': 'click_up', 'cbjs_action': add_bvr})
    div.add(icon_div)
    self.extra_menu = self.kwargs.get('extra_menu')
    if self.extra_menu:
        icon_div = DivWdg()
        icon_div.set_round_corners(3, corners=['TR'])
        from tactic.ui.widget import IconButtonWdg
        icon = IconWdg('More Options', IconWdg.ARROWHEAD_DARK_DOWN)
        icon.add_style('margin-left: -2px')
        icon_div.add(icon)
        from smart_menu_wdg import SmartMenu
        smenu_set = SmartMenu.add_smart_menu_set(icon_div, {'BUTTON_MENU': self.extra_menu})
        SmartMenu.assign_as_local_activator(icon_div, 'BUTTON_MENU', True)
        icon_div.add_style('padding-top: 4px')
        icon_div.add_style('margin-top: 10px')
        icon_div.add_style('float: left')
        icon_div.add_style('height: 16px')
        icon_div.add_style('width: 10px')
        icon_div.add_style('margin-left: -1px')
        icon_div.add_gradient('background', 'background', (- 5), 5)
        icon_div.add_border()
        icon_div.add_style('text-align: center')
        icon_div.add_style('opacity: 0.5')
        div.add(icon_div)
    return div
def get_add_wdg(self):
    style = HtmlElement.style('\n            .spt_add_tab {\n                display: flex;\n                align-items: center;\n                padding-left: 10px;\n            }\n        ')
    div = DivWdg()
    div.add(style)
    div.add_class('spt_add_tab')
    icon_div = DivWdg()
    icon_div.add_class('spt_add_tab_inner')
    from tactic.ui.widget import IconButtonWdg, ButtonNewWdg
    icon = ButtonNewWdg(title='New Tab', icon='FA_PLUS', width=20)
    icon.add_style('display: block')
    icon_div.add_class('hand')
    icon_div.add(icon)
    add_bvr = self.kwargs.get('add_bvr')
    if (not add_bvr):
        add_bvr = '\n                spt.tab.top = bvr.src_el.getParent(".spt_tab_top");\n                spt.tab.add_new();\n            '
    icon_div.add_behavior({'type': 'click_up', 'cbjs_action': add_bvr})
    div.add(icon_div)
    self.extra_menu = self.kwargs.get('extra_menu')
    if self.extra_menu:
        icon_div = DivWdg()
        icon_div.set_round_corners(3, corners=['TR'])
        from tactic.ui.widget import IconButtonWdg
        icon = IconWdg('More Options', IconWdg.ARROWHEAD_DARK_DOWN)
        icon.add_style('margin-left: -2px')
        icon_div.add(icon)
        from smart_menu_wdg import SmartMenu
        smenu_set = SmartMenu.add_smart_menu_set(icon_div, {'BUTTON_MENU': self.extra_menu})
        SmartMenu.assign_as_local_activator(icon_div, 'BUTTON_MENU', True)
        icon_div.add_style('padding-top: 4px')
        icon_div.add_style('margin-top: 10px')
        icon_div.add_style('float: left')
        icon_div.add_style('height: 16px')
        icon_div.add_style('width: 10px')
        icon_div.add_style('margin-left: -1px')
        icon_div.add_gradient('background', 'background', (- 5), 5)
        icon_div.add_border()
        icon_div.add_style('text-align: center')
        icon_div.add_style('opacity: 0.5')
        div.add(icon_div)
    return div