Main Page | Class Hierarchy | Class List | File List | Class Members

CAImageSelector Class Reference

Images with text above and below them. More...

#include <caimageselector.h>

Inheritance diagram for CAImageSelector:

CAImageView CAWidget List of all members.

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.

Detailed Description

Images with text above and below them.

This widget is an interactive selector. Arrows are displayed at the top/ bottom or right/ left of it to show the selecting direction.

Author:
Andrew Mustun


Constructor & Destructor Documentation

CAImageSelector::CAImageSelector Direction  direction = Horizontal  ) 
 

Constructor for an empty image selector.

Parameters:
direction Vertical selector? (Use Up/Down arrows to control)


Member Function Documentation

void CAImageSelector::addImage const char *  upperText,
const char *  lowerText,
CL_Surface *  image,
bool  autoResize = true
 

Add image to this selector.

Parameters:
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

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.

Parameters:
w Width of image view
h Height of image view

Reimplemented from CAImageView.


The documentation for this class was generated from the following files:
Generated on Tue Sep 13 01:58:19 2005 by  doxygen 1.4.4