def __init__(self, columns: List[str]) -> None: Win.__init__(self) self._columns = columns self._columns_sizes = {} # type: Dict[str, int] self._column_sel = '' self._column_order = '' self._column_order_asc = False
def __init__(self): self._image = None Win.__init__(self) if config.get('image_use_half_blocks'): self._display_avatar = self._display_avatar_half_blocks else: self._display_avatar = self._display_avatar_full_blocks
def __init__(self, field): FieldInput.__init__(self, field) Win.__init__(self) values = field.get_value() or [] self.options = [[option, True if option['value'] in values else False]\ for option in field.get_options()] self.val_pos = 0
def __init__(self, columns): Win.__init__(self) self._columns = columns self._columns_sizes = {} self._column_sel = '' self._column_order = '' self._column_order_asc = False
def __init__(self, field): FieldInput.__init__(self, field) Win.__init__(self) values = field.getValue() or [] self.options = [[option, True if option['value'] in values else False]\ for option in field.get_options()] self.val_pos = 0
def __init__(self) -> None: self._image = None # type: Optional[Image.Image] Win.__init__(self) if config.get('image_use_half_blocks'): self._display_avatar = self._display_avatar_half_blocks # type: Callable[[int, int], None] else: self._display_avatar = self._display_avatar_full_blocks
def __init__(self) -> None: self._image = None # type: Optional[Image] Win.__init__(self) if config.get('image_use_half_blocks'): self._display_avatar = self._display_avatar_half_blocks # type: Callable[[int, int], None] else: self._display_avatar = self._display_avatar_full_blocks
def __init__(self, columns, with_headers=True): Win.__init__(self) self._columns = columns # a dict {'column_name': tuple_index} self._columns_sizes = {} # a dict {'column_name': size} self.sorted_by = (None, None) # for example: ('name', '↑') self.lines = [] # a list of dicts self._selected_row = 0 self._starting_pos = 0 # The column number from which we start the refresh
def __init__(self, columns: Dict[str, int], with_headers: bool = True) -> None: Win.__init__(self) self._columns = columns # type: Dict[str, int] self._columns_sizes = {} # type: Dict[str, int] self.sorted_by = (None, None) # for example: ('name', '↑') self.lines = [] # type: List[str] self._selected_row = 0 self._starting_pos = 0 # The column number from which we start the refresh
def __init__(self, text='', callback=None): Win.__init__(self) self.key_func = { 'y' : self.on_yes, 'n' : self.on_no, } self.txt = text self.value = None self.callback = callback
def __init__(self, field): FieldInput.__init__(self, field) Win.__init__(self) # the option list never changes self.options = field.getOptions() # val_pos is the position of the currently selected option self.val_pos = 0 for i, option in enumerate(self.options): if field.getValue() == option['value']: self.val_pos = i
def __init__(self, field): FieldInput.__init__(self, field) Win.__init__(self) # the option list never changes self.options = field.get_options() # val_pos is the position of the currently selected option self.val_pos = 0 for i, option in enumerate(self.options): if field.get_value() == option['value']: self.val_pos = i
def __init__(self, lines_nb_limit=None): if lines_nb_limit is None: lines_nb_limit = config.get('max_lines_in_memory') Win.__init__(self) self.lines_nb_limit = lines_nb_limit self.pos = 0 self.built_lines = [] # Each new message is built and kept here. # on resize, we rebuild all the messages self.lock = False self.lock_buffer = [] self.separator_after = None
def __init__(self, lines_nb_limit: Optional[int] = None) -> None: if lines_nb_limit is None: lines_nb_limit = config.get('max_lines_in_memory') Win.__init__(self) self.lines_nb_limit = lines_nb_limit # type: int self.pos = 0 # Each new message is built and kept here. # on resize, we rebuild all the messages self.built_lines = [] # type: List[Union[None, Line]] self.lock = False self.lock_buffer = [] # type: List[Union[None, Line]] self.separator_after = None # type: Optional[Line]
def __init__(self, field): FieldInput.__init__(self, field) Win.__init__(self) self.options = field.getValue() if not isinstance(self.options, list): self.options = self.options.split('\n') if self.options else [] self.val_pos = 0 self.edition_input = None if not isinstance(self.options, list): if isinstance(self.options, str): self.options = [self.options] else: self.options = [] self.options.append('')
def __init__(self, field): FieldInput.__init__(self, field) Win.__init__(self) options = field.get_value() if isinstance(options, list): self.options = options else: self.options = options.split('\n') if options else [] self.val_pos = 0 self.edition_input = None if not isinstance(self.options, list): if isinstance(self.options, str): self.options = [self.options] else: self.options = [] self.options.append('')
def __init__(self) -> None: self.key_func = { "KEY_LEFT": self.key_left, "KEY_RIGHT": self.key_right, "KEY_END": self.key_end, "KEY_HOME": self.key_home, "KEY_DC": self.key_dc, '^D': self.key_dc, 'M-b': self.jump_word_left, "M-[1;5D": self.jump_word_left, "kRIT5": self.jump_word_right, "kLFT5": self.jump_word_left, '^W': self.delete_word, 'M-d': self.delete_next_word, '^K': self.delete_end_of_line, '^U': self.delete_beginning_of_line, '^Y': self.paste_clipboard, '^A': self.key_home, '^E': self.key_end, 'M-f': self.jump_word_right, "M-[1;5C": self.jump_word_right, "KEY_BACKSPACE": self.key_backspace, "M-KEY_BACKSPACE": self.delete_word, '^?': self.key_backspace, "M-^?": self.delete_word, # '^J': self.add_line_break, } # type: Dict[str, Callable] Win.__init__(self) self.text = '' self.pos = 0 # The position of the “cursor” in the text # (not only in the view) self.view_pos = 0 # The position (in the text) of the # first character displayed on the # screen self.on_input = DEFAULT_ON_INPUT # callback called on any key pressed self.color = None # use this color on addstr self.last_completion = None # type: Optional[str] self.hit_list = [] # type: List[str]
def __init__(self, lines_nb_limit: Optional[int] = None) -> None: Win.__init__(self) if lines_nb_limit is None: lines_nb_limit = config.get('max_lines_in_memory') self.lines_nb_limit = lines_nb_limit # type: int self.pos = 0 # Each new message is built and kept here. # on resize, we rebuild all the messages self.built_lines = [] # type: List[Union[None, Line]] self.lock = False self.lock_buffer = [] # type: List[Union[None, Line]] self.separator_after = None # type: Optional[Line] # the Lines of the highlights in that buffer self.highlights = [] # type: List[Line] # the current HL position in that list NaN means that we’re not on # an hl. -1 is a valid position (it's before the first hl of the # list. i.e the separator, in the case where there’s no hl before # it.) self.hl_pos = float('nan') # Keep track of the number of hl after the separator. # This is useful to make “go to next highlight“ work after a “move to separator”. self.nb_of_highlights_after_separator = 0
def __init__(self) -> None: Win.__init__(self) self.pos = 0 # cursor position in the contact list self.start_pos = 1 # position of the start of the display self.selected_row = None # type: Optional[Row] self.roster_cache = [] # type: List[Row]
def __init__(self) -> None: Win.__init__(self) self._message = ''
def __init__(self, core, scr): Win.__init__(self) self.core = core self._win = scr
def __init__(self, field): FieldInput.__init__(self, field) Win.__init__(self)
def __init__(self, text, critical=False): Win.__init__(self) self.text = text self.critical = critical
def __init__(self, text): Win.__init__(self) self._text = text self.built_lines = []
def __init__(self, field) -> None: FieldInput.__init__(self, field) Win.__init__(self) self.options = ('local', 'remote') # val_pos is the position of the currently selected option self.val_pos = self.options.index(field.method)
def __init__(self, core) -> None: Win.__init__(self) self.core = core
def __init__(self): Win.__init__(self) self.pos = 0 self.cache = []
def __init__(self, field) -> None: FieldInput.__init__(self, field) Win.__init__(self) self.last_key = 'KEY_RIGHT' self.value = field.autojoin
def __init__(self) -> None: Win.__init__(self) self.pos = 0 self.cache = [] # type: List[CachedUser]
def __init__(self, text) -> None: Win.__init__(self) self._text = text self.built_lines = [] # type: List[str]
def __init__(self, text): self.text = text self.color = get_theme().COLOR_NORMAL_TEXT Win.__init__(self)
def __init__(self, core, scr) -> None: Win.__init__(self) self.core = core self._win = scr
def __init__(self): Win.__init__(self) self._message = ''
def __init__(self, text=''): Win.__init__(self) self.txt = text
def __init__(self, field): FieldInput.__init__(self, field) Win.__init__(self) self.last_key = 'KEY_RIGHT' self.value = bool(field.get_value())
def __init__(self): Win.__init__(self)
def __init__(self, core): Win.__init__(self) self.core = core
def __init__(self, field): FieldInput.__init__(self, field) Win.__init__(self) self.last_key = 'KEY_RIGHT' self.value = bool(field.getValue())