00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __GZ_TEXT_H__
00023 #define __GZ_TEXT_H__
00024
00030 #include "gzNode.h"
00031 #include "gzFont.h"
00032
00033
00034 const gzVec3 GZ_TEXT_UPPER_LEFT_POS=gzVec3((gzReal)-1,(gzReal)1,(gzReal)0);
00035 const gzVec3 GZ_TEXT_CENTER_POS=gzVec3((gzReal)0,(gzReal)0,(gzReal)0);
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 class gzText : public gzNode
00052 {
00053 public:
00054 GZ_GRAPH_EXPORT gzText(const gzString &name=GZ_EMPTY_STRING);
00055
00056 GZ_GRAPH_EXPORT virtual ~gzText(){};
00057
00058 GZ_DECLARE_TYPE_INTERFACE_EXPORT(GZ_GRAPH_EXPORT);
00059
00060
00061
00062 GZ_GRAPH_EXPORT virtual gzVoid updateNode();
00063
00064
00065 GZ_GRAPH_EXPORT virtual gzReference* clone() const;
00066 GZ_GRAPH_EXPORT virtual gzVoid setCopyMode(gzCopyMode mode);
00067
00068
00069
00070 GZ_GRAPH_EXPORT gzVoid setFont(gzFont *font);
00071
00072 GZ_GRAPH_EXPORT gzVoid useOverlay(gzBool on);
00073
00074 GZ_GRAPH_EXPORT gzVoid use2DPosition(gzBool on);
00075
00076 GZ_GRAPH_EXPORT gzVoid set2DPosition( gzShort x_off_pixels=0, gzShort y_off_pixels=0,const gzVec3 &startPosition=GZ_TEXT_UPPER_LEFT_POS);
00077
00078 GZ_GRAPH_EXPORT gzVoid setText(const gzString &text);
00079
00080 GZ_GRAPH_EXPORT gzVoid setText(gzWideChar *text,gzULong len);
00081
00082 GZ_GRAPH_EXPORT gzVoid clear();
00083
00084 GZ_GRAPH_EXPORT gzVoid format( const gzString &format, ARG_DECL_LIST );
00085
00086 GZ_GRAPH_EXPORT gzVoid setColor(const gzVec4 &color);
00087
00088 GZ_GRAPH_EXPORT gzVoid setMaskColor(const gzVec4 &maskColor);
00089
00090 GZ_GRAPH_EXPORT gzVoid useMaskColor(gzBool on);
00091
00092 GZ_GRAPH_EXPORT gzVoid useScreenFixFont(gzBool on=TRUE);
00093
00094 GZ_GRAPH_EXPORT gzVoid useTransparentBackground(gzBool on=TRUE);
00095
00096 GZ_GRAPH_EXPORT gzVoid scrollText(const gzString &text, gzBool down=FALSE);
00097
00098 GZ_GRAPH_EXPORT gzVoid renderText(gzContext *context, gzVec3 rasterpos);
00099
00100
00101
00102 GZ_GRAPH_EXPORT gzVoid setScale(const gzVec3 &scale);
00103 GZ_GRAPH_EXPORT gzVoid setScale(gzFloat scale);
00104
00105 GZ_GRAPH_EXPORT gzVoid setHPR(const gzVec3 &hpr);
00106 GZ_GRAPH_EXPORT gzVoid setHPR(gzFloat heading,gzFloat pitch,gzFloat roll);
00107
00108
00109
00110 GZ_GRAPH_EXPORT virtual gzVoid preTraverseAction( gzTraverseAction *actionclass , gzContext *context);
00111
00112 GZ_GRAPH_EXPORT virtual gzActionStage useActionStage( gzTraverseAction *actionclass , gzContext *context);
00113
00114
00115 GZ_GRAPH_EXPORT virtual gzVoid debugOutput(gzString base , gzString anchor , gzDebugFlags features);
00116
00117
00118
00119 GZ_PROPERTY_EXPORT(gzReal, DeltaX, GZ_GRAPH_EXPORT);
00120 GZ_PROPERTY_EXPORT(gzReal, DeltaY, GZ_GRAPH_EXPORT);
00121
00122 GZ_PROPERTY_EXPORT(gzArray<gzReal>, TSpanX, GZ_GRAPH_EXPORT);
00123 GZ_PROPERTY_EXPORT(gzArray<gzReal>, TSpanY, GZ_GRAPH_EXPORT);
00124
00125 protected:
00126
00127 gzBool m_useOverlay:1;
00128
00129 gzBool m_use2DPosition:1;
00130
00131 gzBool m_useMaskColor:1;
00132
00133 gzBool m_useScreenFixFont:1;
00134
00135 gzBool m_useTranspBack:1;
00136
00137 gzRefPointer<gzFont> m_font;
00138
00139 gzVec4 m_color;
00140
00141 gzVec4 m_maskColor;
00142
00143 gzVec3 m_2DPosition;
00144
00145 gzShort m_x_off_pixels;
00146
00147 gzShort m_y_off_pixels;
00148
00149 gzVec3 m_scale;
00150
00151 gzVec3 m_hpr;
00152
00153 gzArray<gzWideChar> m_text;
00154
00155 };
00156
00157
00158 GZ_DECLARE_REFPTR(gzText);
00159
00160 #endif