Accessors for class IlvContainer

Properties

Methods

Description

A container coordinates the storage and the display of graphic objects.

TypeNameDescriptionNotes
UIntcardinalReturns the number of objects managed by the container view.
Objectcontains(IlvPoint position)Returns the top-most IlvGraphic object of the container that contains the given position, if such an object exists. If the object does not exist, the function returns null.
BooleandoubleBufferingReturns and sets the value that specifies whether (true) or not (false) the container is actually using double buffering.
Voidfit()Computes a new transformer for the container so that all objects that have the visibility attribute set to true can be seen in the view.
VoidfitToContents()Resizes the container so that it encompasses all the visible objects. The top-left coordinates of the view remain at the same location.
IntgetIndex(IlvGraphic object)Returns the index of object stored in the container list. The first object stored has 0 for index. If object is not located in this container, then the value -1 is returned, which must be considered as an error.
ObjectgetObject(String name)Attempts to return the object whose name is passed as argument. If no such object exists, then null is returned. If more than one object in the container has this name, this method returns the first of these object that was created.
ObjectgetObjectAt(UInt index)Returns the object stored at index in the container list. If index is greater than the number of objects in the container, this member function returns NULL.
BooleanreadFile(String file)Reads a set of IlvGraphic objects from file. This member function returns true if the operation was successful or false if an error was detected. If the string file is a relative path name, then the file is searched in each directory referenced in the display path.

Unix platforms may not properly read files that have been generated in text mode on Windows.

Booleanredraw()Refreshes the container.
BooleanremoveObject(IlvGraphic object)Removes the association between the object and the container view. The object itself is not deleted. This function returns false if the object is not stored in the container.
When the object is removed from the container, all the properties related to the container are removed. However the other properties are retained (that is, the object name, its named properties, and so on.).
VoidremoveObjects(Boolean destroy)Removes the association of all objects with the container view. The objects themselves are deleted.
Voidswap(IlvGraphic object1, IlvGraphic object2)Interchanges the two objects object1 and object2 with respect to their order in the list of objects of the container, thus modifying the order in which objects are stacked.
VoidtranslateView(Int dx, Int dy)Composes the current transformer with a translation specified by dx and dy. Sets the redraw parameter to false to prevent an immediate display update.
VoidzoomView(IlvPoint center, Float scaleX, Float scaleY)Composes the current transformer with a transformer that zooms by a factor of scaleX and scaleY, and leaves the center point in the container at its original place. If scaleY is 0, then we assume that the scaling factor is the same in y as in x.