awsc.commander.Filterer
- class awsc.commander.Filterer(*args, session, color, symbol_color, inactive_color, **kwargs)
The Filterer is the command bar for filtering the currently active control. Different top level controls react differently to filtering. Lister controls will hide elements not matching the filter. Text browser controls will highlight matches in their text and jump between matches.
- Attributes:
- sessionawsc.session.Session
The session manager object.
- colorawsc.termui.color.Color
The color of the control’s text and borders.
- symbol_colorawsc.termui.color.Color
The color of the symbol for the filter bar.
- inactive_colorawsc.termui.color.Color
The color of the bar when it is inactive.
- pausedbool
Whether the bar is inactive. The inactive bar still applies its filter, but pressing keys does not type into it.
- accepted_inputstr
The list of accepted input keys. Defaults to accepted textfield inputs.
- textstr
The current filter.
Methods
add_block
(block)Adds a new child block to this block.
before_paint
()Hook function for acting on the block before any blocks are painted for the current frame.
bottomright
()Returns the coordinates of the bottom right corner of the block.
clear_blocks
([tag])Removes all blocks with the matching tag from the child blocks of this block.
close
()Closes the filter bar and removes it from view.
input
(key)Input handler hook function.
paint
()Hook function for painting the block.
pause
()Sets pause flag.
remove_block
(block)Removes a specific block from this block.
reparent
()Shorthand function for removing a Block from its parent and re-adding it.
resume
()Unsets pause flag.
topleft
()Returns the coordinates of the top left corner of the block.
on_become_frame
- __init__(*args, session, color, symbol_color, inactive_color, **kwargs)
Initializes a Control object.
- Parameters:
- borderawsc.termui.control.Border
The border of the control.
Methods
__init__
(*args, session, color, ...)Initializes a Control object.
add_block
(block)Adds a new child block to this block.
before_paint
()Hook function for acting on the block before any blocks are painted for the current frame.
bottomright
()Returns the coordinates of the bottom right corner of the block.
clear_blocks
([tag])Removes all blocks with the matching tag from the child blocks of this block.
close
()Closes the filter bar and removes it from view.
input
(key)Input handler hook function.
on_become_frame
()paint
()Hook function for painting the block.
pause
()Sets pause flag.
remove_block
(block)Removes a specific block from this block.
reparent
()Shorthand function for removing a Block from its parent and re-adding it.
resume
()Unsets pause flag.
topleft
()Returns the coordinates of the top left corner of the block.
Attributes
border
Returns the border of the control.
corners
Read-only property for calculating the four corners of the block.
height
Read-only property for the height of the block.
inner
Read-only property for calculating the four inner corners of the block.
w_in
Read-only property for the inner width of the block.
width
Read-only property for the width of the block.