1 /* 2 * TUIElement.h 3 * 4 * Copyright (C) 1999 Stephen F. White, 2006 J. "MUFTI" Scheurich 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program (see the file "COPYING" for details); if 18 * not, write to the Free Software Foundation, Inc., 675 Mass Ave, 19 * Cambridge, MA 02139, USA. 20 * 21 * Implements the Cover/Covise TUIElement node 22 */ 23 24 #pragma once 25 26 #include "CoverNode.h" 27 #include "ProtoMacros.h" 28 #include "Proto.h" 29 #include "SFMFTypes.h" 30 31 class ProtoTUIElement : public Proto { 32 public: 33 ProtoTUIElement(Scene *scene, const char* nodeName); 34 ProtoTUIElement(Scene *scene); 35 void addElements(void); 36 37 virtual Node *create(Scene *scene); 38 39 FieldIndex elementName; 40 FieldIndex parent; 41 FieldIndex pos; 42 isCoverProto(void)43 virtual bool isCoverProto(void) { return true; } 44 }; 45 46 class TUIElement : public CoverNode { 47 public: 48 TUIElement(Scene *scene, Proto *proto); 49 getType()50 virtual int getType() const { return -1; } getX3dVersion(void)51 virtual int getX3dVersion(void) const { return -1; } copy()52 virtual Node *copy() const { return new TUIElement(*this); } 53 54 fieldMacros(SFString, elementName, ProtoTUIElement) 55 fieldMacros(SFString, parent, ProtoTUIElement) 56 fieldMacros(SFVec2f, pos, ProtoTUIElement) 57 }; 58 59