BCGSuite for MFC
CBCGPEditMarker

Detailed Description

The CBCGPEditMarker class is used with CBCGPEditCtrl.

It represents the data structure for markers. The library supports the following predefined marker types: bookmarks, named bookmarks and line color markers.

All markers are line-based. The edit control maintains an internal list of markers sorted by line numbers. When rows are added or deleted, the edit control automatically updates line numbers. If a marker was set at a line that is being deleted, the marker is removed as well. You can override some notification methods (see below) to prevent the markers from deletion or moving.

It's possible to associate user-defined data with each marker. Also, you can define custom marker types. To do that you just need to define a new marker type and take into account that the edit control uses bitwise operations on marker types. You have to use values greater than g_dwBCGPEdit_FirstUserDefinedMarker (0x00010000).

BCGControlBar Pro for MFC: the BCGCBPVisualStudioGUIDemo example illustrates how to use custom markers - see breakpoint implementation.

The following is the list of predefined marker types:

  • g_dwBCGPEdit_BookMark
  • g_dwBCGPEdit_NamedBookMark
  • g_dwBCGPEdit_LineColorMarker
  • g_dwBCGPEdit_MarkerReserved

The edit control implements the following marker manipulation methods:

See also
CBCGPEditCtrl, CBCGPLineColorMarker
+ Inheritance diagram for CBCGPEditMarker:

Public Member Functions

 CompareDataCalled by the edit control when it needs to compare two markers by user-defined data.
 
 CopyDataCalled to copy the user defined data.
 
 DestroyDataDestroys the user defined data.
 
 IsInRangeDetermines whether the marker is set between specified lines.
 
 SerializeDataCalled by the framework when it needs to serialize the user-defined data.
 
 UpdateMarkerForDeletedRangeAllows custom processing for markers set at more that one line.
 

Public Attributes

 m_dwMarkerTypeThe marker type.
 
 m_nLineSpecifies the zero-based line number.
 
 m_pDataPoints to the user-defined data.