1 /*
2  * NodeTUISlider.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 TUISlider node
22  */
23 
24 #pragma once
25 
26 #include "Node.h"
27 #include "ProtoMacros.h"
28 #include "Proto.h"
29 #include "SFMFTypes.h"
30 #include "TUIElement.h"
31 
32 #ifdef min
33 # undef min
34 #endif
35 
36 #ifdef max
37 # undef max
38 #endif
39 
40 class ProtoTUISlider : public ProtoTUIElement {
41 public:
42                     ProtoTUISlider(Scene *scene);
43     virtual Node   *create(Scene *scene);
44 
getType()45     virtual int     getType() const { return COVER_TUI_SLIDER; }
46 
47     FieldIndex min;
48     FieldIndex max;
49     FieldIndex value;
50 };
51 
52 class NodeTUISlider : public TUIElement {
53 public:
54                     NodeTUISlider(Scene *scene, Proto *proto);
55 
getX3dVersion(void)56     virtual int     getX3dVersion(void) const { return -1; }
copy()57     virtual Node   *copy() const { return new NodeTUISlider(*this); }
58 
59     fieldMacros(SFInt32, min,   ProtoTUISlider)
60     fieldMacros(SFInt32, max,   ProtoTUISlider)
61     fieldMacros(SFInt32, value, ProtoTUISlider)
62 };
63 
64