File: XSymbolTextDefV3_3.cpp

package info (click to toggle)
cigi-ccl 3.3.3a%2Bsvn818-10
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 7,332 kB
  • sloc: cpp: 62,566; makefile: 541; ruby: 400; ansic: 313; sh: 68
file content (92 lines) | stat: -rw-r--r-- 1,872 bytes parent folder | download | duplicates (4)
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
// XSymbolTextDefV3_3.cpp: Body of the XSymbolTextDefV3_3 class.
//
//////////////////////////////////////////////////////////////////////

#include "XSymbolTextDefV3_3.h"

#include <stdio.h>

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

XSymbolTextDefV3_3::XSymbolTextDefV3_3()
{

}

XSymbolTextDefV3_3::~XSymbolTextDefV3_3()
{

}


void XSymbolTextDefV3_3::OnPacketReceived(CigiBasePacket *Packet)
{
   CigiSymbolTextDefV3_3 *InPckt = (CigiSymbolTextDefV3_3 *)Packet;

   printf("Symbol Text Definition:\n");

   printf("\tSymbol ID = %d\n",InPckt->GetSymbolID());

   printf("\tAlignment State = %d : ",InPckt->GetAlignment());
   switch(InPckt->GetAlignment())
   {
   case 0:
      printf("TopLeft\n");
      break;
   case 1:
      printf("TopCenter\n");
      break;
   case 2:
      printf("TopRight\n");
      break;
   case 3:
      printf("CenterLeft\n");
      break;
   case 4:
      printf("Center\n");
      break;
   case 5:
      printf("CenterRight\n");
      break;
   case 6:
      printf("BottomLeft\n");
      break;
   case 7:
      printf("BottomCenter\n");
      break;
   case 8:
      printf("BottomRight\n");
      break;
   default:
      printf("\n");
      break;
   }

   printf("\tOrientation State = %d : ",InPckt->GetOrientation());
   switch(InPckt->GetOrientation())
   {
   case 0:
      printf("LeftToRight\n");
      break;
   case 1:
      printf("TopToBottom\n");
      break;
   case 2:
      printf("RightToLeft\n");
      break;
   case 3:
      printf("BottomToTop\n");
      break;
   default:
      printf("\n");
      break;
   }

   printf("\tFont ID = %d\n",InPckt->GetFontID());
   printf("\tFont Size = %f\n",InPckt->GetFontSize());
   printf("\tText = %s\n",(InPckt->GetText()).c_str());

}