00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef _OSGSIMPLESTATISTICSFOREGROUND_H_
00040 #define _OSGSIMPLESTATISTICSFOREGROUND_H_
00041 #ifdef __sgi
00042 #pragma once
00043 #endif
00044
00045 #include <OSGConfig.h>
00046
00047 #include <OSGTextureChunk.h>
00048 #include <OSGStatElemDesc.h>
00049
00050 #include <OSGSimpleStatisticsForegroundBase.h>
00051
00052 OSG_BEGIN_NAMESPACE
00053
00054 class TextTXFFace;
00055 class TextLayoutResult;
00056
00061 class OSG_SYSTEMLIB_DLLMAPPING SimpleStatisticsForeground : public SimpleStatisticsForegroundBase
00062 {
00063 private:
00064
00065 typedef SimpleStatisticsForegroundBase Inherited;
00066
00067
00068 public:
00069
00070
00074 enum { Left=0, Middle, Right } HorizontalAlignE;
00075 enum { Top=0, Center, Bottom } VerticalAlignE;
00076
00078
00082 virtual void changed(BitVector whichField,
00083 UInt32 origin );
00084
00086
00090 virtual void dump( UInt32 uiIndent = 0,
00091 const BitVector bvFlags = 0) const;
00092
00094
00098 virtual void draw( DrawActionBase * action, Viewport * port );
00099
00101
00105 void addElement( StatElemDescBase &desc, const char *format = NULL);
00106 void addElement( Int32 id, const char *format = NULL);
00107 void addText ( const char *text );
00108 void clearElems( void );
00109
00111
00112 protected:
00113
00114
00115
00116
00120 SimpleStatisticsForeground(void);
00121 SimpleStatisticsForeground(const SimpleStatisticsForeground &source);
00122
00124
00128 virtual ~SimpleStatisticsForeground(void);
00129
00132
00133 private:
00134
00135 TextTXFFace *_face;
00136
00137 TextureChunkPtr _texchunk;
00138
00139 friend class FieldContainer;
00140 friend class SimpleStatisticsForegroundBase;
00141
00142 static void initMethod(void);
00143
00144 void initText(const std::string &family, Real32 size);
00145
00146 void drawCharacters(const TextLayoutResult &layoutResult) const;
00147
00148
00149
00150 void operator =(const SimpleStatisticsForeground &source);
00151 };
00152
00153 typedef SimpleStatisticsForeground *SimpleStatisticsForegroundP;
00154
00155 OSG_END_NAMESPACE
00156
00157 #include <OSGSimpleStatisticsForegroundBase.inl>
00158 #include <OSGSimpleStatisticsForeground.inl>
00159
00160 #define OSGSIMPLESTATISTICSFOREGROUND_HEADER_CVSID "@(#)$Id: OSGSimpleStatisticsForeground.h,v 1.4 2002/06/01 10:37:25 vossg Exp $"
00161
00162 #endif