Subversion Repositories Kolibri OS

Rev

Rev 648 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
648 andrew_pro 1
 
2
tx_no_show_text                 = 00000001b
675 andrew_pro 3
tx_redraw_all                   = 10000000b
648 andrew_pro 4
tx_redraw_all_off               = 01111111b
5
tx_special_redraw_on            = 00000100b
675 andrew_pro 6
tx_special_redraw_off           = 11111011b
648 andrew_pro 7
8
 
9
;********************craete Text**********************
10
;****************************************************
11
;IN
12
;pointer to parend
13
;pointer to Text's structure
14
;OUT
15
;pointer to initialized Texr's structure
16
align 4
17
18
 
19
20
 
21
      mov eax,[esp+8]
22
23
 
24
25
 
26
      call craete_control
27
28
 
29
      mov [eax],dword text
30
31
 
32
      mov esi,[PointerToStructureForText]
33
      mov edi,eax
34
      add edi,control_header_size
35
      rep movsb
36
37
 
38
39
 
40
      mov ecx,[ebx+6]   ;x
41
      mov edx,[ebx+10]  ;y
42
      mov esi,[ebx+14]  ;length x
43
      imul esi,6
44
      add ecx,border_width
45
      add edx,[skin_height]
46
      ;copy information to control
47
      mov [eax+24],ecx
48
      mov [eax+28],edx
49
      mov [eax+32],esi
50
      mov [eax+36],dword 9
51
52
 
53
54
 
55
;********************Draw Text**********************
56
;****************************************************
57
;IN
58
;pointer to control of text
59
;message
60
;OUT
61
;not returned value
62
align 4
63
64
 
65
66
 
67
      mov eax,[esp+8]
68
69
 
70
      mov esi,[esp+4]
71
      mov [PointerForText],esi
72
      ;copy control to local control
73
      add esi,control_header_size
74
      mov edi,dword Text
75
      mov ecx,tx_control_data_size
76
      rep movsb
77
78
 
79
 
80
      jne no_redraw_all_text
81
82
 
83
      mov bl,[Text.type]
84
      and bl,tx_no_show_text
85
      test bl,bl
86
      jnz no_redraw_all_text
87
88
 
89
90
 
91
92
 
93
      jne no_special_message_for_text
94
95
 
96
      mov bl,[Text.type]
97
      and bl,tx_special_redraw_on
98
      test bl,bl
99
      jz no_special_message_for_text
100
101
 
102
        and [Text.type],tx_special_redraw_off
103
104
 
105
106
 
107
      mov eax,[PointerForText]
108
      mov ebx,[eax+24]           ;x
109
      mov ecx,[eax+28]           ;y
110
      ;set current coordinats and sizes in zakladka
111
      mov [Text.x],ebx
112
      mov [Text.y],ecx
113
114
 
115
        mov     eax,48
116
        mov     ebx,3
117
        mov     ecx,dword pointer2
118
        mov     edx,40
119
        mcall
120
121
 
122
      mov al,[Text.type]
123
      and al,tx_redraw_all
124
      test al,al
125
      jz no_redraw_text_
126
127
 
128
129
 
130
       mov edi,[PointerForText]
131
       add edi,control_header_size
132
       mov ecx,2
133
       rep movsb
134
135
 
136
       mov ebx,[Text.x]
137
       shl ebx,16
138
       add ebx,[Text.y]
139
       mov ecx,[Text.color]
140
       mov edx,[Text.pointer]
141
       mov esi,[Text.length]
142
       mov edi,[pointer2+8]
143
       mcall
144
145
 
146
147
 
148
149
 
150