Subversion Repositories Kolibri OS

Rev

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

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