VkComponentList(3x)
VkComponentList - A simple list of VkComponent objects
As shipped in IRIX 6.5. First release of IRIX 6.5.
NAME VkComponentList - A simple list of VkComponent objects INHERITS FROM VkComponent : VkCallbackObject HEADER FILE #include <Vk/VkComponentList.h> PUBLIC PROTOCOL SUMMARY Constructor/Destructor VkComponentList(void); virtual void ~VkComponentList(void); Adding and removing components virtual void add(VkComponent* comp); virtual void remove(VkComponent* comp); virtual void removeFirst(VkComponent* comp); virtual void removeLast(VkComponent* comp); Access functions int size(void); VkComponent* operator[](int index); CLASS DESCRIPTION This class supports lists of VkComponents. The class is used internally by the ViewKit, but can also be used by applications. Any class derived from VkComponent can be added to a list. Items can also be removed from the list, or accessed using the [] operator. FUNCTION DESCRIPTIONS VkComponentList() VkComponentList(void); Initialize an empty VkComponentList object. ~VkComponentList() virtual void ~VkComponentList(void); Destroy all memory allocated by the VkComponentList object. This does not delete the objects on the list, only the space used by the list itself. add() virtual void add(VkComponent* comp); Append a VkComponent to the end of the list. A list can contain multiple pointers to the same VkComponent. remove() virtual void remove(VkComponent* comp); Remove all occurrences of the specified VkComponent from the list. removeFirst() virtual void removeFirst(VkComponent* comp); Remove the first occurrence of the specified VkComponent from the list. removeLast() virtual void removeLast(VkComponent* comp); Remove the last occurrence of the specified VkComponent from the list. size() int size(void); Return the size of the list. operator[]() VkComponent* operator[](int index); Access a specific component on the list. EXAMPLE The following code segment places three instances of VkGraph in a list, and then cycles through each item on the list. VkGraph *one = new VkGraph("one", parent); VkGraph *two = new VkGraph("two", parent); VkGraph *three = new VkGraph("three", parent); VkComponentList *list = new VkComponentList(); list->add(one); list->add(two); list->add(three); for(int i = 0; i < list->size(); i++) (*list)[i]->show(); INHERITED MEMBER FUNCTIONS Inherited from VkComponent installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(), afterRealizeHook(), setDefaultResources(), getResources(), show(), hide(), manage(), unmanage(), name(), className(), baseWidget(), okToQuit(), _baseWidget, _w, deleteCallback Inherited from VkCallbackObject callCallbacks(), addCallback(), removeCallback(), removeAllCallbacks() KNOWN CLASSES THAT USE THIS CLASS VkApp, VkComponent, VkMenuUndoManager, VkMsgApp BUGS SEE ALSO VkComponent, VkApp, VkComponent, VkMenuUndoManager, VkMsgApp ViewKit Programmer's Guide The X Window System, DEC Press, Bob Sheifler and Jim Gettys The X Window System Toolkit, DEC Press, Paul Asente and Ralph Swick The OSF/Motif Programmers Reference, Prentice Hall, OSF