1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
/*
$Id: image.h,v 1.10 2001/12/27 23:30:08 sphair Exp $
------------------------------------------------------------------------
ClanLib, the platform independent game SDK.
This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
version 2. See COPYING for details.
For a total list of contributers see CREDITS.
See http://www.clanlib.org
------------------------------------------------------------------------
*/
//! clanGUI="Controls"
//! header=gui.h
#ifndef header_image
#define header_image
#include "component.h"
class CL_Surface;
class CL_Image_Generic;
//: Image component
class CL_Image : public CL_Component
{
//! Enums:
public:
//: Mode enums
enum Mode
{
normal,
center,
stretch,
tile
};
//! Construction:
public:
//: Image Constructor
CL_Image(
CL_Component *parent,
CL_StyleManager *style = NULL);
//: Image Constructor
CL_Image(
const CL_Rect &pos,
CL_Component *parent,
CL_StyleManager *style = NULL);
//: Image Constructor
CL_Image(
const CL_Rect &pos,
CL_Surface *surface,
CL_Component *parent,
CL_StyleManager *style = NULL);
//: Image Destructor
virtual ~CL_Image();
//! Attributes:
public:
//: Returns the surface.
CL_Surface *get_surface() const;
//: Returns the current display mode.
Mode get_mode() const;
//! Operations:
public:
//: Sets the surface.
void set_surface(CL_Surface *surface);
//: Sets the display mode.
void set_mode(Mode mode);
//! Implementation:
private:
Mode mode;
CL_Image(const CL_Image ©) : CL_Component(NULL, NULL) { return; } // disallow copy construction.
CL_Image_Generic *impl;
};
#endif
|