summaryrefslogtreecommitdiff
path: root/inc/MFT_TextManager.hxx
blob: 3861cda0bb3af2049a51a6236dda3dbdba3d6b3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _MFT_TextManager_HeaderFile
#define _MFT_TextManager_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_MFT_TextManager_HeaderFile
#include <Handle_MFT_TextManager.hxx>
#endif

#ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx>
#endif
#ifndef _Quantity_Length_HeaderFile
#include <Quantity_Length.hxx>
#endif
#ifndef _Quantity_PlaneAngle_HeaderFile
#include <Quantity_PlaneAngle.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
class MFT_FontManager;


//! defines the common behaviour of the MFT output driver. <br>
//!  Warning: Permits to receives draw primitives from the FontManager <br>
//!	    at DrawText(...) time. <br>
//!	    This class must be redefined by the user as an application class <br>
//!	    connected to a user driver. <br>
class MFT_TextManager : public MMgt_TShared {

public:

  //! Does NOTHING <br>
  Standard_EXPORT   MFT_TextManager();
  //! Calls when string drawing is started. <br>
//!	    with a string aspect <aPaintType> : <br>
//!	      0 for filled string <br>
//!	      1 for stroke string <br>
//!	      2 for outline string <br>
//!	    The origine of the string <X>,<Y>, <br>
//!	    The orientation of the string <anOrientation>, <br>
//!	    The medium size of the char <aWidth,aHeight>, <br>
//!	    The Slant of the char <aSlant>, <br>
  Standard_EXPORT   virtual  void BeginString(const Quantity_Length X,const Quantity_Length Y,const Quantity_PlaneAngle anOrientation,const Quantity_Length aWidth,const Quantity_Length aHeight,const Quantity_PlaneAngle aSlant,const Standard_Integer aPaintType) ;
  //! Calls when a char drawing is started <br>
//!	    and give the relative char start position from the beginning <br>
//!	    of the string. <br>
//!	    The application can returns FALSE for skipping the char drawing. <br>
  Standard_EXPORT   virtual  Standard_Boolean BeginChar(const Standard_Integer aCharCode,const Quantity_Length X,const Quantity_Length Y) ;
  //! Calls to defines the current char bounding-box with : <br>
//!	     X1,Y1 : the lower left corner of the box, <br>
//!	     X2,Y2 : the lower right corner of the box, <br>
//!	     X3,Y3 : the upper right corner of the box, <br>
//!	     X4,Y4 : the upper left corner of the box. <br>
//!  Warning: the char bounding box is not rectangular when the Slant is != 0. <br>
//!	    The application can returns FALSE for skipping the char drawing. <br>
  Standard_EXPORT   virtual  Standard_Boolean SetCharBoundingBox(const Quantity_Length X1,const Quantity_Length Y1,const Quantity_Length X2,const Quantity_Length Y2,const Quantity_Length X3,const Quantity_Length Y3,const Quantity_Length X4,const Quantity_Length Y4) ;
  //! Calls to defines the current char encoding. <br>
//!  Warning: The application can returns FALSE for skipping the char drawing. <br>
  Standard_EXPORT   virtual  Standard_Boolean SetCharEncoding(const Standard_CString anEncoding) ;
  //! Calls to sets the current string position. <br>
//!	    The application can returns FALSE for skipping the char drawing. <br>
  Standard_EXPORT   virtual  Standard_Boolean Moveto(const Quantity_Length X,const Quantity_Length Y) ;
  //! Calls to drawn to the current string position. <br>
//!	    The application can returns FALSE for skipping the char drawing. <br>
  Standard_EXPORT   virtual  Standard_Boolean Lineto(const Quantity_Length X,const Quantity_Length Y) ;
  //! Calls to drawn to the current string position. <br>
//!	    The application can drawn the curve defined by <br>
//!	    his descriptor P1,P2,P3,P4 or <br>
//!	    returns FALSE to let the interpretor compute the curve <br>
//!	    vectors. <br>
  Standard_EXPORT   virtual  Standard_Boolean Curveto(const Quantity_Length X1,const Quantity_Length Y1,const Quantity_Length X2,const Quantity_Length Y2,const Quantity_Length X3,const Quantity_Length Y3,const Quantity_Length X4,const Quantity_Length Y4) ;
  //! Calls when a char path drawing is ended <br>
  Standard_EXPORT   virtual  void ClosePath() ;
  //! Calls when a char drawing is ended <br>
//!	    and give the relative char ending position from the <br>
//!	    beginning of the string. <br>
//!	    The application can returns FALSE for skipping the string <br>
//!	    drawing. <br>
  Standard_EXPORT   virtual  Standard_Boolean EndChar(const Quantity_Length X,const Quantity_Length Y) ;
  //! Calls when string drawing is ended (Normally the last call). <br>
  Standard_EXPORT   virtual  void EndString() ;


friend class MFT_FontManager;


  DEFINE_STANDARD_RTTI(MFT_TextManager)

protected:




private: 

  //! Returns the current drawn string min-max. <br>
  Standard_EXPORT   static  void MinMax(Quantity_Length& Xmin,Quantity_Length& Ymin,Quantity_Length& Xmax,Quantity_Length& Ymax) ;
  //! Returns the current drawn char encoding. <br>
  Standard_EXPORT   static  Standard_CString Encoding() ;



};





// other Inline functions and methods (like "C++: function call" methods)


#endif