MFC Grid manual

CPaintContext Class Reference

Paint-related information. More...

#include <Dapfor/GUI/PaintContext.h>

List of all members.


Public Member Functions

 CPaintContext (const CGrid &grid, const CHeader *header, const CRect &clipRect, CDC &dc, const CDropPosition &dropPosition, const CRect &mouseSelection, ContextType focusedContext, int focusedRow, CImageList *imageList, bool stretchImage, CBitmap *backgroundImage, const CRect &backgroundImageRc)
 Constructor.
 CPaintContext (const CPaintContext &paintContext)
 Copy constructor.
const CGridGetGrid () const
 Gets a reference to the grid.
const CHeaderGetHeader () const
 Gets a header.
const CRect & GetClipRect () const
 Gets the clipped rectangle, extracted from CDC.
CDC & GetDC () const
 Gets device context.
const CDropPositionGetDropPosition () const
 Gets a drop position.
const CRect & GetMouseSelection () const
 Gets a mouse selection.
ContextType GetFocusedContext () const
 Gets CGrid context which holds a focus.
int GetFocusedRow () const
 Gets a focused row in focused context.
CImageList * GetImageList () const
 Gets a default image list to draw icons in cells of CGrid.
bool GetStretchImage () const
 Indicates whether icons in cells should be stretched.
CBitmap * GetBackgroundImage () const
 Gets a background image.
const CRect & GetBackgroundImageRc () const
 Gets bounds of a background image.

Detailed Description

Paint-related information.

Version:
1.0.0.0 Initial version

Constructor & Destructor Documentation

CPaintContext ( const CGrid grid,
const CHeader header,
const CRect &  clipRect,
CDC &  dc,
const CDropPosition dropPosition,
const CRect &  mouseSelection,
ContextType  focusedContext,
int  focusedRow,
CImageList *  imageList,
bool  stretchImage,
CBitmap *  backgroundImage,
const CRect &  backgroundImageRc 
)

Constructor.

Parameters:
[in] grid A reference to CGrid
[in] header Current header
[in] clipRect Clipped rectangle.
[in] dc Device context
[in] dropPosition In case of drag & drop operation indicates where a clipboard content should be dropped.
[in] mouseSelection Rectangle, selected by the mouse with a pressed left button.
[in] focusedContext Focused context in CGrid
[in] focusedRow Focused row in the focused context.
[in] imageList Image list which contains icons to paint them in cells
[in] stretchImage Indicates whether icons should be stretched to a height of cells.
[in] backgroundImage Background image
[in] backgroundImageRc Bounds of a background image.

CPaintContext ( const CPaintContext paintContext  ) 

Copy constructor.

Parameters:
[in] paintContext to be copied


Member Function Documentation

const CGrid & GetGrid (  )  const [inline]

Gets a reference to the grid.

Returns:
Const reference to CGrid

const CHeader * GetHeader (  )  const [inline]

Gets a header.

Returns:
Current header

const CRect & GetClipRect (  )  const [inline]

Gets the clipped rectangle, extracted from CDC.

Returns:
Clipped bounds

CDC & GetDC (  )  const [inline]

Gets device context.

Returns:
Device context

const CDropPosition & GetDropPosition (  )  const [inline]

Gets a drop position.

Returns:
Current drop position which depends on grid contents and a mouse position.

const CRect & GetMouseSelection (  )  const [inline]

Gets a mouse selection.

Returns:
Rectangle, selected by the mouse with a pressed left button.

ContextType GetFocusedContext (  )  const [inline]

Gets CGrid context which holds a focus.

Returns:
Grid context which holds a focus. In case when CGrid doesn't have a focus, the function returns UndefinedContext.

int GetFocusedRow (  )  const [inline]

Gets a focused row in focused context.

Returns:
Focused line in the focused context.

CImageList * GetImageList (  )  const [inline]

Gets a default image list to draw icons in cells of CGrid.

Returns:
Image list to draw icons in cells.

bool GetStretchImage (  )  const [inline]

Indicates whether icons in cells should be stretched.

Returns:
True if icons should be stretched to a cells height. Otherwise false.

CBitmap * GetBackgroundImage (  )  const [inline]

Gets a background image.

Returns:
Background image

const CRect & GetBackgroundImageRc (  )  const [inline]

Gets bounds of a background image.

Returns:
Background image bounds.