Prima::StdBitmap
shared access to the standard toolkit bitmaps
- Provided by: libprima-perl (Version: 1.28-1.4)
- Source: prima
- Report a bug
shared access to the standard toolkit bitmaps
The toolkit contains sysimage.gif image library, which consists of a predefined set of images, used in several toolkit modules. To provide a unified access to the images this module can be used. The images are assigned a "sbmp::" constant, which is used as an index on a load request. If loaded successfully, images are cached and the successive requests return the cached values.
The images can be loaded as "Prima::Image" and "Prima::Icon" instances. To discriminate, two methods are used, correspondingly "image" and "icon".
use Prima::StdBitmap;
my $logo = Prima::StdBitmap::icon( sbmp::Logo );
An index value passed to the methods must be one of "sbmp::" constants:
sbmp::Logo
sbmp::CheckBoxChecked
sbmp::CheckBoxCheckedPressed
sbmp::CheckBoxUnchecked
sbmp::CheckBoxUncheckedPressed
sbmp::RadioChecked
sbmp::RadioCheckedPressed
sbmp::RadioUnchecked
sbmp::RadioUncheckedPressed
sbmp::Warning
sbmp::Information
sbmp::Question
sbmp::OutlineCollaps
sbmp::OutlineExpand
sbmp::Error
sbmp::SysMenu
sbmp::SysMenuPressed
sbmp::Max
sbmp::MaxPressed
sbmp::Min
sbmp::MinPressed
sbmp::Restore
sbmp::RestorePressed
sbmp::Close
sbmp::ClosePressed
sbmp::Hide
sbmp::HidePressed
sbmp::DriveUnknown
sbmp::DriveFloppy
sbmp::DriveHDD
sbmp::DriveNetwork
sbmp::DriveCDROM
sbmp::DriveMemory
sbmp::GlyphOK
sbmp::GlyphCancel
sbmp::SFolderOpened
sbmp::SFolderClosed
sbmp::Last
$sysimage scalar is initialized to the file name to be used as a source of standard image frames by default. It is possible to alter this scalar at run-time, which causes all subsequent image frame request to be redirected to the new file.
Dmitry Karasik, <dmitry@karasik.eu.org>.
Prima, Prima::Image, Prima::Const.