Devel::MAT::UI - extend the user interface of a
This virtual package provides methods that Devel::MAT::Tool classes can use to extend the user interface provided by a Devel::MAT explorer program.
This package does not exist in a real .pm file; instead,
the methods should be provided directly by the explorer program.
A tool class can rely on being able to call them without doing anything special - do not attempt to
A tool may call this to register a named icon image with the UI,
for later use in an SV list column or SV detail.
The name of the icon is taken from the
and the specific UI implementation will use one of the other keys to provide the value for its type.
This icon is used by SV list columns or SV details where the
The value set gives the name the icon was registered with.
Gives a path name to an SVG file containing image data. This path is relative to the share directory of the package, managed by File::ShareDir.
A tool may call this to declare that it wishes to have a set of radiobuttons as a choice of options to be displayed in the toolbar of the user interface.
Each button is specified in a HASH reference in the
@buttons list containing the following keys:
The text to display on the button
The name of the previously-registered icon to display with the button
Descriptive text to associate with the button to further explain it
A code reference to invoke when the button is activated.
The buttons will be displayed in a group of their own, such that selecting one will deactivate all the others in the same set.
A tool may call this to declare that it wishes to provide a new column to display in the main SV list on the user interface.
It returns an opaque column value that should be passed to
set_svlist_column_values to provide data for the column.
The type of the column.
This may be
The title to display in the column header.
Opaque column values to represent the predefined SV list columns.
A tool may call this to provide the values to display in the SV list column it earlier created by calling
or to replace the values in any of the predefined columns.
The value returned from
A function to generate the value to store for each SV. Is invoked with each SV in the SV list, and should return the value to set in the column.
$value = $from->( $sv )
A tool may call this to declare that it provides a section of detail about an SV.
The type of the column. This may be
The title to display alongside the detail cell on the main SV display pane.
A function to generate the display for a given SV address. It is invoked with an SV to display, and should a value whose meaning depends on the type. If it returns unde then the row is not displayed for this SV.
$value = $render->( $sv )
Paul Evans <email@example.com>