%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
# Copyright 2015 Canonical, Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. from urwid import WidgetWrap, Pile, Text, ProgressBar from subiquitycore.ui.utils import Padding, Color from subiquitycore.ui.lists import SimpleList class Header(WidgetWrap): """ Header Widget This widget uses the style key `frame_header` :param str title: Title of Header :returns: Header() """ def __init__(self, title=None, excerpt=None): widgets = [Text("")] if title is not None: widgets.append( Padding.center_79(Color.body(Text(title)))) widgets.append(Text("")) if excerpt is not None: widgets.append( Padding.center_79(Color.body(Text(excerpt)))) widgets.append(Text("")) super().__init__(Pile(widgets)) class Footer(WidgetWrap): """ Footer widget Style key: `frame_footer` """ def __init__(self, message="", completion=0): message_widget = Padding.center_79(Color.body(Text(message))) progress_bar = Padding.center_60( ProgressBar(normal='progress_incomplete', complete='progress_complete', current=completion, done=100)) status = [ Padding.line_break(""), message_widget, ] if completion > 0: status.insert(0, progress_bar) super().__init__(Pile(status)) class Body(WidgetWrap): """ Body widget """ def __init__(self): super().__init__(SimpleList([Text("")]))