Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::Container Class Reference

A Container is a Component that is implemented when a Control wants to be able to contain other child controls within itself. More...

#include <vcf/ApplicationKit/Container.h>

Inheritance diagram for VCF::Container:

VCF::Component VCF::ObjectWithEvents VCF::Object VCF::AbstractContainer VCF::StandardContainer VCF::ColumnLayoutContainer VCF::DesignTimeContainer VCF::HorizontalLayoutContainer List of all members.

Public Member Functions

 Container ()
 Container (Component *owner)
virtual ~Container ()
virtual void add (Control *child)=0
 adds a child control to this container
virtual void add (Control *child, const AlignmentType &alignment)=0
 adds a child control using the specified AlignmentType.
virtual void insertBeforeControl (Control *child, const AlignmentType &alignment, Control *beforeControl)=0
 inserts a child control into this container before the control specified in beforeControl.
virtual void insertAtIndex (Control *child, const AlignmentType &alignment, const uint32 &index)=0
 inserts a child control into this container after the specified index.
virtual void sendControlToFront (Control *child)=0
 Sends the specified child to the first position in containers list.
virtual void sendControlToBack (Control *child)=0
 Sends the specified child to the last position in containers list.
virtual void remove (Control *child)=0
 removes the child control from the container - does NOT delete the control
virtual void clear ()=0
 removes all child controls
virtual Enumerator< Control * > * getChildren ()=0
 returns an Enumerator of controls that represents all the children in this container.
virtual void paintChildren (GraphicsContext *context)=0
 Paints all children of this container.
virtual uint32 getChildCount ()=0
 returns the numer of child controls that this container has.
virtual ControlfindControl (const String &controlName)=0
 searches through all the child controls of this container.
virtual void resizeChildren (Control *control)=0
 resizes all the children, according to their alignment types and anchor values.
virtual ControlgetControlAtIndex (const uint32 &index)=0
virtual int32 getControlIndex (Control *control)=0
virtual void updateTabOrder (Control *child, uint32 &newTabOrder)=0
virtual void getTabList (std::vector< Control * > &tabList)=0
virtual void setContainerControl (Control *control)=0
 Sets the control that this container is attached to and responds to events from.
virtual ControlgetContainerControl ()=0

Detailed Description

A Container is a Component that is implemented when a Control wants to be able to contain other child controls within itself.

A container can have child controls added or removed, and supports searching all of it's child controls by name. In addition a container has methods for enumerating all of it's children and a method for explicitly resizing all of the children


Constructor & Destructor Documentation

VCF::Container::Container  )  [inline]
 

VCF::Container::Container Component owner  )  [inline]
 

virtual VCF::Container::~Container  )  [inline, virtual]
 


Member Function Documentation

virtual void VCF::Container::add Control child,
const AlignmentType alignment
[pure virtual]
 

adds a child control using the specified AlignmentType.

The child's alignment also will get set to this value.

Parameters:
Control* the control to add
AlignmentType the alignment type to add the child with
Value Meaning
ALIGN_NONE The default value for a control's alignment. The control's top, left, width, and height are what determine it's position, regardless of surrounding controls.
ALIGN_TOP The control moves to the top of the parent container and resizes to fill in the width of the parent control. The height of the control is not altered during parent dimension changes.
ALIGN_BOTTOM The control moves to the bottom of the parent container and resizes to fill in the width of the parent control. The height of the control is not altered during parent dimension changes.
ALIGN_LEFT The control moves to the left side of the parent container and resizes to fill in the height of the parent control. The width of the control is not altered during parent dimension changes.
ALIGN_RIGHT The control moves to the right side of the parent container and resizes to fill in the height of the parent control. The width of the control is not altered during parent dimension changes.
ALIGN_CLIENT The control resizes to fill in the remaining client area of a form (after all other alignment positions of other controls are calculated).

Implemented in VCF::AbstractContainer.

virtual void VCF::Container::add Control child  )  [pure virtual]
 

adds a child control to this container

Parameters:
Control the child control to add Note: the child is added with the alignment type that is already set on the child.

Implemented in VCF::AbstractContainer.

virtual void VCF::Container::clear  )  [pure virtual]
 

removes all child controls

Implemented in VCF::AbstractContainer.

virtual Control* VCF::Container::findControl const String controlName  )  [pure virtual]
 

searches through all the child controls of this container.

The first child control whose name matches the name passed in is returned as a result of the search. If the container ahs no children, or none of the child controls have a name that matches then NULL is returned.

Parameters:
String the name of the child control to find
Returns:
Control the result of the search, NULL if nothing nothing was found, otherwise a valid pointer to a child control of this container.

Implemented in VCF::AbstractContainer.

virtual uint32 VCF::Container::getChildCount  )  [pure virtual]
 

returns the numer of child controls that this container has.

Implemented in VCF::AbstractContainer.

virtual Enumerator<Control*>* VCF::Container::getChildren  )  [pure virtual]
 

returns an Enumerator of controls that represents all the children in this container.

Returns:
Enumerator<Control*> an enunerator of all the child controls that this container has.

Implemented in VCF::AbstractContainer.

virtual Control* VCF::Container::getContainerControl  )  [pure virtual]
 

Implemented in VCF::AbstractContainer.

virtual Control* VCF::Container::getControlAtIndex const uint32 index  )  [pure virtual]
 

Implemented in VCF::AbstractContainer.

virtual int32 VCF::Container::getControlIndex Control control  )  [pure virtual]
 

Implemented in VCF::AbstractContainer.

virtual void VCF::Container::getTabList std::vector< Control * > &  tabList  )  [pure virtual]
 

Implemented in VCF::AbstractContainer.

virtual void VCF::Container::insertAtIndex Control child,
const AlignmentType alignment,
const uint32 index
[pure virtual]
 

inserts a child control into this container after the specified index.

If the child is already present then it's order in the container list is modified accordingly. If the index specified is not within the container list's bounds then the child is added at the end of the list

Implemented in VCF::AbstractContainer.

virtual void VCF::Container::insertBeforeControl Control child,
const AlignmentType alignment,
Control beforeControl
[pure virtual]
 

inserts a child control into this container before the control specified in beforeControl.

If the child is already present then it's order in the container list is modified accordingly. If the beforeControl control is not found in the list of children then the child is added at the beginning of the list

Implemented in VCF::AbstractContainer.

virtual void VCF::Container::paintChildren GraphicsContext context  )  [pure virtual]
 

Paints all children of this container.

Implemented in VCF::AbstractContainer.

virtual void VCF::Container::remove Control child  )  [pure virtual]
 

removes the child control from the container - does NOT delete the control

Parameters:
Control the control to remove from this container

Implemented in VCF::AbstractContainer.

virtual void VCF::Container::resizeChildren Control control  )  [pure virtual]
 

resizes all the children, according to their alignment types and anchor values.

Usually called by the implementing container control when it is resized.

Parameters:
Control the child control that has changed and should be paid attention to. If the the parameter is NULL then the control that the container is attached to has changed.

Implemented in VCF::ColumnLayoutContainer, VCF::StandardContainer, VCF::DesignTimeContainer, and VCF::HorizontalLayoutContainer.

virtual void VCF::Container::sendControlToBack Control child  )  [pure virtual]
 

Sends the specified child to the last position in containers list.

Implemented in VCF::AbstractContainer.

virtual void VCF::Container::sendControlToFront Control child  )  [pure virtual]
 

Sends the specified child to the first position in containers list.

Implemented in VCF::AbstractContainer.

virtual void VCF::Container::setContainerControl Control control  )  [pure virtual]
 

Sets the control that this container is attached to and responds to events from.

Implemented in VCF::AbstractContainer.

virtual void VCF::Container::updateTabOrder Control child,
uint32 newTabOrder
[pure virtual]
 

Implemented in VCF::AbstractContainer.


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information