.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Devel::MAT::UI 3pm" .TH Devel::MAT::UI 3pm "2023-03-26" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" "Devel::MAT::UI" \- extend the user interface of a "Devel::MAT" explorer .SH "DESCRIPTION" .IX Header "DESCRIPTION" 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 \fI.pm\fR 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 \&\f(CW\*(C`use Devel::MAT::UI\*(C'\fR. .SH "METHODS" .IX Header "METHODS" .SS "register_icon" .IX Subsection "register_icon" .Vb 1 \& Devel::MAT::UI\->register_icon( name => $name, ... ) .Ve .PP A tool may call this to register a named icon image with the \s-1UI,\s0 for later use in an \s-1SV\s0 list column or \s-1SV\s0 detail. The name of the icon is taken from the \&\f(CW\*(C`name\*(C'\fR key, and the specific \s-1UI\s0 implementation will use one of the other keys to provide the value for its type. .PP This icon is used by \s-1SV\s0 list columns or \s-1SV\s0 details where the \f(CW\*(C`type\*(C'\fR is \&\f(CW\*(C`icon\*(C'\fR. The value set gives the name the icon was registered with. .IP "svg => \s-1PATH\s0 (\s-1GTK\s0)" 4 .IX Item "svg => PATH (GTK)" Gives a path name to an \fI\s-1SVG\s0\fR file containing image data. This path is relative to the share directory of the package, managed by File::ShareDir. .SS "provides_radiobutton_set" .IX Subsection "provides_radiobutton_set" .Vb 1 \& Devel::MAT::UI\->provides_radiobutton_set( @buttons ) .Ve .PP 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 \s-1HASH\s0 reference in the \f(CW@buttons\fR list containing the following keys: .IP "text => \s-1STRING\s0" 4 .IX Item "text => STRING" The text to display on the button .IP "icon => \s-1STRING\s0" 4 .IX Item "icon => STRING" The name of the previously-registered icon to display with the button .IP "tooltip => \s-1STRING\s0" 4 .IX Item "tooltip => STRING" Descriptive text to associate with the button to further explain it .IP "code => \s-1CODE\s0" 4 .IX Item "code => CODE" A code reference to invoke when the button is activated. .PP The buttons will be displayed in a group of their own, such that selecting one will deactivate all the others in the same set. .SS "provides_svlist_column" .IX Subsection "provides_svlist_column" .Vb 1 \& $column = Devel::MAT::UI\->provides_svlist_column( type => ..., title => ... ) .Ve .PP A tool may call this to declare that it wishes to provide a new column to display in the main \s-1SV\s0 list on the user interface. It returns an opaque column value that should be passed to \f(CW\*(C`set_svlist_column_values\*(C'\fR to provide data for the column. .IP "type => \s-1STRING\s0" 4 .IX Item "type => STRING" The type of the column. This may be \f(CW\*(C`int\*(C'\fR, \f(CW\*(C`text\*(C'\fR or \f(CW\*(C`icon\*(C'\fR. .IP "title => \s-1STRING\s0" 4 .IX Item "title => STRING" The title to display in the column header. .SS "\s-1COLUMN_TYPE\s0" .IX Subsection "COLUMN_TYPE" .SS "\s-1COLUMN_ADDR\s0" .IX Subsection "COLUMN_ADDR" .SS "\s-1COLUMN_DESC\s0" .IX Subsection "COLUMN_DESC" .SS "\s-1COLUMN_SIZE\s0" .IX Subsection "COLUMN_SIZE" .SS "\s-1COLUMN_BLESSED\s0" .IX Subsection "COLUMN_BLESSED" .SS "\s-1COLUMN_OUTREFS\s0" .IX Subsection "COLUMN_OUTREFS" .SS "\s-1COLUMN_INREFS\s0" .IX Subsection "COLUMN_INREFS" Opaque column values to represent the predefined \s-1SV\s0 list columns. .SS "set_svlist_column_values" .IX Subsection "set_svlist_column_values" .Vb 1 \& Devel::MAT::UI\->set_svlist_column_values( column => $column, from => $from ) .Ve .PP A tool may call this to provide the values to display in the \s-1SV\s0 list column it earlier created by calling \f(CW\*(C`provides_svlist_column\*(C'\fR, or to replace the values in any of the predefined columns. .IP "column => \s-1SCALAR\s0" 4 .IX Item "column => SCALAR" The value returned from \f(CW\*(C`provides_svlist_column\*(C'\fR. .IP "from => \s-1CODE\s0" 4 .IX Item "from => CODE" A function to generate the value to store for each \s-1SV.\s0 Is invoked with each \s-1SV\s0 in the \s-1SV\s0 list, and should return the value to set in the column. .Sp .Vb 1 \& $value = $from\->( $sv ) .Ve .SS "provides_sv_detail" .IX Subsection "provides_sv_detail" .Vb 1 \& Devel::MAT::UI\->provides_sv_detail( type => $type, title => $title, render => $render ) .Ve .PP A tool may call this to declare that it provides a section of detail about an \&\s-1SV.\s0 .IP "type => \s-1STRING\s0" 4 .IX Item "type => STRING" The type of the column. This may be \f(CW\*(C`widget\*(C'\fR, \f(CW\*(C`text\*(C'\fR or \f(CW\*(C`icon\*(C'\fR. .IP "title => \s-1STRING\s0" 4 .IX Item "title => STRING" The title to display alongside the detail cell on the main \s-1SV\s0 display pane. .IP "render => \s-1CODE\s0" 4 .IX Item "render => CODE" A function to generate the display for a given \s-1SV\s0 address. It is invoked with an \s-1SV\s0 to display, and should a value whose meaning depends on the type. If it returns undef then the row is not displayed for this \s-1SV.\s0 .Sp .Vb 1 \& $value = $render\->( $sv ) .Ve .PP If the type is \f(CW\*(C`widget\*(C'\fR, any of the following \f(CW\*(C`make_*\*(C'\fR methods can be used by the render function to generate a widget to display. .SS "make_widget_text" .IX Subsection "make_widget_text" .Vb 1 \& $widget = Devel::MAT::UI\->make_widget_text( $text ) .Ve .PP Constructs a widget displaying a fixed text string. .SS "make_widget_text_icon" .IX Subsection "make_widget_text_icon" .Vb 1 \& $widget = Devel::MAT::UI\->make_widget_text_icon( $text, $icon ) .Ve .PP Constructs a widget displaying a fixed text string next to an icon. .SS "make_table" .IX Subsection "make_table" .Vb 1 \& $widget = Devel::MAT::UI\->make_table( $label => $widget, $label => $widget, ... ) .Ve .PP Constructs a widget displaying a labeled table of other widgets. .SS "current_sv" .IX Subsection "current_sv" .Vb 1 \& $sv = Devel::MAT::UI\->current_sv .Ve .PP If the \s-1UI\s0 has a concept of the \*(L"current\*(R" \s-1SV\s0 that the user is viewing, this method returns it. This may be used by tools to pick a default \s-1SV\s0 on which to operate, in case one was not supplied on the commandline. .SH "AUTHOR" .IX Header "AUTHOR" Paul Evans