예제 #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
    )