CAImageView Class Reference

An Image with text above and below it. More...

#include <caimageview.h>

Inheritance diagram for CAImageView:

CAWidget CAImageHueSelector CAImageSelector List of all members.

Public Types

enum  Direction {
  Vertical, Horizontal, Left, Right,
  Straight
}

Public Member Functions

 CAImageView ()
 Constructor for an empty image view.
 CAImageView (const char *upperText, const char *lowerText, CL_Surface *image, bool autoResize=true)
 Constructor for an image view with already one image.
 ~CAImageView ()
 Destructor.
virtual void setImageSize (int w, int h)
 Sets the size of the image view (without top/bottom button).
virtual void display (bool active=true)
 Displays the image view with its current image/ texts.
virtual void displayArrows (bool active=true)
 Displays the arrows for selectors (used for base classes).
virtual void displayTextButtons (bool active=true)
 Displays the buttons on top/ button with their texts.
virtual void handleKey (const CL_Key &key)
 Handles key events for this view (no action).

Protected Attributes

CAImageData image
 Image data (surface, texts).
Direction direction
 'Vertiacl' or 'Horizontal' selector (used for child classes)
int barHeight
 Height of top/ bottom bar.

Detailed Description

An Image with text above and below it.

This class is also used as basis class for image selectors.

Author:
Andrew Mustun


Constructor & Destructor Documentation

CAImageView::CAImageView ( const char *  upperText,
const char *  lowerText,
CL_Surface *  image,
bool  autoResize = true 
)

Constructor for an image view with already one image.

Parameters:
upperText Text above image
lowerText Text under image
image The image itself
autoresize Automatically resize the image preview to fit the image.


Member Function Documentation

void CAImageView::setImageSize ( int  w,
int  h 
) [virtual]

Sets the size of the image view (without top/bottom button).

Bigger images get cropped (top left part shown).

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

Reimplemented in CAImageHueSelector, and CAImageSelector.


The documentation for this class was generated from the following files:
Generated on Tue Nov 28 06:48:28 2006 by  doxygen 1.5.0