Subversion Repositories Kolibri OS

Rev

Rev 7538 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7538 leency 1
 
2
;                      int num_buttons, const char* buttons[]);
3
4
 
5
	pushad
6
	cmp	[num_strings],1
7
	je	@f
8
	m2m	[errmess0], strErrorExc
9
	jmp	.l1
10
       @@:
11
	mov	ebx,[strings]
12
	m2m	[errmess0], dword [ebx]
13
       .l1:
14
	mcall	51,1,threadSayErr,stackDlg
15
	popad
16
	mov	eax,1
17
	ret
18
endp
19
20
 
21
	pushad
22
	m2m	[errmess0],[str]
23
	mcall	51,1,threadSayErr,stackDlg
24
	popad
25
	ret
26
endp
27
28
 
29
 
30
	mcall	40, 000111b+0C000000h
31
32
 
33
	mcall	12, 1
34
	mcall	48, 3, sc, sizeof.system_colors
35
	mov	edx, [sc.work]
36
37
 
38
	mcall 0, <220,420>, <220,110>, , , title
39
40
 
41
	or	ecx,90000000h
42
	mov	edx,[errmess0]
43
	mcall 4, <15,11>
44
45
 
46
	mov	ecx,[sc.work_button_text]
47
	or	ecx,90000000h
48
	mcall 4, <147,51>, , strOk
49
50
 
51
52
 
53
	mcall	10
54
	cmp	eax, 1
55
	je	.wm_redraw
56
	cmp	eax, 2
57
	je	.wm_key
58
	cmp	eax, 3
59
	je	.wm_button
60
	jmp	.still
61
62
 
63
	mcall	17
64
65
 
66
	je	.exit
67
	jmp	.still
68
69
 
70
	mcall	2
71
	jmp	.still
72
.exit:
73
	mcall	-1
74
endp
75
76
 
77
;-------------------------------------------------------------------------------
78
;-------------------------------------------------------------------------------
79
    ; "enter password" dialog for KFar
80
;password_dlg:
81
;        dd      1       ; use standard dialog colors
82
;        dd      -1      ; center window by x
83
;        dd      -1      ; center window by y
84
;.width  dd      ?       ; width (will be filled according to current console width)
85
;        dd      2       ; height
86
;        dd      4, 2    ; border size
87
;        dd      aEnterPasswordTitle     ; title
88
;        dd      ?       ; colors (will be set by KFar)
89
;        dd      0       ; used internally by dialog manager, ignored
90
;        dd      0, 0    ; reserved for DlgProc
91
;        dd      2       ; 2 controls
92
;; the string "enter password"
93
;        dd      1       ; type: static
94
;        dd      1,0     ; upper-left position
95
;.width1 dd      ?,0     ; bottom-right position
96
;        dd      aEnterPassword  ; data
97
;        dd      0       ; flags
98
;; editbox for password
99
;        dd      3       ; type: edit
100
;        dd      1,1     ; upper-left position
101
;.width2 dd      ?,0     ; bottom-right position
102
;        dd      password_data   ; data
103
;        dd      2Ch     ; flags
104
105
 
106
 
107
 
108
	pushad
109
	mov	ebx,[dlgInfo]
110
	mov	ebx,[ebx+25*4]
8900 dunkaist 111
	add	ebx, 12	; password_ansi
112
	mov	[edtPassword+9*4], ebx	; text
113
	mov	[stateDlg], 0
7538 leency 114
	mcall	51,1,threadDialogBox,stackDlg
115
116
 
117
    @@: cmp	[stateDlg],0
118
	jne	@f
119
	mcall	5,1
120
	jmp	@b
121
     @@:
122
	popad
123
	cmp	[stateDlg], 1
124
	jne	@f
125
	xor	eax, eax
126
	ret
127
    @@:
128
	or	eax, -1
129
	ret
130
endp
131
132
 
133
134
 
135
	xor	eax,eax
136
	mov	dword[edtPassword.size], eax
137
	mov	dword[edtPassword.pos], eax
138
139
 
140
	mcall	12, 1
141
	mcall	48, 3, sc, sizeof.system_colors
142
	mov	edx, [sc.work]
143
	or	edx, 0x33000000
144
	mcall	0, <200,320>, <200,140>, , , title
145
146
 
147
	stdcall [edit_box_draw],edtPassword
148
149
 
150
 
151
	or	ecx,90000000h
152
	mcall 4, <56,12>, , strGetPass
153
154
 
155
	mov	ecx,[sc.work_button_text]
156
	or	ecx,90000000h
157
	mcall 4, <103,79>, , strOk
158
159
 
160
	mov	ecx,[sc.work_button_text]
161
	or	ecx,90000000h
162
	mcall 4, <182,79>, , strCancel
163
164
 
165
 
166
167
 
168
	mcall	10
169
	cmp	eax, 1
170
	je	.wm_redraw
171
	cmp	eax, 2
172
	je	.wm_key
173
	cmp	eax, 3
174
	je	.wm_button
175
	cmp	eax, 6
176
	je	.wm_mouse
177
178
 
179
180
 
181
	mcall	2
182
	stdcall [edit_box_key],edtPassword
183
	jmp	.still
184
185
 
186
 
187
	mcall	17
188
189
 
190
	jne	@f
191
	mov	[stateDlg],1
192
	jmp	.exit
193
    @@:
194
195
 
196
	jne	 .still
197
	mov	[stateDlg],2
198
	jmp	.exit
199
200
 
201
	stdcall [edit_box_mouse],edtPassword
202
203
 
204
 
205
206
 
207
	mcall	-1
208
endp
209