#include <YImage.h>
Inheritance diagram for YImage:
Public Member Functions | |
YImage (const YWidgetOpt &opt) | |
virtual char * | widgetClass () |
Image
Displays an image - if the respective UI is capable of that. If not, it is up to the UI to decide whether or not to display the specified default text instead ( e.g. with the NCurses UI ).
The image is specified as any of:
`suseheader
the SuSE standard header image `yast2
the YaST2 logo SCR::Read( .target.byte, "image1.png" )
. This works on any configuration, even remote. SCR::
call mentioned above, but it has its limitations: It only works if the UI runs locally, i.e. has access to the local file system. This can not always be safely assumed. Use `opt( `zeroWidth ) and / or `opt( `zeroHeight ) if the real size of the image widget is determined by outside factors, e.g. by the size of neighboring widgets. With those options you can override the default "nice size" of the image widget and make it show just a part of the image. This is used for example in the YaST2 title graphics that are 2000 pixels wide even when only 640 pixels are shown normally. If more screen space is available, more of the image is shown, if not, the layout engine doesn't complain about the image widget not getting its nice size.
`opt( `tiled ) will make the image repeat endlessly in both dimensions to fill up any available space. You might want to add `opt( `zeroWidth ) or `opt( `zeroHeight ) ( or both ), too to make use of this feature.
`opt( `scaleToFit ) scales the image to fit into the available space, i.e. the image will be zoomed in or out as needed.
This option implicitly sets `opt( `zeroWidth ) and `opt( zeroHeight ), too since there is no useful default size for such an image.
Please note that setting both `opt( `tiled ) and `opt( `scaleToFit ) at once doesn't make any sense.
|
Constructor |
|
Returns a descriptive name of this widget class for logging, debugging etc. Reimplemented from YWidget. |