MFC Grid manual

CGridCell Class Reference

Cell-related paint information. More...

#include <Dapfor/GUI/GridCell.h>

List of all members.


Public Member Functions

 CGridCell (const CPaintInfo &paintInfo, const CGridLine &gridLine, const CColumn *column, CImageList *imageList, int imageId, bool stretchImage, const Common::CFormat *format)
 Constructor.
 CGridCell (const CGridCell &cell)
 Copy constructor.
const CPaintInfoGetPaintInfo () const
 Gets paint info.
CPaintInfoGetPaintInfo ()
 Gets paint info. Const version.
const CGridLineGetGridLine () const
 Gets the line that contains a cell.
const CColumnGetColumn () const
 Gets a column.
CImageList * GetImageList () const
 Gets an image list to draw images in a cell.
int GetImageId () const
 Gets an index of an image in the image list.
bool GetStretchImage () const
 Indicates whether an image is stretched to vertical size of cell.
const Common::CFormatCetTextFormat () const
 Gets text format to draw text in a cell.
void SetTextFormat (const Common::CFormat *format)
 Sets a new text format to draw the text in a cell.
CString GetFormattedMfcString () const
 Gets MFC string to show in a cell.
TString GetFormattedStlString () const
 Gets STL string to show in a cell.
Common::CValue GetValue () const
 Gets non-formatted value retrieved from a field of a corresponded data object.
void SetImageList (CImageList *imageList)
 Sets a new image list.
void SetImageId (int imageId)
 Sets a new image index.
void SetStretchImage (bool stretch)
 Sets the new value that enables image stretching.
void RequestNextPaint (int msec)
 Request a new painting routine for the given cell after the specified time.

Detailed Description

Cell-related paint information.

Version:
1.0.0.0 Initial version

Constructor & Destructor Documentation

CGridCell ( const CPaintInfo paintInfo,
const CGridLine gridLine,
const CColumn column,
CImageList *  imageList,
int  imageId,
bool  stretch,
const Common::CFormat format 
)

Constructor.

Parameters:
[in] paintInfo Contains colors, rectangles, font, text adjustement to draw a cell
[in] gridLine Contains grid line information.
[in] column Grid column
[in] imageList List of the images that are drawn in cells
[in] imageId Image index
[in] stretch Indicates that an image should be stretched to a cell height.
[in] format Text format

CGridCell ( const CGridCell cell  ) 

Copy constructor.

Parameters:
[in] cell Cell to be copied


Member Function Documentation

const CPaintInfo & GetPaintInfo (  )  const [inline]

Gets paint info.

Returns:
Paint information like colors, rectangles, font, text adjustement etc...

CPaintInfo & GetPaintInfo (  )  [inline]

Gets paint info. Const version.

Returns:
Paint information like colors, rectangles, font, text adjustement etc...

const CGridLine & GetGridLine (  )  const [inline]

Gets the line that contains a cell.

Returns:
CGrid line

const CColumn * GetColumn (  )  const [inline]

Gets a column.

Returns:
CGrid column

CImageList * GetImageList (  )  const [inline]

Gets an image list to draw images in a cell.

Returns:
Image list

int GetImageId (  )  const [inline]

Gets an index of an image in the image list.

Returns:
Image index. If the index equals to -1, CGrid won't display an image in the cell. CGrid takes a default index from the column which corresponds to the cell.

bool GetStretchImage (  )  const [inline]

Indicates whether an image is stretched to vertical size of cell.

Returns:
Value, indicating whether an image should be stretched to a cell height

CString GetFormattedMfcString (  )  const

Gets MFC string to show in a cell.

Returns:
Formatted MFC string which represents an unformatted value, passed through a format object.
Thread safety
If CGrid works in MemoryBuffer mode, then the string is taken from the local cache, and no functions of the data object are called.

TString GetFormattedStlString (  )  const

Gets STL string to show in a cell.

Returns:
Formatted STL string which represents an unformatted value, passed through a format object.
Thread safety
If CGrid works in MemoryBuffer mode, then the string is taken from the local cache, and no functions of the data object are called.

Common::CValue GetValue (  )  const

Gets non-formatted value retrieved from a field of a corresponded data object.

Returns:
Unformatted value.
Thread safety
If CGrid works in MemoryBuffer mode, then the string is taken from the local cache, and no functions of the data object are called.

void SetImageList ( CImageList *  imageList  )  [inline]

Sets a new image list.

Parameters:
[in] imageList A new image list.

void SetImageId ( int  imageId  )  [inline]

Sets a new image index.

Parameters:
[in] imageId a new image index.

void SetStretchImage ( bool  stretch  )  [inline]

Sets the new value that enables image stretching.

Parameters:
[in] stretch Value, indicating whether it should stretch an image in the cell.

void RequestNextPaint ( int  msec  ) 

Request a new painting routine for the given cell after the specified time.

Parameters:
[in] msec Period in milliseconds after which the cell will be redrawn