void QTextContainer::characters(const char* ch, int length) {
	if (!getText(NULL)) {
		// No text has been placed in this container yet...
		// For convenience, create a new text node to hold this text
		// There will be no locale set for this created text node
		if (!QUtil::isWhitespace(ch,length)) {
			QText *n = new QText();
			n->setText(ch,length);
			addSubnode(n);
		}
	} else if (!QUtil::isWhitespace(ch,length)) {
		// error
	}
}
Example #2
0
File: Node.cpp Project: Sudoka/D3
 Node * Node::createSubnode(String name)
 {
     Node * subnode = new Node(name);
     addSubnode(subnode);
     return subnode;
 }
Example #3
0
 SceneNode & SceneNode::createSubnode(String name)
 {
     SceneNode * node = new SceneNode(name, getScene());
     addSubnode(node);
     return * node;
 }