7fd59977 |
1 | // File: OpenGl_textzoomable.cxx |
2 | // Created: 08.10.09 |
3 | // Author: Paul Supryatkin |
4 | // Copyright: Open CASCADE 2009 |
5 | |
6 | #include <stddef.h> |
7 | #include <stdio.h> |
8 | |
9 | #include <OpenGl_tgl_all.hxx> |
10 | |
11 | #include <OpenGl_cmn_varargs.hxx> |
12 | #include <OpenGl_telem_attri.hxx> |
13 | #include <OpenGl_tsm.hxx> |
14 | #include <OpenGl_telem.hxx> |
15 | #include <OpenGl_telem_inquire.hxx> |
16 | #include <OpenGl_Memory.hxx> |
17 | |
18 | static TStatus TextFontAspectDisplay( TSM_ELEM_DATA, Tint, cmn_key* ); |
19 | static TStatus TextFontAspectAdd( TSM_ELEM_DATA, Tint, cmn_key* ); |
20 | |
21 | static TStatus (*MtdTbl[])( TSM_ELEM_DATA, Tint, cmn_key* ) = |
22 | { |
23 | 0, /* PickTraverse */ |
24 | TextFontAspectDisplay, |
25 | TextFontAspectAdd, |
26 | 0, /* Delete */ |
27 | 0, |
28 | 0 /* Inquire */ |
29 | }; |
30 | |
31 | MtblPtr |
32 | TelTextFontAspectInitClass( TelType *el ) |
33 | { |
34 | *el = TelTextFontAspect; |
35 | return MtdTbl; |
36 | } |
37 | |
38 | static TStatus |
39 | TextFontAspectDisplay( TSM_ELEM_DATA data, Tint n, cmn_key *k ) |
40 | { |
41 | CMN_KEY key; |
42 | |
43 | key.id = TelTextFontAspect; |
44 | key.data.ldata = data.ldata; |
45 | TsmSetAttri( 1, &key ); |
46 | return TSuccess; |
47 | } |
48 | |
49 | static TStatus |
50 | TextFontAspectAdd( TSM_ELEM_DATA d, Tint n, cmn_key *k ) |
51 | { |
52 | ((tsm_elem_data)(d.pdata))->ldata = k[0]->data.ldata; |
53 | return TSuccess; |
54 | } |
55 | |