OCC22354 Bug in Overlay Text rendering
[occt.git] / src / OpenGl / OpenGl_vind.cxx
CommitLineData
7fd59977 1/***********************************************************************
2
3FONCTION :
4----------
5File OpenGl_vind :
6
7
8REMARQUES:
9----------
10
11
12HISTORIQUE DES MODIFICATIONS :
13--------------------------------
14xx-xx-xx : xxx ; Creation.
1520-02-96 : FMN ; Suppression code inutile:
1601-04-96 : CAL ; Integration MINSK portage WNT
1705-01-98 : FMN ; Suppression WNT inutile
18
19************************************************************************/
20
21/*----------------------------------------------------------------------*/
22/*
23* Includes
24*/
25
26#include <OpenGl_tgl_all.hxx>
27
28#include <stddef.h>
29#include <stdio.h>
30
31#include <OpenGl_cmn_varargs.hxx>
32#include <OpenGl_tsm.hxx>
33#include <OpenGl_telem.hxx>
34#include <OpenGl_telem_view.hxx>
35#include <OpenGl_telem_inquire.hxx>
36#include <OpenGl_telem_attri.hxx>
37
38/*----------------------------------------------------------------------*/
39/*
40* Fonctions statiques
41*/
42
43static TStatus ViewIndexDisplay( TSM_ELEM_DATA, Tint, cmn_key* );
44static TStatus ViewIndexAdd( TSM_ELEM_DATA, Tint, cmn_key* );
45static TStatus ViewIndexPrint( TSM_ELEM_DATA, Tint, cmn_key* );
46static TStatus ViewIndexInquire( TSM_ELEM_DATA, Tint, cmn_key* );
47
48static TStatus (*MtdTbl[])( TSM_ELEM_DATA, Tint, cmn_key* ) =
49{
50 ViewIndexDisplay, /* PickTraverse */
51 ViewIndexDisplay,
52 ViewIndexAdd,
53 0, /* Delete */
54 ViewIndexPrint,
55 ViewIndexInquire
56};
57
58/*----------------------------------------------------------------------*/
59
60MtblPtr
61TelViewIndexInitClass( TelType *el )
62{
63 *el = TelViewIndex;
64 return MtdTbl;
65}
66
67/*----------------------------------------------------------------------*/
68
69static TStatus
70ViewIndexAdd( TSM_ELEM_DATA d, Tint n, cmn_key *k )
71{
72 ((tsm_elem_data)(d.pdata))->ldata = k[0]->data.ldata;
73
74 return TSuccess;
75}
76
77/*----------------------------------------------------------------------*/
78
79static TStatus
80ViewIndexDisplay( TSM_ELEM_DATA data, Tint n, cmn_key *k )
81{
82 CMN_KEY kk;
83
84 kk.id = TelViewIndex;
85 kk.data.ldata = data.ldata;
86 TsmSetAttri( 1, &kk );
87 if( k[0]->id == TOn )
88 TelSetViewIndex( TglActiveWs, data.ldata );
89 return TSuccess;
90}
91
92/*----------------------------------------------------------------------*/
93
94static TStatus
95ViewIndexPrint( TSM_ELEM_DATA data, Tint n, cmn_key *k )
96{
97 fprintf( stdout, "TelViewIndex. Value = %d\n", data.ldata);
98 fprintf( stdout, "\n" );
99
100 return TSuccess;
101}
102
103/*----------------------------------------------------------------------*/
104
105static TStatus
106ViewIndexInquire( TSM_ELEM_DATA data, Tint n, cmn_key *k )
107{
108 Tint i;
109
110 for( i = 0; i < n; i++ )
111 {
112 switch( k[i]->id )
113 {
114 case INQ_GET_SIZE_ID:
115 {
116 k[i]->data.ldata = sizeof( Tint );
117 break;
118 }
119 case INQ_GET_CONTENT_ID:
120 {
121 TEL_INQ_CONTENT *c;
122 Teldata *w;
123
124 c = (TEL_INQ_CONTENT*)(k[i]->data.pdata);
125 w = c->data;
126 c->act_size = 0;
127 w->idata = data.ldata;
128 break;
129 }
130 }
131 }
132
133 return TSuccess;
134}
135/*----------------------------------------------------------------------*/