Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

prima::stdbitmap(3) [debian man page]

Prima::StdBitmap(3)					User Contributed Perl Documentation				       Prima::StdBitmap(3)

NAME
Prima::StdBitmap - shared access to the standard toolkit bitmaps DESCRIPTION
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". SYNOPSIS
use Prima::StdBitmap; my $logo = Prima::StdBitmap::icon( sbmp::Logo ); API
Methods icon INDEX Loads INDEXth image frame and returns "Prima::Icon" instance. image INDEX Loads INDEXth image frame and returns "Prima::Image" instance. load_std_bmp INDEX, AS_ICON, USE_CACHED_VALUE, IMAGE_FILE Loads INDEXth image frame from IMAGE_FILE and returns it as either a "Prima::Image" or as a "Prima::Icon" instance, depending on value of boolean AS_ICON flag. If USE_CACHED_VALUE boolean flag is set, the cached images loaded previously can be used. If this flag is unset, the cached value is never used, and the created image is not stored in the cache. Since the module's intended use is to provide shared and read-only access to the image library, USE_CACHED_VALUE set to 0 can be used to return non-shared images. Constants 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 Scalars $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. AUTHOR
Dmitry Karasik, <dmitry@karasik.eu.org>. SEE ALSO
Prima, Prima::Image, Prima::Const. perl v5.14.2 2009-02-24 Prima::StdBitmap(3)

Check Out this Related Man Page

Prima::ImageDialog(3)					User Contributed Perl Documentation				     Prima::ImageDialog(3)

NAME
Prima::ImageDialog - file open and save dialogs. DESCRIPTION
The module provides dialogs specially adjusted for image loading and saving. Prima::ImageOpenDialog Provides a preview feature, allowing the user to view the image file before loading, and the selection of a frame index for the multi- framed image files. Instead of "execute" call, the load method is used to invoke the dialog and returns the loaded image as a "Prima::Image" object. The loaded object by default contains "{extras}" hash variable set, which contains extra information returned by the loader. See Prima::image-load for more information. SYNOPSIS my $dlg = Prima::ImageOpenDialog-> create; my $img = $dlg-> load; return unless $img; print "$_:$img->{extras}->{$_} " for sort keys %{$img-> {extras}}; Proprties preview BOOLEAN Selects if the preview functionality is active. The user can switch it on and off interactively. Default value: 1 Methods load %PROFILE Executes the dialog, and, if successful, loads the image file and frame selected by the user. Returns the loaded image as a "Prima::Image" object. PROFILE is a hash, passed to "Prima::Image::load" method. In particular, it can be used to disable the default loading of extra information in "{extras}" variable, or to specify a non-default loading option. For example, "{extras}->{className} = 'Prima::Icon'" would return the loaded image as an icon object. See Prima::image-load for more. "load" can report progressive image loading to the caller, and/or to an instance of "Prima::ImageViewer", if desired. If either (or both) "onHeaderReady" and "onDataReady" notifications are specified, these are called from the respective event handlers of the image being loaded ( see "Loading with progress indicator" in Prima::image-load for details). If profile key "progressViewer" is supplied, its value is treated as a "Prima::ImageViewer" instance, and it is used to display image loading progress. See "watch_load_progress" in Prima::ImageViewer. Events HeaderReady IMAGE See "HeaderReady" in Prima::Image. DataReady IMAGE, X, Y, WIDTH, HEIGHT See "DataReady" in Prima::Image. Prima::ImageSaveDialog Provides a save dialog where the user can select image format, the bit depth and other format-specific options. The format-specific options can be set if a dialog for the file format is provided. The standard toolkit dialogs reside under in "Prima::Image" namespace, in Prima/Image subdirectory. For example, "Prima::Image::gif" provides the selection of transparency color, and "Prima::Image::jpeg" the image quality control. If the image passed to the image property contains "{extras}" variable, the data are read and used as the default values. In particular, "{extras}->-{codecID}" field, responsible for the file format, if present, affects the default file format selection. SYNOPSIS my $dlg = Prima::ImageSaveDialog-> create; return unless $dlg-> save( $image ); print "saved as ", $dlg-> fileName, " "; Properties image IMAGE Selects the image to be saved. This property is to be used for the standard invocation of dialog, via "execute". It is not needed when the execution and saving is invoked via save method. Methods save IMAGE, %PROFILE Invokes the dialog, and, if the execution was successful, saves the IMAGE according to the user selection and PROFILE hash. PROFILE is not used for the default options, but is passed directly to "Prima::Image::save" call, possibly overriding selection of the user. Returns 1 in case of success, 0 in case of error. If the error occurs, the user is notified before the method returns. AUTHOR
Dmitry Karasik, <dmitry@karasik.eu.org>. SEE ALSO
Prima, Prima::Window, Prima::codecs, Prima::image-load, Prima::Image, Prima::FileDialog, Prima::ImageViewer, examples/iv.pl. perl v5.14.2 2009-02-24 Prima::ImageDialog(3)
Man Page