: $> d dl mZmZ ddlmZ ddlmZmZ ddlm Z ddl mZ ddlm Z mZ ddlmZmZ dd lmZ dd lmZmZ ddlmZmZ erddlmZmZmZmZ G d de Ze dk rYddlmZ e Z!ddlm"Z"mZ ddlmZ eddde"d Z#e!$ e!$ e# dS dS ) ) TYPE_CHECKINGOptional )AlignMethod)ROUNDEDBox)cell_len)JupyterMixin)Measurementmeasure_renderables)PaddingPaddingDimensions)Segment)Style StyleType)TextTextType)ConsoleConsoleOptionsRenderableTypeRenderResultc e Zd ZdZefdddddddddddddd d dedee d edee dedee de de de dee dee dede ddfdZ eefddddddddddddd d dedee d edee dedee de de dee dee dede dd fd Zedee fd Zedee fd Z d&d#Z d'd%ZdS )(PanelaN A console renderable that draws a border around its contents. Example: >>> console.print(Panel("Hello, World!")) Args: renderable (RenderableType): A console renderable object. box (Box): A Box instance that defines the look of the border (see :ref:`appendix_box`. Defaults to box.ROUNDED. title (Optional[TextType], optional): Optional title displayed in panel header. Defaults to None. title_align (AlignMethod, optional): Alignment of title. Defaults to "center". subtitle (Optional[TextType], optional): Optional subtitle displayed in panel footer. Defaults to None. subtitle_align (AlignMethod, optional): Alignment of subtitle. Defaults to "center". safe_box (bool, optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True. expand (bool, optional): If True the panel will stretch to fill the console width, otherwise it will be sized to fit the contents. Defaults to True. style (str, optional): The style of the panel (border and contents). Defaults to "none". border_style (str, optional): The style of the border. Defaults to "none". width (Optional[int], optional): Optional width of panel. Defaults to None to auto-detect. height (Optional[int], optional): Optional height of panel. Defaults to None to auto-detect. padding (Optional[PaddingDimensions]): Optional padding around renderable. Defaults to 0. highlight (bool, optional): Enable automatic highlighting of panel title (if str). Defaults to False. NcenterTnone)r r F)titletitle_alignsubtitlesubtitle_alignsafe_boxexpandstyleborder_stylewidthheightpadding highlight renderabler boxr r r r r r! r" r# r$ r% r&