SoDatumLabel.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                                                         *
00003  *                                                                         *
00004  *   This file is part of the FreeCAD CAx development system.              *
00005  *                                                                         *
00006  *   This library is free software; you can redistribute it and/or         *
00007  *   modify it under the terms of the GNU Library General Public           *
00008  *   License as published by the Free Software Foundation; either          *
00009  *   version 2 of the License, or (at your option) any later version.      *
00010  *                                                                         *
00011  *   This library  is distributed in the hope that it will be useful,      *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Library General Public License for more details.                  *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Library General Public     *
00017  *   License along with this library; see the file COPYING.LIB. If not,    *
00018  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00019  *   Suite 330, Boston, MA  02111-1307, USA                                *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 #ifndef SKETCHERGUI_SODATUMLABEL_H
00024 #define SKETCHERGUI_SODATUMLABEL_H
00025 
00026 #include <Inventor/fields/SoSubField.h>
00027 #include <Inventor/nodes/SoSubNode.h>
00028 #include <Inventor/nodes/SoShape.h>
00029 #include <Inventor/fields/SoSFColor.h>
00030 #include <Inventor/fields/SoSFEnum.h>
00031 #include <Inventor/fields/SoSFFloat.h>
00032 #include <Inventor/fields/SoSFBool.h>
00033 #include <Inventor/fields/SoSFName.h>
00034 #include <Inventor/fields/SoMFString.h>
00035 #include <Inventor/fields/SoSFInt32.h>
00036 #include <Inventor/SbBox3f.h>
00037 #include <Inventor/fields/SoSFImage.h>
00038 
00039 namespace SketcherGui {
00040  
00041 class SketcherGuiExport SoDatumLabel : public SoShape {
00042     typedef SoShape inherited;
00043 
00044     SO_NODE_HEADER(SoDatumLabel);
00045 
00046 public:
00047 
00048     static void initClass();
00049     SoDatumLabel();
00050 
00051     SoMFString string;
00052     SoSFColor  textColor;
00053     SoSFEnum   justification;
00054     SoSFName   name;
00055     SoSFInt32  size;
00056     SoSFImage  image;
00057 
00058 protected:
00059     virtual ~SoDatumLabel() {};
00060     virtual void GLRender(SoGLRenderAction *action);
00061     virtual void computeBBox(SoAction *, SbBox3f &box, SbVec3f &center);
00062     virtual void generatePrimitives(SoAction * action);
00063 
00064 private:
00065     void drawImage();
00066     float bbx;
00067     float bby;
00068 };
00069 
00070 }
00071 
00072 
00073 #endif // SKETCHERGUI_SODATUMLABEL_H

Generated on Wed Nov 23 19:00:39 2011 for FreeCAD by  doxygen 1.6.1