SoTextLabel.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2009 Werner Mayer <wmayer[at]users.sourceforge.net>     *
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 GUI_SOTEXTLABEL_H
00024 #define GUI_SOTEXTLABEL_H
00025 
00026 #include <Inventor/fields/SoSubField.h>
00027 #include <Inventor/nodes/SoSubNode.h>
00028 #include <Inventor/nodes/SoImage.h>
00029 #include <Inventor/nodes/SoText2.h>
00030 #include <Inventor/fields/SoSFColor.h>
00031 #include <Inventor/fields/SoSFEnum.h>
00032 #include <Inventor/fields/SoSFFloat.h>
00033 #include <Inventor/fields/SoSFBool.h>
00034 #include <Inventor/fields/SoSFName.h>
00035 #include <Inventor/fields/SoSFInt32.h>
00036 #include <Inventor/fields/SoSFImage.h>
00037 #include <Inventor/manips/SoTransformManip.h>
00038 
00039 namespace Gui {
00040 
00045 class GuiExport SoTextLabel : public SoText2 {
00046     typedef SoText2 inherited;
00047 
00048     SO_NODE_HEADER(SoTextLabel);
00049 
00050 public:
00051     static void initClass();
00052     SoTextLabel();
00053 
00054     SoSFColor backgroundColor;
00055     SoSFBool background;
00056     SoSFFloat frameSize;
00057 
00058 protected:
00059     virtual ~SoTextLabel() {};
00060     virtual void GLRender(SoGLRenderAction *action);
00061 };
00062 
00063 class GuiExport SoStringLabel : public SoNode {
00064     typedef SoNode inherited;
00065 
00066     SO_NODE_HEADER(SoStringLabel);
00067 
00068 public:
00069     static void initClass();
00070     SoStringLabel();
00071 
00072     SoMFString string;
00073     SoSFColor  textColor;
00074     SoSFName   name;
00075     SoSFInt32  size;
00076 
00077 protected:
00078     virtual ~SoStringLabel() {};
00079     virtual void GLRender(SoGLRenderAction *action);
00080 };
00081 
00082 class GuiExport SoFrameLabel : public SoImage {
00083     typedef SoImage inherited;
00084 
00085     SO_NODE_HEADER(SoFrameLabel);
00086 
00087 public:
00088     enum Justification {
00089         LEFT, RIGHT, CENTER
00090     };
00091 
00092     static void initClass();
00093     SoFrameLabel();
00094 
00095     SoMFString string;
00096     SoSFColor  textColor;
00097     SoSFColor  backgroundColor;
00098     SoSFEnum   justification;
00099     SoSFName   name;
00100     SoSFInt32  size;
00101     SoSFBool   frame;
00102   //SoSFImage  image;
00103 
00104 protected:
00105     virtual ~SoFrameLabel() {};
00106     virtual void notify(SoNotList * list);
00107     virtual void GLRender(SoGLRenderAction *action);
00108 
00109 private:
00110     void drawImage();
00111 };
00112 
00113 class GuiExport TranslateManip : public SoTransformManip
00114 {
00115     SO_NODE_HEADER(TranslateManip);
00116 
00117 public:
00118     // Constructor
00119     TranslateManip();
00120     static void initClass();
00121 
00122 private:
00123     // Destructor
00124     ~TranslateManip();
00125 };
00126 
00127 } // namespace Gui
00128 
00129 #endif // GUI_SOTEXTLABEL_H
00130 

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