#include <caimageselector.h>
Inheritance diagram for CAImageSelector:

Public Member Functions | |
| CAImageSelector (Direction vertical=Horizontal) | |
| Constructor for an empty image selector. | |
| ~CAImageSelector () | |
| Destructor. | |
| void | setImageSize (int w, int h) |
| Sets the size of the image selector (without top/bottom button). | |
| void | addImage (const char *upperText, const char *lowerText, CL_Surface *image, bool autoResize=true) |
| Add image to this selector. | |
| void | setCurrentImage (int index) |
| int | getSelectedImage () |
| virtual void | display (bool active=true) |
| Displays the image view with its current image/ texts. | |
| virtual void | handleKey (const CL_Key &key) |
| Handles key events for this view / selector. | |
This widget is an interactive selector. Arrows are displayed at the top/ bottom or right/ left of it to show the selecting direction.
| CAImageSelector::CAImageSelector | ( | Direction | direction = Horizontal |
) |
Constructor for an empty image selector.
| direction | Vertical selector? (Use Up/Down arrows to control) |
| void CAImageSelector::setImageSize | ( | int | w, | |
| int | h | |||
| ) | [virtual] |
Sets the size of the image selector (without top/bottom button).
Bigger images get cropped (top left part shown). This method overwrites the method from CAImageView to add space for the selector arrows.
| w | Width of image view | |
| h | Height of image view |
Reimplemented from CAImageView.
| void CAImageSelector::addImage | ( | const char * | upperText, | |
| const char * | lowerText, | |||
| CL_Surface * | image, | |||
| bool | autoResize = true | |||
| ) |
Add image to this selector.
| upperText | Text shown above image | |
| lowerText | Text shown under image | |
| image | Pointer to surface to be shown | |
| autoResize | Automatic fit size of the widget to image size |
1.5.0