 |
|
| |
App::PFM::Screen(3) |
User Contributed Perl Documentation |
App::PFM::Screen(3) |
PFM class used for coordinating how all elements are displayed on screen. This
class extends Term::ScreenColor.
- _init(App::PFM::Application $pfm [, App::PFM::Config
$config ] )
- Called from the constructor. Initializes new instances. Stores the
application object for later use and instantiates a
App::PFM::Screen::Frame and App::PFM::Screen::Listing object.
Note that at the time of instantiation, the config file has
probably not yet been read.
- _catch_resize()
- Catches window resize signals (WINCH).
- new(array @args)
- Specific constructor for App::PFM::Screen. Constructs an object based on
Term::ScreenColor.
- screenwidth( [ int $screenwidth ] )
- screenheight( [ int $screenheight ] )
- Getters/setters for the dimensions of the screen.
- frame()
- listing()
- diskinfo()
- Getters for the App::PFM::Screen::Frame, App::PFM::Screen::Listing and
App::PFM::Screen::Diskinfo objects.
- wasresized( [ bool $wasresized ] )
- Getter/setter for the flag that indicates that the window was resized and
needs to be updated.
- color_mode( [ string $colormodename ] )
- Getter/setter for the choice of color mode (e.g. 'dark', 'light',
'ls_colors'). Schedules a screen refresh if the color mode is set.
- chooser( [ App:PFM::Browser $chooser ] )
- Getter/setter for a chooser object for which this screen object
should perform refreshes. This alters the behavior of the refresh()
method based on the chooser's SCREENTYPE.
To undefine the chooser, call this method with a zero
argument.
- raw_noecho()
- cooked_echo()
- Sets the terminal to raw or cooked mode.
- mouse_enable()
- mouse_disable()
- Tells the terminal to start/stop receiving information about the
mouse.
- bracketed_paste_on()
- bracketed_paste_off()
- Switches bracketed paste mode on and off. Bracketed paste mode is used to
intercept paste actions when "pfm" is
expecting a single command key.
- alternate_on()
- alternate_off()
- Switches to alternate terminal screen and back.
- getch()
- Overrides the Term::ScreenColor version of getch(). If a bracketed
paste is received, it is returned as one unit.
- calculate_dimensions()
- Calculates the height and width of the screen.
- check_minimum_size()
- Tests whether the terminal size is smaller than the minimum supported 24
rows or 80 columns. If so, sends an escape sequence to adjust the terminal
size.
- fit()
- Recalculates the screen size and adjust the layouts.
- handleresize()
- Makes the contents fit on the screen again after a resize. Validates the
cursor position.
- pending_input(float $delay)
- Returns a boolean indicating that there is input ready to be processed.
The delay indicates how long should be waited for input.
- get_event()
- Returns an App::PFM::Event object of type mouse, key or
resize, containing the event that was currently pending (as
determined by pending_input()).
- show_frame(hashref { menu => int $menu_mode,
footer => int $footer_mode, headings => int
$heading_mode, prompt => string
$prompt } )
- Uses the App::PFM::Screen::Frame object to redisplay the frame.
- clear_footer()
- Calls App::PFM::Screen::Frame::clear_footer() and schedules a
refresh for the footer.
- select_next_color(bool $direction)
- Finds the next colorset to use. If direction is true, cycle
forward; else backward.
- putcentered(string $message)
- Displays a message on the current screen line, horizontally centered.
- putmessage(string $message_part1 [, string
$message_part2 ... ] )
- Displays a message in the configured message color. Accepts an array with
message fragments.
- pressanykey()
- Displays a message and waits for a key to be pressed.
- ok_to_remove_marks()
- Prompts the user for confirmation since they are about to lose their marks
in the current directory.
- display_error(string $message_part1 [, string
$message_part2 ... ] )
- Displays an error which may be passed as an array with message fragments.
Waits for a key to be pressed and returns the keypress.
- neat_error(string $message_part1 [, string
$message_part2 ... ] )
- Displays an error which may be passed as an array with message fragments.
Waits for a key to be pressed and returns the keypress. Flags screen
elements for refreshing.
- error_delay()
- important_delay()
- Waits for a key to be pressed. Returns the keypress.
- set_deferred_refresh(int $elements)
- Flags screen elements as 'need to be redrawn'. The R_* constants
(see below) may be used to indicate which elements should be redrawn.
- unset_deferred_refresh(int $elements)
- Flags screen elements as 'do not need to be redrawn'. The R_*
constants (see below) may be used here.
- refresh_headings()
- Redisplays the headings if they have been flagged as 'needs to be
redrawn'.
- refresh()
- Redisplays all screen elements that have been flagged as 'need to be
redrawn'.
- path_info(bool $physical)
- Redisplays information about the current directory path and the current
filesystem. If the argument flag physical is set, the physical
pathname of the current directory is shown.
- pathline(string $path, string $device [,
ref $baselen, ref $ellipssize ] )
- Formats the information about the current directory path and the current
filesystem. The reference arguments are used by the CommandHandler for
finding out where in the pathline the mouse was clicked. baselen is
set to the length of the pathline before the ellipsis string.
ellipssize is the length of the ellipsis string.
- list_escapes(bool $all)
- List the available escapes; path escapes (=1, =2,
etc.) and if the $all flag is set, also
command escapes (=e, =p, =v, etc.).
- on_after_parse_usecolor(App::PFM::Event $event)
- Applies the 'usecolor' config option to the Term::ScreenColor(3pm)
object.
- on_after_parse_config(App::PFM::Event $event)
- Applies the config settings when the config file has been read and
parsed.
- on_shutdown(bool $altscreen_mode [, bool
$silent ] )
- Called when the application is shutting down. altscreen_mode
indicates if the State has used the alternate screen buffer.
This package provides the R_* constants which indicate which part of the
terminal screen needs to be redrawn. They can be imported with
"use App::PFM::Screen qw(:constants)".
- R_NOP
- No refresh action is required.
- R_STRIDE
- The cursor position needs to be validated.
- R_MENU
- Redisplay the menu.
- R_PATHINFO
- Redisplay the pathinfo (current directory and current device).
- R_HEADINGS
- Redisplay the column headings.
- R_FOOTER
- Redisplay the footer.
- R_FRAME
- A combination of R_FOOTER, R_HEADINGS, R_PATHINFO and R_MENU.
- R_DISKINFO
- Redisplay the disk- and directory info column.
- R_LISTING
- Redisplay the directory listing.
- R_SCREEN
- A combination of R_LISTING, R_DISKINFO and R_FRAME.
- R_CLEAR
- Clear the screen.
- R_CLRSCR
- A combination of R_CLEAR and R_SCREEN.
- R_NEWDIR
- Reinitialize directory-specific variables.
- R_CHDIR
- A combination of R_NEWDIR, R_SCREEN and R_STRIDE.
A refresh need for a screen element may be flagged by providing
one or more of these constants to set_deferred_refresh(),
e.g.
$screen->set_deferred_refresh(R_MENU | R_FOOTER);
The actual refresh will be performed on calling:
$screen->refresh();
This will also reset the refresh flags.
pfm(1), App::PFM::Screen::Diskinfo(3pm),
App::PFM::Screen::Frame(3pm), App::PFM::Screen::Listing(3pm),
Term::ScreenColor(3pm).
Visit the GSP FreeBSD Man Page Interface. Output converted with ManDoc.
|