changed: gcc8 base update
[opensg.git] / Source / System / Statistics / Foregrounds / OSGSimpleStatisticsForeground.h
blob2d7c958b57786322063f3815670b0be4e50e2a5d
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGSIMPLESTATISTICSFOREGROUND_H_
40 #define _OSGSIMPLESTATISTICSFOREGROUND_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGSimpleStatisticsForegroundBase.h"
46 #include "OSGTextureObjChunk.h"
47 #include "OSGTextureEnvChunk.h"
48 #include "OSGTextTXFFace.h"
50 OSG_BEGIN_NAMESPACE
52 class TextLayoutResult;
54 /*! \brief Simple Statistics Foreground class. See \ref
55 PageSystemWindowForegroundStatisticsSimple for a description.
56 \ingroup GrpUtilStatisticsObj
57 \ingroup GrpLibOSGUtil
58 \includebasedoc
61 class OSG_UTIL_DLLMAPPING SimpleStatisticsForeground :
62 public SimpleStatisticsForegroundBase
64 public:
66 typedef SimpleStatisticsForegroundBase Inherited;
68 /*---------------------------------------------------------------------*/
69 /*! \name Modes */
70 /*! \{ */
72 enum { Left=0, Middle, Right } HorizontalAlignE;
73 enum { Top=0, Center, Bottom } VerticalAlignE;
75 /*! \} */
76 /*---------------------------------------------------------------------*/
77 /*! \name Sync */
78 /*! \{ */
80 virtual void changed(ConstFieldMaskArg whichField,
81 UInt32 origin,
82 BitVector details);
84 /*! \} */
85 /*---------------------------------------------------------------------*/
86 /*! \name Output */
87 /*! \{ */
89 virtual void dump( UInt32 uiIndent = 0,
90 const BitVector bvFlags = 0) const;
92 /*! \} */
93 /*---------------------------------------------------------------------*/
94 /*! \name Draw */
95 /*! \{ */
97 virtual void draw(DrawEnv *pEnv);
99 /*! \} */
100 /*---------------------------------------------------------------------*/
101 /*! \name Convenience Functions */
102 /*! \{ */
104 void addElement(StatElemDescBase &desc, const Char8 *format = NULL);
105 void addElement(Int32 id, const Char8 *format = NULL);
106 void addText (const char *text);
107 void clearElems(void);
109 /*! \} */
110 /*========================= PROTECTED ===============================*/
112 protected:
114 // Variables should all be in SimpleStatisticsForegroundBase.
116 /*---------------------------------------------------------------------*/
117 /*! \name Constructors */
118 /*! \{ */
120 SimpleStatisticsForeground(void);
121 SimpleStatisticsForeground(const SimpleStatisticsForeground &source);
123 /*! \} */
124 /*---------------------------------------------------------------------*/
125 /*! \name Destructors */
126 /*! \{ */
128 virtual ~SimpleStatisticsForeground(void);
130 /*! \} */
131 /*---------------------------------------------------------------------*/
132 /*! \name Init */
133 /*! \{ */
135 static void initMethod(InitPhase ePhase);
136 /*! \} */
137 /*---------------------------------------------------------------------*/
138 /*! \name Init */
139 /*! \{ */
141 virtual void resolveLinks(void);
143 /*! \} */
144 /*========================== PRIVATE ================================*/
146 private:
148 TextTXFFaceRefPtr _face;
150 TextureObjChunkUnrecPtr _texchunk;
151 TextureEnvChunkUnrecPtr _texenvchunk;
153 friend class FieldContainer;
154 friend class SimpleStatisticsForegroundBase;
156 void initText(const std::string &family, Real32 size);
158 // prohibit default functions (move to 'public' if you need one)
159 void operator =(const SimpleStatisticsForeground &source);
162 typedef SimpleStatisticsForeground *SimpleStatisticsForegroundP;
164 OSG_END_NAMESPACE
166 #include "OSGSimpleStatisticsForegroundBase.inl"
167 #include "OSGSimpleStatisticsForeground.inl"
169 #endif /* _OSGSIMPLESTATISTICSFOREGROUND_H_ */