A bvector of EditElementHandle entries to be used for operating on groups of elements. More...
#include <ElementAgenda.h>
Public Member Functions | |
ElementAgenda () | |
Construct a new, empty, ElementAgenda. More... | |
virtual | ~ElementAgenda () |
void | Draw (ViewportP viewport, DgnDrawMode drawMode, DrawPurpose drawPurpose, IRedrawOperationP redrawOp, ClipVectorCP clip, IRedrawAbortP abort) |
Draw all of the entries in this ElementAgenda in a single Viewport. More... | |
void | DrawInAllViews (DgnDrawMode drawMode, DrawPurpose drawPurpose, IRedrawOperationP redrawOp, ClipVectorCP clip, IRedrawAbortP abort) |
Draw all of the entries in this ElementAgenda in all visible Viewports. More... | |
void | Clear () |
Empty this ElementAgenda. More... | |
void | SetCapacity (int nEntries) |
Set the capacity for this ElementAgenda. More... | |
ModifyElementSource | GetSource () const |
Get the source for this ElementAgenda, if applicable. More... | |
void | SetSource (ModifyElementSource val) |
Set the source for this ElementAgenda. More... | |
EditElementHandleCP | Find (ElementRefP elRef, DgnModelRefP modelRef, size_t startIndex=0, size_t endIndex=-1) const |
Attempt to find an ElementRefP/DgnModelRef pair in this ElementAgenda. More... | |
EditElementHandleP | Insert (EditElementHandleR eeh, bool atHead=false) |
Insert an element into this ElementAgenda. More... | |
EditElementHandleP | Insert (ElementRefP elRef, DgnModelRefP modelRef, bool atHead=false) |
Insert an ElementRefP/DgnModelRef pair into this ElementAgenda. More... | |
EditElementHandleP | InsertPath (DisplayPathCP path, bool doGroups, bool allowLocked) |
Insert an ElementRefP/ModelRef pair from a DisplayPath into this ElementAgenda. More... | |
EditElementHandleP | InsertPath (DisplayPathCP path, bool doGroups, bool groupLockState, bool allowLocked) |
Insert an ElementRefP/ModelRef pair from a DisplayPath into this ElementAgenda. More... | |
void | Insert (ElemModelPairSet &pairSet) |
Add an ElemModelPairSet to this agenda. More... | |
StatusInt | ModifyAgenda (IModifyElementP modifyOp, bool redraw) |
Perform a modification operation on all of the entries in this ElementAgenda. More... | |
StatusInt | BuildFromElementSet (IElementSetP elementSet, ModifyElementSource source) |
Populate this ElementAgenda from a set of elements. More... | |
StatusInt | BuildFromFence (DgnModelRefP fenceModel, DgnModelRefListP modelRefs, bool overlap, bool modifyOrig, bool allowLocked, bool callAsynchs) |
Populate this ElementAgenda from a Fence. More... | |
void | BuildFromViewport (ViewportR viewPort) |
Populate this ElementAgenda from the elements visible in a Viewport. More... | |
void | Hilite () |
Mark all entries in this agenda as being hilited and then redraw the agenda so that fact is visible to the user. More... | |
void | ClearHilite () |
If entries in agenda are drawn in hilite by a previous call to Hilite, they are unhilited. More... | |
![]() | |
void * | operator new (size_t size) |
void | operator delete (void *rawMemory, size_t size) |
UInt32 | AddRef () const |
UInt32 | Release () const |
RefCounted () | |
RefCounted (RefCounted const &rhs) | |
RefCounted & | operator= (RefCounted const &rhs) |
UInt32 | GetRefCount () const |
Static Public Member Functions | |
static void | AddListener (IElementAgendaEvents *agendaListener) |
Add an IElementAgendaEvents listener to the ElementAgenda manager. More... | |
static void | DropListener (IElementAgendaEvents *agendaListener) |
Drop an IElementAgendaEvents listener from the ElementAgenda manager. More... | |
Additional Inherited Members | |
![]() | |
virtual | ~RefCounted () |
A bvector of EditElementHandle entries to be used for operating on groups of elements.
Typically, ElementAgendas are created by MicroStation from sources that work on multiple elements such as the SelectionSet and Fences. However, as a general- purpose bvector of EditElemHandles, ElementAgendas can be created by applications for other purposes as well. ElementAgendas are themselves reference counted.
ElementAgenda is a bvector of EditElementHandle. For example:
ElementAgenda | ( | ) |
Construct a new, empty, ElementAgenda.
|
virtual |
|
static |
Add an IElementAgendaEvents listener to the ElementAgenda manager.
[in] | agendaListener | The listener to add. After this call, agendaListener will be notified by MstnElementSetTools when they modify their ElementAgendas. |
StatusInt BuildFromElementSet | ( | IElementSetP | elementSet, |
ModifyElementSource | source | ||
) |
Populate this ElementAgenda from a set of elements.
The current contents of this agenda are cleared before it is loaded from the set.
[in] | elementSet | The collection of elements that are to be held by this agenda after this call. |
[in] | source | The value to be returned by GetSource after this call. |
elementSet
. StatusInt BuildFromFence | ( | DgnModelRefP | fenceModel, |
DgnModelRefListP | modelRefs, | ||
bool | overlap, | ||
bool | modifyOrig, | ||
bool | allowLocked, | ||
bool | callAsynchs | ||
) |
Populate this ElementAgenda from a Fence.
The current contents of this agenda are cleared before the agenda is loaded from the fence.
[in] | fenceModel | The modelRef to use for the active fence. |
[in] | modelRefs | A list of Reference DgnModelRefs that are to be considered eligible for the agenda. Must not be NULL. |
[in] | overlap | If true, any element that is even partially within the fence is added to the agenda. Otherwise the entire element must be contained by the fence to be eligible. |
[in] | modifyOrig | If true only allow modifiable entries that satisfy the fence criteria. |
[in] | allowLocked | If true, allow elements that have their locked flag on, even if modifyOrig is true. |
[in] | callAsynchs | If true, also call MDL "FenceAccept" asynchs to determine eligibility. |
void BuildFromViewport | ( | ViewportR | viewPort | ) |
Populate this ElementAgenda from the elements visible in a Viewport.
[in] | viewPort | all elements visible in this viewPort are considered eligible for the agenda. |
void Clear | ( | ) |
Empty this ElementAgenda.
Does not free memory associated with the agenda. First calls ClearHilite.
void ClearHilite | ( | ) |
If entries in agenda are drawn in hilite by a previous call to Hilite, they are unhilited.
void Draw | ( | ViewportP | viewport, |
DgnDrawMode | drawMode, | ||
DrawPurpose | drawPurpose, | ||
IRedrawOperationP | redrawOp, | ||
ClipVectorCP | clip, | ||
IRedrawAbortP | abort | ||
) |
Draw all of the entries in this ElementAgenda in a single Viewport.
Technically, this is a "redraw" operation.
[in] | viewport | The viewport in which to draw the agenda |
[in] | drawMode | The drawmode for the draw. Generally only DRAW_MODE_Normal is useful. |
[in] | drawPurpose | The purpose argument to be passed to all ElementHandler to describe why this draw operation is taking place. Be as specific as possible, but if no values seem correct, use DrawPurpose::NotSpecified |
[in] | redrawOp | This object is notified at various times during the redraw operation. Can be NULL. |
[in] | clip | A ClipDescr that clips the elements within the viewport. Can be NULL. |
[in] | abort | An object that is called periodically during the redraw operation to determine whether the operation is taking too long and should be aborted. |
void DrawInAllViews | ( | DgnDrawMode | drawMode, |
DrawPurpose | drawPurpose, | ||
IRedrawOperationP | redrawOp, | ||
ClipVectorCP | clip, | ||
IRedrawAbortP | abort | ||
) |
Draw all of the entries in this ElementAgenda in all visible Viewports.
Technically, this is a "redraw" operation.
[in] | drawMode | The drawmode for the draw. Generally only DRAW_MODE_Normal is useful. |
[in] | drawPurpose | The purpose argument to be passed to all ElementHandler to describe why this draw operation is taking place. Be as specific as possible, but if no values seem correct, use DrawPurpose::NotSpecified |
[in] | redrawOp | This object is notified at various times during the redraw operation. Can be NULL. |
[in] | clip | A ClipDescr that clips the elements within the viewport. Can be NULL. |
[in] | abort | An object that is called periodically during the redraw operation to determine whether the operation is taking too long and should be aborted. |
|
static |
Drop an IElementAgendaEvents listener from the ElementAgenda manager.
EditElementHandleCP Find | ( | ElementRefP | elRef, |
DgnModelRefP | modelRef, | ||
size_t | startIndex = 0 , |
||
size_t | endIndex = -1 |
||
) | const |
Attempt to find an ElementRefP/DgnModelRef pair in this ElementAgenda.
[in] | elRef | The ElementRefP part of the pair. |
[in] | modelRef | The DgnModelRef part of the pair. |
[in] | startIndex | The index of the first entry to be considered for the Find operation. |
[in] | endIndex | The index of the last entry to be considered for the Find operation. |
ModifyElementSource GetSource | ( | ) | const |
Get the source for this ElementAgenda, if applicable.
The "source" is merely an indication of what the collection of elements in this agenda means. Also, if the source is ModifyElementSource::SelectionSet, MicroStation internally attempts to keep the Selection Set current with changes to the agenda.
void Hilite | ( | ) |
Mark all entries in this agenda as being hilited and then redraw the agenda so that fact is visible to the user.
The agenda itself also holds a flag indicating whether its entries are all in the hilite state so that calls to ClearHilite can reverse that.
EditElementHandleP Insert | ( | EditElementHandleR | eeh, |
bool | atHead = false |
||
) |
Insert an element into this ElementAgenda.
[in] | eeh | The EditElementHandle that is to be inserted into this agenda; if it has a descriptor, it will be extracted and used; otherwise an element ref will be used. If neither are present, nothing is added. |
[in] | atHead | If true, put this in at the head (front) of the agenda, otherwise put it at the end. Passing false is more efficient. |
elDscr
. EditElementHandleP Insert | ( | ElementRefP | elRef, |
DgnModelRefP | modelRef, | ||
bool | atHead = false |
||
) |
Insert an ElementRefP/DgnModelRef pair into this ElementAgenda.
[in] | elRef | The ElementRefP part of the pair. |
[in] | modelRef | The DgnModelRef part of the pair. |
[in] | atHead | If true, put this in at the head (front) of the agenda, otherwise put it at the end. Passing false is more efficient. |
void Insert | ( | ElemModelPairSet & | pairSet | ) |
Add an ElemModelPairSet to this agenda.
This call guarantees uniqueness of the entries in the ElementAgenda (presuming the existing entries are unique before this call.)
[in,out] | pairSet | On input, the set of unique ElementRefP/DgnModelRef entries to add to this ElementAgenda. On output, the set of entries actually added to this agenda. |
pairSet
by removing entries that are already in this agenda. pairSet
so that the resultant ElementAgenda is also a unique set. For example, if you were to call this method twice with the same pairSet, the second call would do nothing. EditElementHandleP InsertPath | ( | DisplayPathCP | path, |
bool | doGroups, | ||
bool | allowLocked | ||
) |
Insert an ElementRefP/ModelRef pair from a DisplayPath into this ElementAgenda.
Optionally, add all of the other members of graphic groups or named groups containing the element.
[in] | path | The path to insert into this ElementAgenda. The ElementRefP is taken from the HeadElem and the DgnModelRef is taken from the PathRoot. |
[in] | doGroups | If true add all other members of graphic or named groups containing the element. |
[in] | allowLocked | If doGroups is true, allow members of groups that are locked to be inserted into the ElementAgenda. Generally ElementAgendas are used for performing modification and locked elements are ineligible. |
doGroups
is true and more than one element is added to this agenda, the return is the entry for the original element from path
. EditElementHandleP InsertPath | ( | DisplayPathCP | path, |
bool | doGroups, | ||
bool | groupLockState, | ||
bool | allowLocked | ||
) |
Insert an ElementRefP/ModelRef pair from a DisplayPath into this ElementAgenda.
Optionally, add all of the other members of graphic groups or named groups containing the element.
[in] | path | The path to insert into this ElementAgenda. The ElementRefP is taken from the HeadElem and the DgnModelRef is taken from the PathRoot. |
[in] | doGroups | If true add all other members of graphic or named groups containing the element. |
[in] | groupLockState | Interpret group traversal rules according to this state of group lock. See NamedGroup class. |
[in] | allowLocked | If doGroups is true, allow members of groups that are locked to be inserted into the ElementAgenda. Generally ElementAgendas are used for performing modification and locked elements are ineligible. |
doGroups
is true and more than one element is added to this agenda, the return is the entry for the original element from path
. StatusInt ModifyAgenda | ( | IModifyElementP | modifyOp, |
bool | redraw | ||
) |
Perform a modification operation on all of the entries in this ElementAgenda.
[in] | modifyOp | The operation to be performed on the agenda. The implementation determine what happens to the elements in the ElementAgenda. Must not be NULL. |
[in] | redraw | If true, redraw the result of the operation immediately. Otherwise it will appear at the end of the transaction. If the operation has a visible effect it is best to pass true for this so the user is presented with feedback when processing large groups. The tradeoff is that redrawing immediately can make the total time to complete the operation longer. |
modifyOp
was called. modifyOp
changes the elements as they are processed, this ElementAgenda can, and most likely will, be different after the call. For example, if modifyOp
deletes elements, they are removed from the agenda. void SetCapacity | ( | int | nEntries | ) |
Set the capacity for this ElementAgenda.
If you expect to add a large number of entries to the agenda, and if you know how many there will be, then calling this method first can improve performance.
[in] | nEntries | Set the array hold at least this number of entries. |
void SetSource | ( | ModifyElementSource | val | ) |
Set the source for this ElementAgenda.