Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

disptree.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 *
00003 * Title:     DispTree
00004 * Filename:  src/disptree.h
00005 * Generated: February 26, 2004 @ 21:00:37
00006 *        by: GENTREE - Generates C++ command tree header files for GLITCH.
00007 *
00008 * WARNING! All changes made in this file will be lost!
00009 *
00010 *******************************************************************************/
00011 
00012 #ifndef __DISPTREE_H__
00013 #define __DISPTREE_H__
00014 
00015 
00016 #include <qgl.h>
00017 #include <qptrlist.h>
00018 #include <qstring.h>
00019 #include <qstringlist.h>
00020 
00021 #include "cmdtreenode.h"
00022 #include "cmdparam.h"
00023 #include "superptrlist.h"
00024 #include "supervaluelist.h"
00025 
00026 #include "intparam.h"
00027 #include "enumparam.h"
00028 #include "clampfloatparam.h"
00029 
00030 
00031 
00036 class DispTree : public CmdTreeNode
00037 {
00038 public:
00039     DispTree()
00040         : CmdTreeNode( "Display", new QPtrList<CmdTreeNode> )
00041     {
00042 
00043         // Trees
00044 
00045         // Commands
00046         mySubTree->append( new CmdTreeNode( "glClearColor", NULL, cmd_glClearColor, 
00047                             new SuperPtrList<CmdParam>( 4,
00048                                 new ClampFloatParam( "red", "0.5", "GLclampf" ), 
00049                                 new ClampFloatParam( "green", "0.5", "GLclampf" ), 
00050                                 new ClampFloatParam( "blue", "0.5", "GLclampf" ), 
00051                                 new ClampFloatParam( "alpha", "1", "GLclampf" ) ) ) );
00052         mySubTree->append( new CmdTreeNode( "glClear", NULL, cmd_glClear, 
00053                             new SuperPtrList<CmdParam>( 1,
00054                                 new EnumParam( "mask", "16384", 
00055                                     SuperValueList<char*>( 4,
00056                                         "GL_COLOR_BUFFER_BIT",
00057                                         "GL_DEPTH_BUFFER_BIT",
00058                                         "GL_ACCUM_BUFFER_BIT",
00059                                         "GL_STENCIL_BUFFER_BIT" ),
00060                                     SuperValueList<int>( 4,
00061                                         GL_COLOR_BUFFER_BIT,
00062                                         GL_DEPTH_BUFFER_BIT,
00063                                         GL_ACCUM_BUFFER_BIT,
00064                                         GL_STENCIL_BUFFER_BIT ),
00065                                     "GLbitfield" ) ) ) );
00066         mySubTree->append( new CmdTreeNode( "glFlush", NULL, cmd_glFlush, NULL ) );
00067         mySubTree->append( new CmdTreeNode( "glViewport", NULL, cmd_glViewport, 
00068                             new SuperPtrList<CmdParam>( 4,
00069                                 new IntParam( "x", "0", "GLint" ), 
00070                                 new IntParam( "y", "0", "GLint" ), 
00071                                 new IntParam( "width", "100", "GLsizei" ), 
00072                                 new IntParam( "height", "100", "GLsizei" ) ) ) );
00073     }
00074 
00075     // Note: In the unlikely (but serious) event that too few elements exist in
00076     //       the list of strings that is passed, the QStringList class will
00077     //       catch and handle the case as appropiate.
00078 
00079     static void cmd_glClearColor( const QStringList& p ) {
00080         glClearColor( p[0].toFloat(), p[1].toFloat(), p[2].toFloat(), p[3].toFloat() );
00081     }
00082     static void cmd_glClear( const QStringList& p ) {
00083         glClear( p[0].toInt() );
00084     }    static void cmd_glFlush( const QStringList& ) {
00085         glFlush();
00086     }
00087 
00088     static void cmd_glViewport( const QStringList& p ) {
00089         glViewport( p[0].toInt(), p[1].toInt(), p[2].toInt(), p[3].toInt() );
00090     }
00091 
00092 private:
00093 
00094 };
00095 
00096 
00097 #endif // __DISPTREE_H__

Generated on Fri Feb 27 12:01:39 2004 for Glitch by doxygen 1.3.2