sptk2 logo
SPTK Home Page

sptk::CFrame Class Reference
[GUI Classes]

Frame information class. More...

#include <CFrame.h>

Inheritance diagram for sptk::CFrame:

sptk::CPngImage sptk::CPngImage

List of all members.

Public Types

enum  CFrameKind { FLTK_STANDARD, USER_EXTENDED, FLTK_STANDARD, USER_EXTENDED }
 An expected usage of the frame. More...
enum  CFrameKind { FLTK_STANDARD, USER_EXTENDED, FLTK_STANDARD, USER_EXTENDED }
 An expected usage of the frame. More...

Public Member Functions

 CFrame (const CBuffer &imageData, uint32_t frameWidth, uint32_t cornerZone, CPatternDrawMode drawMode=CPngImage::PDM_STRETCH, CFrameKind kind=USER_EXTENDED)
 Constructor.
void drawResized (int x, int y, int w, int h, bool drawBackground)
 Draws resized image.
uint32_t frameWidth () const
 Returns frame width, to keep widgets inside the frame w/o overlaping.
uint32_t cornerZone () const
 Returns corner zone width to draw the frame corners without changes.
CFrameKind kind () const
 Returns an expected usage of the frame.
 CFrame (const CBuffer &imageData, uint32_t frameWidth, uint32_t cornerZone, CPatternDrawMode drawMode=CPngImage::PDM_STRETCH, CFrameKind kind=USER_EXTENDED)
 Constructor.
void drawResized (int x, int y, int w, int h, bool drawBackground)
 Draws resized image.
uint32_t frameWidth () const
 Returns frame width, to keep widgets inside the frame w/o overlaping.
uint32_t cornerZone () const
 Returns corner zone width to draw the frame corners without changes.
CFrameKind kind () const
 Returns an expected usage of the frame.

Protected Attributes

uint32_t m_frameWidth
 Frame width, to keep widgets inside the frame w/o overlaping.
uint32_t m_cornerZone
 Corner zone width to draw the frame corners without changes.
CPatternDrawMode m_drawMode
 Pattern draw mode.
CFrameKind m_kind
 Frame kind (standard or user-extended).


Detailed Description

Frame information class.

Contains the frame image and frame width


Member Enumeration Documentation

An expected usage of the frame.

Enumerator:
FLTK_STANDARD  The frame should be used to draw standard FLTK frames.
USER_EXTENDED  The frame should be used to draw user frames.
FLTK_STANDARD  The frame should be used to draw standard FLTK frames.
USER_EXTENDED  The frame should be used to draw user frames.

An expected usage of the frame.

Enumerator:
FLTK_STANDARD  The frame should be used to draw standard FLTK frames.
USER_EXTENDED  The frame should be used to draw user frames.
FLTK_STANDARD  The frame should be used to draw standard FLTK frames.
USER_EXTENDED  The frame should be used to draw user frames.


Constructor & Destructor Documentation

sptk::CFrame::CFrame ( const CBuffer imageData,
uint32_t  frameWidth,
uint32_t  cornerZone,
CPatternDrawMode  drawMode = CPngImage::PDM_STRETCH,
CFrameKind  kind = USER_EXTENDED 
) [inline]

Constructor.

Parameters:
imageData const CBuffer&, an image data presented as memory buffer
frameWidth uint32_t, frame width, to keep widgets inside the frame w/o overlaping
cornerZone uint32_t, corner zone width to draw the frame corners without changes
drawMode CPatternDrawMode, pattern draw mode
kind CFrameKind, frame kind (standard or user-extended)

References kind(), m_cornerZone, m_drawMode, m_frameWidth, and m_kind.

sptk::CFrame::CFrame ( const CBuffer imageData,
uint32_t  frameWidth,
uint32_t  cornerZone,
CPatternDrawMode  drawMode = CPngImage::PDM_STRETCH,
CFrameKind  kind = USER_EXTENDED 
) [inline]

Constructor.

Parameters:
imageData const CBuffer&, an image data presented as memory buffer
frameWidth uint32_t, frame width, to keep widgets inside the frame w/o overlaping
cornerZone uint32_t, corner zone width to draw the frame corners without changes
drawMode CPatternDrawMode, pattern draw mode
kind CFrameKind, frame kind (standard or user-extended)

References kind(), m_cornerZone, m_drawMode, m_frameWidth, and m_kind.


Member Function Documentation

void sptk::CFrame::drawResized ( int  x,
int  y,
int  w,
int  h,
bool  drawBackground 
) [inline]

Draws resized image.

Parameters:
x int, the x coordinate to draw image
y int, the y coordinate to draw image
w int, the width to draw image
h int, the height to draw image
drawBackground bool, if true then the internal area of the image is used for background

References drawResized(), m_cornerZone, and m_drawMode.

void sptk::CFrame::drawResized ( int  x,
int  y,
int  w,
int  h,
bool  drawBackground 
) [inline]

Draws resized image.

Parameters:
x int, the x coordinate to draw image
y int, the y coordinate to draw image
w int, the width to draw image
h int, the height to draw image
drawBackground bool, if true then the internal area of the image is used for background

References m_cornerZone, and m_drawMode.

Referenced by drawResized().


The documentation for this class was generated from the following files:

Mon Mar 5 11:56:04 2012: SPTK 3.5.7