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)
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)
def create_log_field(): return TextArea( style='class:log-field', text="Running logs\n", focus_on_click=False, read_only=False )
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, )
def create_trade_monitor(): return TextArea( style='class:footer', focus_on_click=False, read_only=False, scrollbar=False, max_line_count=1, )
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))
def create_timer(): return TextArea( style='class:footer', focus_on_click=False, read_only=False, scrollbar=False, max_line_count=1, width=20, )
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, )
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" )
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, )
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, )
def create_output_field(): return TextArea( style='class:output-field', focus_on_click=False, read_only=False )