VkComponentList(3x) VkComponentList(3x)
VkComponentList - A simple list of VkComponent objects
VkComponent : VkCallbackObject
#include <Vk/VkComponentList.h>
PUBLIC PROTOCOL SUMMARY
Constructor/Destructor
VkComponentList(void);
virtual void ~VkComponentList(void);
Adding and removing components [Toc] [Back]
virtual void add(VkComponent* comp);
virtual void remove(VkComponent* comp);
virtual void removeFirst(VkComponent* comp);
virtual void removeLast(VkComponent* comp);
Access functions [Toc] [Back]
int size(void);
VkComponent* operator[](int index);
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 [Toc] [Back] 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.
Page 1
VkComponentList(3x) VkComponentList(3x)
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.
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);
Page 2
VkComponentList(3x) VkComponentList(3x)
list->add(three);
for(int i = 0; i < list->size(); i++)
(*list)[i]->show();
INHERITED MEMBER FUNCTIONS [Toc] [Back] Inherited from VkComponent
installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
afterRealizeHook(), setDefaultResources(), getResources(), show(),
hide(), manage(), unmanage(), name(), className(), baseWidget(),
okToQuit(), _baseWidget, _w, deleteCallback
Inherited from VkCallbackObject [Toc] [Back]
callCallbacks(), addCallback(), removeCallback(),
removeAllCallbacks()
KNOWN CLASSES THAT USE THIS CLASS [Toc] [Back] VkApp, VkComponent, VkMenuUndoManager, VkMsgApp
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
PPPPaaaaggggeeee 3333 [ Back ]
|