Class Container

Containers provide the generic interface for adding and removing Feuille to conatiners like Collage and MilleFeuille. Container can be viewed as a stack on which new feuille can be pushed, removed, or retrieved given a tag. They also manage the dispatch of graphic and interaction events to the feuille they contained: graphics events traverse the stack from bottom to top, while interaction events traverse the stack from top to bottom.

Public type

None

Constructor and destructor

Container(Mural32 new_x = 0, Mural32 new_y = 0,
	  MuralU32 new_widht = DEFAULT_WIDTH,
	  MuralU32 new_height = DEFAULT_HEIGHT,
	  ObjectType new_type = TypeGraphic,
	  const char *new_name = ""):

new_x, new_y provide the initial position for the feuille,
new_width, new_height
provide the initial width and height of a the feuille (160X120 by default),
new_type provide the type of the object being created
new_name provide an optional name.

Public methods

virtual void add_feuille(GraphicPtr new_feuille);
virtual void add_feuille(InteractionPtr new_feuille);
virtual void add_feuille(DataPtr new_feuille);
virtual void add_feuille(ContainerPtr new_feuille);
virtual void add_feuille(VisualPtr new_feuille);
add_feuille add new_ feuille to the container. Conatiner can be viewed as stack on which a new feuille is pushed. Graphics events traverse the stack from bottom to top, while nteraction events traverse the stack from top to bottom.
virtual void remove_feuille(GraphicPtr new_feuille);
virtual void remove_feuille(InteractionPtr new_feuille);
virtual void remove_feuille(DataPtr new_feuille);
virtual void remove_feuille(ContainerPtr new_feuille);
virtual void remove_feuille(VisualPtr new_feuille);
remove_feuille remove a feuille from the container.
virtual void get_feuilles(Data::TypeTag target_type,
			  list<DataPtr> &result);
get_feuilles return in result all the feuilles which tag is target_type. Feuilles are added at the end of result which is not reset at the begening of the call. This call locks the object.

Protected Methods

None

Public fields

None

Protected fields

None