MFC Grid manual

CEmbeddedControlParams Class Reference

Parameters indicating how MFC control is attached to CGrid. More...

#include <Dapfor/GUI/EmbeddedControlParams.h>

List of all members.


Public Types

enum  Anchor {
  none = 0x0, left = 0x1, top = 0x2, right = 0x4,
  bottom = 0x8, all = left | top | right | bottom
}
 Indicates cell side, to which MFC control is attached. More...

Public Member Functions

 CEmbeddedControlParams ()
 Default constructor.
 CEmbeddedControlParams (const CEmbeddedControlParams &params)
 Copy constructor.
 CEmbeddedControlParams (UINT anchor, int leftOffset, int topOffset, int rightOffset, int bottomOffset, bool invalidateControl)
 Constructor.
UINT GetAnchor () const
 Determines how MFC control is attached to a cell.
int GetLeftOffset () const
 An offset at the left side of a cell.
int GetTopOffset () const
 An offset at the top side of a cell.
int GetRightOffset () const
 An offset at the right side of a cell.
int GetBottomOffset () const
 An offset at the bottom side of a cell.
bool GetInvalidateControl () const
 Indicates that CGrid can invalidate MFC control when the field of the data object is modified.
void SetAnchor (UINT anchor)
 Sets a new position of MFC control relative to a cell.
void SetLeftOffset (int offset)
 Sets a new offset from the left side of a cell.
void SetTopOffset (int offset)
 Sets a new offset from the top side of a cell.
void SetRightOffset (int offset)
 Sets a new offset from the right side of a cell.
void SetBottomOffset (int offset)
 Sets a new offset from the bottom side of a cell.
void SetInvalidateControl (bool invalidateControl)
 Enables CGrid to invalidate MFC control when the field of the data object is modified.

Detailed Description

Parameters indicating how MFC control is attached to CGrid.

Version:
2.0.0 Initial version

Member Enumeration Documentation

enum Anchor

Indicates cell side, to which MFC control is attached.

Enumerator:
none  CGrid doesn't modify a size of the control. The control is attached to the top left corner of the cell with the offset, specified in the constructor.
left  The control is attached to the left of the cell.
top  The control is attached to the top of the cell.
right  The control is attached to the right of the cell.
bottom  The control is attached to the bottom of the cell.
all  The control is attached to all sides of the cell. In this case CGrid automatically changes control size to fit to the cell bounds.


Constructor & Destructor Documentation

CEmbeddedControlParams ( const CEmbeddedControlParams params  ) 

Copy constructor.

Parameters:
[in] params Parameters to be copied.

CEmbeddedControlParams ( UINT  anchor,
int  leftOffset,
int  topOffset,
int  rightOffset,
int  bottomOffset,
bool  invalidateControl 
)

Constructor.

Parameters:
[in] anchor Indicates how an MFC control is attached to CGrid.
[in] leftOffset An offset from the left side of the cell if both CEmbeddedControlParams::left and CEmbeddedControlParams::right flags are not set. If any of these flags are set in anchor, this parameter doesn't make sense.
[in] topOffset An offset from the top side of the cell if both CEmbeddedControlParams::top and CEmbeddedControlParams::bottom flags are not set. If any of these flags are set in anchor, this parameter doesn't make sense.
[in] rightOffset An offset from the right side of the cell if both CEmbeddedControlParams::left and CEmbeddedControlParams::right flags are not set. If any of these flags are set in anchor, this parameter doesn't make sense.
[in] bottomOffset An offset from the bottom side of the cell if both CEmbeddedControlParams::top and CEmbeddedControlParams::bottom flags are not set. If any of these flags are set in anchor, this parameter doesn't make sense.
[in] invalidateControl Indicates, that CGrid can invalidate MFC control while manipulations with the cell, the control is attached to.


Member Function Documentation

UINT GetAnchor (  )  const [inline]

Determines how MFC control is attached to a cell.

Returns:
Current anchor

int GetLeftOffset (  )  const [inline]

An offset at the left side of a cell.

The parameter makes sense only if both CEmbeddedControlParams::left and CEmbeddedControlParams::right flags are not set.

Returns:
Offset in pixels from the left of a cell.

int GetTopOffset (  )  const [inline]

An offset at the top side of a cell.

The parameter makes sense only if both CEmbeddedControlParams::top and CEmbeddedControlParams::bottom flags are not set.

Returns:
Offset in pixels from the top of a cell.

int GetRightOffset (  )  const [inline]

An offset at the right side of a cell.

The parameter makes sense only if both CEmbeddedControlParams::left and CEmbeddedControlParams::right flags are not set.

Returns:
Offset in pixels from the right of a cell.

int GetBottomOffset (  )  const [inline]

An offset at the bottom side of a cell.

The parameter makes sense only if both CEmbeddedControlParams::top and CEmbeddedControlParams::bottom flags are not set.

Returns:
Offset in pixels from the bottom of a cell.

bool GetInvalidateControl (  )  const [inline]

Indicates that CGrid can invalidate MFC control when the field of the data object is modified.

Returns:
True if CGrid can invalidate MFC control while manipulations with the cell, the control is attached to.

void SetAnchor ( UINT  anchor  )  [inline]

Sets a new position of MFC control relative to a cell.

Parameters:
[in] anchor Indicates how MFC control is attached to CGrid.

void SetLeftOffset ( int  offset  )  [inline]

Sets a new offset from the left side of a cell.

Parameters:
[in] offset An offset from the left side of the cell if both CEmbeddedControlParams::left and CEmbeddedControlParams::right flags are not set. If any of these flags are set in anchor, this parameter doesn't make sense.

void SetTopOffset ( int  offset  )  [inline]

Sets a new offset from the top side of a cell.

Parameters:
[in] offset An offset from the top side of the cell if both CEmbeddedControlParams::top and CEmbeddedControlParams::bottom flags are not set. If any of these flags are set in anchor, this parameter doesn't make sense.

void SetRightOffset ( int  offset  )  [inline]

Sets a new offset from the right side of a cell.

Parameters:
[in] offset An offset from the right side of the cell if both CEmbeddedControlParams::left and CEmbeddedControlParams::right flags are not set. If any of these flags are set in anchor, this parameter doesn't make sense.

void SetBottomOffset ( int  offset  )  [inline]

Sets a new offset from the bottom side of a cell.

Parameters:
[in] offset An offset from the bottom side of the cell if both CEmbeddedControlParams::top and CEmbeddedControlParams::bottom flags are not set. If any of these flags are set in anchor, this parameter doesn't make sense.

void SetInvalidateControl ( bool  invalidateControl  )  [inline]

Enables CGrid to invalidate MFC control when the field of the data object is modified.

Parameters:
[in] invalidateControl Indicates, that CGrid can invalidate MFC control while manipulations with the cell, the control is attached to.