.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" 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" '' '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 turned on, 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. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" 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 "Prima::VB::CfgMaint 3" .TH Prima::VB::CfgMaint 3 "2009-02-24" "perl v5.14.2" "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" Prima::VB::CfgMaint \- maintains visual builder widget palette configuration. .SH "DESCRIPTION" .IX Header "DESCRIPTION" The module is used by the Visual Builder and \f(CW\*(C`cfgmaint\*(C'\fR programs, to maintain the Visual Builder widget palette. The installed widgets are displayed in main panel of the Visual Builder, and can be maintained by \f(CW\*(C`cfgmaint\*(C'\fR. .SH "USAGE" .IX Header "USAGE" The Visual Builder widget palette configuration is contained in two files \- the system-wide \&\f(CW\*(C`Prima::VB::Config\*(C'\fR and the user \f(CW\*(C`~/.prima/vbconfig\*(C'\fR. The user config file take the precedence when loaded by the Visual Builder. The module can select either configuration by assigning \f(CW$systemWide\fR boolean property. .PP The widgets are grouped in pages, which are accessible by names. .PP New widgets can be added to the palette by calling \f(CW\*(C`add_module\*(C'\fR method, which accepts a perl module file as its first parameter. The module must conform to the VB-loadable format. .SH "FORMAT" .IX Header "FORMAT" This section describes format of a module with VB-loadable widgets. .PP The module must define a package with same name as the module. In the package, \f(CW\*(C`class\*(C'\fR sub must be declared, that returns an array or paired scalars, where each first item in a pair corresponds to the widget class and the second to a hash, that contains the class loading information, and must contain the following keys: .IP "class \s-1STRING\s0" 4 .IX Item "class STRING" Name of the VB-representation class, which represents the original widget class in the Visual Builder. This is usually a lightweight class, which does not contain all functionality of the original class, but is capable of visually reflecting changes to the class properties. .IP "icon \s-1PATH\s0" 4 .IX Item "icon PATH" Sets an image file, where the class icon is contained. \&\s-1PATH\s0 provides an extended syntax for indicating a frame index, if the image file is multiframed: the frame index is appended to the path name with \f(CW\*(C`:\*(C'\fR character prefix, for example: \f(CW"NewWidget::icons.gif:2"\fR. .IP "module \s-1STRING\s0" 4 .IX Item "module STRING" Sets the module name, that contains \f(CW\*(C`class\*(C'\fR. .IP "page \s-1STRING\s0" 4 .IX Item "page STRING" Sets the default palette page where the widget is to be put. The current implementation of the Visual Builder provides four pages: \f(CW\*(C`General,Additional,Sliders,Abstract\*(C'\fR. If the page is not present, new page is automatically created when the widget class is registered. .IP "RTModule \s-1STRING\s0" 4 .IX Item "RTModule STRING" Sets the module name, that contains the original class. .PP The reader is urged to explore \fIPrima::VB::examples::Widgety\fR file, which contains an example class \f(CW\*(C`Prima::SampleWidget\*(C'\fR, its VB-representation, and a property \f(CW\*(C`lineRoundStyle\*(C'\fR definition example. .SH "API" .IX Header "API" .SS "Methods" .IX Subsection "Methods" .IP "add_module \s-1FILE\s0" 4 .IX Item "add_module FILE" Reads \s-1FILE\s0 module and loads all VB-loadable widgets from it. .IP "classes" 4 .IX Item "classes" Returns string declaration of all registered classes in format of \f(CW\*(C`classes\*(C'\fR registration procedure ( see \*(L"\s-1FORMAT\s0\*(R" ). .IP "open_cfg" 4 .IX Item "open_cfg" Loads class and pages information from either a system-wide or a user configuration file. If succeeds, the information is stored in \f(CW@pages\fR and \f(CW%classes\fR variables ( the old information is lost ) and returns 1. If fails, returns 0 and string with the error explanation; \f(CW@pages\fR and \f(CW%classes\fR content is undefined. .IP "pages" 4 .IX Item "pages" Returns array of page names .IP "read_cfg" 4 .IX Item "read_cfg" Reads information from both system-wide and user configuration files, and merges the information. If succeeds, returns 1. If fails, returns 0 and string with the error explanation. .IP "reset_cfg" 4 .IX Item "reset_cfg" Erases all information about pages and classes. .IP "write_cfg" 4 .IX Item "write_cfg" Writes either the system-wide or the user configuration file. If \f(CW$backup\fR flag is set to 1, the old file renamed with \f(CW\*(C`.bak\*(C'\fR extension. If succeeds, returns 1. If fails, returns 0 and string with the error explanation. .SH "FILES" .IX Header "FILES" \&\fIPrima::VB::Config.pm\fR, \f(CW\*(C`~/.prima/vbconfig\*(C'\fR. .SH "AUTHOR" .IX Header "AUTHOR" Dmitry Karasik, . .SH "SEE ALSO" .IX Header "SEE ALSO" \&\s-1VB\s0, cfgmaint, \fIPrima::VB::examples::Widgety\fR.