SRGCompoundComponent Class

class SRGCompoundComponent: public SRGraphComponent

This class allows a component to manage its own local subcomponent list. This means that a list of subcomponents may now be considered as a single entity.
The compound component manages its own subcomponents in much the same way as an SRGraph user application would manage the component list in the SRGraph class.
It is responsible for the placement, sizing, and other housekeeping tasks. A two pass system is implemented that handles pre-draw sizing and final drawing processes. These tasks are performed by the  PassOneSetup,  PassOneCleanup,  PassTwoSetup and  PassTwoCleanup functions that are called to allow this housekeeping to be carried out by a derived class.

Defined in: SRGCompoundComponent.h

Class Members

virtual void  Serialize(CArchive& ar)

Serializes this component

inline virtual void  SetTopLevel(BOOL v)

Sets the top-level flag

inline virtual BOOL  GetTopLevel()

Returns the top-level flag

virtual SRGraphComponent *  GetComponent(int nComponent,UINT Type,int *pCurrentComponent=0)

Returns a nested component

inline virtual CObList *  GetComponentList()

Returns a pointer to the local subcomponent list

virtual void  SetParent(SRGraph *pG)

Sets the parent of this and all subcomponent objects

virtual POSITION  AddComponent(SRGraphComponent * pC)

Adds a component to the local list

inline virtual BOOL  GetDrawLocalForeground()

Returns the draw local foreground flag

inline virtual BOOL  GetForegroundOrder()

Returns the foreground drawing order flag

inline virtual void  SetDrawLocalForeground(BOOL b)

Sets the draw local foreground flag

inline virtual void  SetForegroundOrder(BOOL b)

Sets the foreground drawing order flag

virtual void  Draw(CDC *pDC,CWnd *pCWnd)

Draws this compound component

inline virtual void  SetDrawPanel(BOOL b=TRUE)

Sets the draw panel flag

inline virtual BOOL  GetDrawPanel()

Returns the draw panel flag

inline virtual BOOL  GetAutoPanel()

Returns the automatic panel sizing flag

inline virtual void  SetTwoPass(BOOL b=TRUE)

Sets the two pass processing flag

inline virtual BOOL  GetTwoPass()

Returns the two pass processing flag

 SRGCompoundComponent()

Constructor

virtual  ~SRGCompoundComponent()

Destructor

virtual void  DrawDeferred()

Draws subcomponents that have been deferred

virtual void  PassOneSetup()

Pass one setup -- override to perform sensible tasks

virtual void  PassTwoSetup()

Pass one setup -- override to perform sensible tasks

virtual void  PassOneCleanup()

Pass one cleanup -- override to perform sensible tasks

virtual void  PassTwoCleanup()

Pass two cleanup -- override to perform sensible tasks

virtual void  CalcAutoPanel()

Custom panel sizing -- override to perform sensible tasks

virtual void  DrawLocalForeground()

Draw local foreground graphics -- override to perform sensible tasks

virtual void  DrawForeground()

Draws all items in the subcomponent list

CObList  m_ComponentList

The subcomponent list

BOOL  m_bTopLevel

Top level or master component flag

BOOL  m_bTwoPass

Two pass processing flag

BOOL  m_bDrawLocalForeground

Draw local foreground flag

BOOL  m_bForegroundOrder

Foreground drawing order flag

BOOL  m_bAutoPanel

Automatic panel resizing flag

BOOL  m_bDrawPanel

Panel drawing flag

CRect  m_DisplayRect

Data display rectangle