Prima::...CfgMaint(3)
okay so this is the Prima::...CfgMaint(3) page from the User Contributed Perl Documentation, and itβs giving full main-character energy for Prima::VB::CfgMaint. π
β¨ NAME β¨
Prima::VB::CfgMaint β configures the widget palette in the Visual Builder. Thatβs the whole assignment, no cap π
πΈ DESCRIPTION πΈ
This module is used by the Visual Builder and the prima-cfgmaint programs to configure the Visual Builder widget palette. The installed widgets show up in the main panel of the Visual Builder, and you can maintain them with the prima-cfgmaint program. Iconic little ecosystem, honestly π¦
π§ USAGE π§
The widget palette config lives in two files, bestie: the system-wide Prima::VB::Config and the user ~/.prima/vbconfig. When the Visual Builder loads them, the user config file takes precedence. The module can select either configuration by assigning the $systemWide boolean property. Choose your fighter π
Widgets are grouped into pages, and you can reach those pages by their names.
New widgets can be added to the palette by calling the add_module method, which accepts a perl module file as its first parameter. That module has to conform to the VB-loadable format β no rogue modules allowed, okay? π
π FORMAT π
This section describes the format of a module with VB-loadable widgets.
The module must define a package with the same name as the module. In that package, the class sub must be declared. It returns an array or paired scalars, where each first item in the pair corresponds to the widget class and the second to the hash which contains the class loading information, and that hash must contain the following keys:
classSTRING β Name of the package which represents the original widget class in the Visual Builder. This is usually a lightweight package that does not contain all the functionality of the original class but is capable of visually reflecting changes to the most useful class properties. Lowkey a vibe-forward little stand-in β¨iconPATH β Sets the image file with the class icon.PATHprovides an extended syntax for indicating a frame index if the image file is multiframed: the frame index is appended to the path name with the":"character prefix, for exampleNewWidget::icons.gif:2. Frame two said hi πmoduleSTRING β Sets the module name that containsclass.pageSTRING β Sets the default palette page where the widget is to be stored. The current implementation of the Visual Builder provides four pages:General,Additional,Sliders,Abstract. If the page is not present, a new page is automatically created when the widget class is registered there. Automatic page creation is so slay πRTModuleSTRING β Sets the module name that contains the original widget class.
The reader is urged to explore Prima::VB::examples::Widgety file, which contains an example class Prima::SampleWidget, its VB-representation, and an example property lineRoundStyle. Go peek, bestie β itβs literally the example buffet π«Ά
π οΈ API π οΈ
Methods
add_moduleFILE β Reads theFILEmodule and loads all VB-loadable widgets from it.classesβ Returns declaration of all registered classes as a string (seeFORMAT).open_cfgβ Loads class and pages information from either the system-wide or the user configuration file. If it succeeds, the information is stored in the@pagesand%classesvariables (the old information is lost) and returns1. If it fails, returns0and a string with the error explanation;@pagesand%classescontent is undefined. That last bit is real, bestie β donβt pretend you didnβt see it πpagesβ Returns an array of page names.read_cfgβ Reads information from both the system-wide and user configuration files and merges the information. If it succeeds, returns1. If it fails, returns0and a string with the error explanation.reset_cfgβ Erases all information about pages and classes.write_cfgβ Writes either the system-wide or the user configuration file. If the$backupflag is set to1, the old file is renamed to a".bak"file. If it succeeds, returns1. If it fails, returns0and a string with the error explanation.
π FILES π
Prima::VB::Config.pm"~/.prima/vbconfig"
π AUTHOR π
Dmitry Karasik, <dmitry@karasik.eu.org>. Legend behavior π
π SEE ALSO π
VB, prima-cfgmaint, Prima::VB::examples::Widgety.
π thatβs the whole page, bestie. Itβs from perl v5.42.0, dated 2024-08-20 β mwah, go configure that palette and slay β¨π¦
π¦ where this page comes from
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms