AppCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EText.h
Go to the documentation of this file.
1 #ifndef ETEXT_H
2 #define ETEXT_H
3 
4 #include <string>
5 #include <vector>
6 
7 #include "appcore/printertemplate/EDrawObject.h"
8 #include "appcore/printertemplate/EImageIface.h"
9 #include "appcore/printertemplate/EMPrinterTemplate.h"
10 
11 namespace EM
12 {
13  namespace PrinterTemplate
14  {
19  class EMPRINTERTEMPLATE_API EText: public EDrawObject
20  {
21  public:
22  EText( std::string name );
23  virtual ~EText();
24 
25  virtual void SetText( std::string text );
26  virtual void Draw( float moveY );
27  virtual EDrawObject* Clone();
28  virtual void ReadXML( EXMLNode *node );
29  virtual long Save( EXMLNode *node );
30  virtual float GetHeight();
31  virtual float GetWidth();
32  virtual void SetWidth( long width );
33  virtual void SetHeight( long height );
34  bool GetWrap();
35  void SetWrap(bool wrap);
36  std::vector<std::string> WrapLines( std::string text );
37 
38  std::string GetText();
39  std::string GetFont();
40  short int GetFontSize();
41  bool IsFontBold();
42  bool IsFontItalic();
43  bool IsFontUnderline();
44  unsigned long GetForeColour();
45  unsigned long GetBackColour();
46  std::string GetAlign();
47  Alignement GetAlignment();
48 
49  void SetFont( const std::string &font );
50  void SetFontSize( short int fontSize );
51  void SetIsFontBold( bool fontBold );
52  void SetIsFontItalic( bool fontItalic );
53  void SetIsFontUnderline( bool fontUnderline );
54  void SetForeColour( unsigned long foreColour );
55  void SetBackColour( unsigned long backColour );
56  void SetAlign( const std::string &align );
57  void SetAlignment( Alignement align );
58 
59  virtual bool VerticalMove();
60  virtual long GetContentWidth();
61 
62  protected:
63  void SaveCommonTextAttributes( EXMLNode *node );
64 
65  private:
66  class DataClass;
67  DataClass *d;
68  };
69  }
70 }
71 
72 #endif
EEventTripTicketPr __EDATAPTR d
Definition: EEventTripTicket.h:96
#define EMPRINTERTEMPLATE_API
Definition: EMPrinterTemplate.h:9
Alignement
Definition: EImageIface.h:7
virtual CardEvent __EDATAPTR Clone()
__ECLASS DataClass
Definition: EEventUpdateCustomerData.h:35
SYSTEM INCLUDES.
Definition: CardFacadeManagerXML.h:6