GVUpdater - updates GraphicViews structure to match its subject
Contents
Description
GVUpdater is an implementation class that GraphicViews uses to keep its state and structure consistent
with its GraphicComps subject. GVUpdater ensures that subject's immediate children are identical to the
view's in number and graphics state attributes. It also ensures that the root GraphicViews and
GraphicComps themselves have the same graphics state. GVUpdater does not ensure that it will detect and
update changes made to deeper child nodes.
Name
GVUpdater - updates GraphicViews structure to match its subject
Protected Operations
voidUpdateStructure()voidUpdateState()
The Update procedure takes place in two stages. The subject's and view's structures are
reconciled first by UpdateStructure, and then the view's graphic state is changed to match the
subjects with UpdateState.
voidAddDamage(Graphic*)voidIncurDamage(Graphic*)voidUnselect(GraphicView*)virtualvoidAdd(GraphicView*)virtualvoidAppend(GraphicView*)virtualvoidInsertBefore(Iterator,GraphicView*)virtualvoidRemove(Iterator&)virtualvoidDeleteView(Iterator&)
GVUpdater is a friend of GraphicViews. These convenience operations provide an interface to the
corresponding protected GraphicViews operations.
virtualClassIdViewCategory()
Returns the view category (see classes(3U)) GVUpdater will use to instantiate views of subjects.
ViewCategory returns COMPONENT_VIEW by default.
Public Operations
GVUpdater(GraphicView*)
The constructor takes the GraphicView that it will be updating as a parameter and stores it in the
protected member _gv. Normally, GraphicViews are the only objects that will instantiate GVUpdater.
virtualvoidUpdate()
Update the GraphicView to make it consistent with its subject.
See Also
GraphicComp(3U), GraphicView(3U), classes(3U) Unidraw 19 January 1991 GVUpdater(3U)
Synopsis
#include<Unidraw/Components/gvupdater.h>
