1SoNodeKitListPart(3IV)() SoNodeKitListPart(3IV)()
2
3
4
6 SoNodeKitListPart — group node with restricted children
7
9 SoBase > SoFieldContainer > SoNode > SoNodeKitListPart
10
12 #include <Inventor/nodekits/SoNodeKitListPart.h>
13
14 Methods from class SoNodeKitListPart:
15
16 SoNodeKitListPart()
17 SoType getContainerType() const
18 void setContainerType(SoType newContainerType )
19 const SoTypeList & getChildTypes() const
20 void addChildType(SoType typeToAdd )
21 SbBool isTypePermitted(SoType typeToCheck ) const
22 SbBool isChildPermitted(const SoNode *child ) const
23 void containerSet(const char *fieldDataString )
24 void lockTypes()
25 SbBool isTypeLocked() const
26 void addChild(SoNode *child )
27 void insertChild(SoNode *child, int childIndex )
28 SoNode * getChild(int index ) const
29 int findChild(SoNode *child) const
30 int getNumChildren() const
31 void removeChild(int index)
32 void removeChild(SoNode *child)
33 void replaceChild(int index, SoNode *newChild)
34 void replaceChild(SoNode *oldChild, SoNode *newChild)
35 static SoType getClassTypeId()
36
37 Methods from class SoNode:
38
39 void setOverride(SbBool state)
40 SbBool isOverride() const
41 SoNode * copy(SbBool copyConnections = FALSE) const
42 virtual SbBool affectsState() const
43 static SoNode * getByName(const SbName &name)
44 static int getByName(const SbName &name, SoNodeList &list)
45
46 Methods from class SoFieldContainer:
47
48 void setToDefaults()
49 SbBool hasDefaultValues() const
50 SbBool fieldsAreEqual(const SoFieldContainer *fc) const
51 void copyFieldValues(const SoFieldContainer *fc, SbBool
52 copyConnections = FALSE)
53 SbBool set(const char *fieldDataString)
54 void get(SbString &fieldDataString)
55 virtual int getFields(SoFieldList &resultList) const
56 virtual SoField * getField(const SbName &fieldName) const
57 SbBool getFieldName(const SoField *field, SbName &fieldName)
58 const
59 SbBool isNotifyEnabled() const
60 SbBool enableNotify(SbBool flag)
61
62 Methods from class SoBase:
63
64 void ref()
65 void unref() const
66 void unrefNoDelete() const
67 void touch()
68 virtual SoType getTypeId() const
69 SbBool isOfType(SoType type) const
70 virtual void setName(const SbName &name)
71 virtual SbName getName() const
72
73
75 This node class is very similar to SoGroup with the exception that it
76 specifies restrictions on the type of children that it allows. It is
77 used by nodekits to restrict child types within list parts (see the
78 reference page for SoBaseKit).
79
80 By default, any kind of child may be added. Methods of this class allow
81 you to restrict the type of allowable children, and to lock down the
82 types so that this type list may no longer be altered.
83
84 Inside the SoNodeKitListPart is a container node, which in turn con‐
85 tains the children. The container node is a hidden child, and the type
86 of node used may be set with setContainerType(). In this way, you can
87 make the nodekitlist behave like a group, a separator, or any other
88 subclass of group. The container is not accessible so that the nodek‐
89 itlist may retain control over what kinds of children are added.
90
92 SoNodeKitListPart()
93 Constructor.
94
95 SoType getContainerType() const
96 void setContainerType(SoType newContainerType )
97 Gets and sets the type of node used as the container.
98
99 const SoTypeList & getChildTypes() const
100 Returns the permitted child node types. By default, any type of node
101 is permitted, so the list contains one entry of type SoNode.
102
103 void addChildType(SoType typeToAdd )
104 Permits the node type typeToAdd as a child. The first time the add‐
105 ChildType() method is called, the default of SoNode is overridden
106 and only the new typeToAdd is permitted. In subsequent calls to add‐
107 ChildType(), the typeToAdd is added to the existing types.
108
109 SbBool isTypePermitted(SoType typeToCheck ) const
110 Returns whether a node of type typeToCheck may be added as a child.
111
112 SbBool isChildPermitted(const SoNode *child ) const
113 Returns whether the node child may be added to this list. This will
114 return TRUE if the type of child is one of the permissible child
115 types.
116
117 void containerSet(const char *fieldDataString )
118 Sends a string to the set() method on the container node. This is
119 how you can set the value of a switch node if the container node is
120 an SoSwitch, for example.
121
122 void lockTypes()
123 This function permanently locks the permitted child types and the
124 container type permanently. Calls to setContainerType() and add‐
125 ChildType() will have no effect after this function is called.
126
127 SbBool isTypeLocked() const
128 Returns whether the permitted child types and the container type are
129 locked (i.e. cannot be changed). See lockTypes()
130
131 void addChild(SoNode *child )
132 void insertChild(SoNode *child, int childIndex )
133 SoNode * getChild(int index ) const
134 int findChild(SoNode *child) const
135 int getNumChildren() const
136 void removeChild(int index)
137 void removeChild(SoNode *child)
138 void replaceChild(int index, SoNode *newChild)
139 void replaceChild(SoNode *oldChild, SoNode *newChild)
140 These are the functions used to edit the children. They parallel
141 those of SoGroup, except that they always check the child types
142 against those which are permissible. See SoGroup for details.
143
144 static SoType getClassTypeId()
145 Returns type identifier for this class.
146
147
149 NodeKitListPart {
150 containerTypeName "Group"
151 childTypeNames ""
152 containerNode NULL
153 }
154
156 SoBaseKit, SoNodeKit, SoNodeKitDetail, SoNodeKitPath, SoNodekitCatalog,
157 SoSceneKit, SoSeparatorKit, SoShapeKit, SoWrapperKit
158
159
160
161
162 SoNodeKitListPart(3IV)()