Пример #1
0
def create_process_monitor():
    return TextArea(style='class:footer',
                    focus_on_click=False,
                    read_only=False,
                    scrollbar=False,
                    max_line_count=1,
                    align=WindowAlign.RIGHT)
Пример #2
0
def generate_layout(input_field: TextArea, output_field: TextArea, log_field: TextArea):
    copy_key = "CTRL + SHIFT" if is_windows() else "fn"
    root_container = VSplit([
        FloatContainer(
            HSplit([
                output_field,
                Window(height=1, char='-', style='class:line'),
                input_field,
                TextArea(height=1,
                         text=f'Version: {version}    [Double Ctrl + C] QUIT    '
                         f'Hold down "{copy_key}" for selecting and copying text',
                         style='class:label'),
            ]),
            [
                # Completion menus.
                Float(xcursor=True,
                      ycursor=True,
                      transparent=True,
                      content=CompletionsMenu(
                          max_height=16,
                          scroll_offset=1)),
            ]
        ),
        Window(width=1, char='|', style='class:line'),
        log_field,
    ])
    return Layout(root_container, focused_element=input_field)
Пример #3
0
def create_log_field():
    return TextArea(
        style='class:log-field',
        text="Running logs\n",
        focus_on_click=False,
        read_only=False
    )
Пример #4
0
def create_live_field():
    return TextArea(
        style='class:log-field',
        focus_on_click=False,
        read_only=False,
        scrollbar=True,
        max_line_count=MAXIMUM_OUTPUT_PANE_LINE_COUNT,
    )
Пример #5
0
def create_trade_monitor():
    return TextArea(
        style='class:footer',
        focus_on_click=False,
        read_only=False,
        scrollbar=False,
        max_line_count=1,
    )
Пример #6
0
def create_output_field(client_config_map: ClientConfigAdapter):
    return TextArea(style='class:output_field',
                    focus_on_click=False,
                    read_only=False,
                    scrollbar=True,
                    max_line_count=MAXIMUM_OUTPUT_PANE_LINE_COUNT,
                    initial_text=HEADER,
                    lexer=FormattedTextLexer(client_config_map))
Пример #7
0
def create_timer():
    return TextArea(
        style='class:footer',
        focus_on_click=False,
        read_only=False,
        scrollbar=False,
        max_line_count=1,
        width=20,
    )
Пример #8
0
def create_output_field():
    return TextArea(
        style='class:output-field',
        focus_on_click=False,
        read_only=False,
        scrollbar=True,
        max_line_count=MAXIMUM_OUTPUT_PANE_LINE_COUNT,
        initial_text=HEADER,
    )
Пример #9
0
def create_log_field():
    return TextArea(
        style='class:log-field',
        text="Running logs\n",
        focus_on_click=False,
        read_only=False,
        scrollbar=True,
        max_line_count=MAXIMUM_LOG_PANE_LINE_COUNT,
        initial_text="Running Logs \n"
    )
Пример #10
0
def create_input_field(lexer=None, completer: Completer = None):
    return TextArea(
        height=10,
        prompt='>>> ',
        style='class:input-field',
        multiline=False,
        focus_on_click=True,
        lexer=lexer,
        auto_suggest=AutoSuggestFromHistory(),
        completer=completer,
        complete_while_typing=True,
    )
Пример #11
0
def create_log_field(search_field: SearchToolbar):
    return TextArea(
        style='class:log-field',
        text="Running Logs\n",
        focus_on_click=False,
        read_only=False,
        scrollbar=True,
        max_line_count=MAXIMUM_LOG_PANE_LINE_COUNT,
        initial_text="Running Logs \n",
        search_field=search_field,
        preview_search=False,
    )
Пример #12
0
def create_output_field():
    return TextArea(
        style='class:output-field',
        focus_on_click=False,
        read_only=False
    )