Subversion Repositories Kolibri OS

Rev

Rev 3464 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3464 Rev 3466
Line 33... Line 33...
33
struct lines{
33
struct lines{
34
	int visible, all, first, column_max;
34
	int visible, all, first, column_max;
35
};
35
};
Line 36... Line 36...
36
 
36
 
37
int	mouse_dd;
37
int	mouse_dd;
38
edit_box edit1= {250,207,16,0xffffff,0x94AECE,0xffffff,0xffffff,0,sizeof(editURL),#editURL,#mouse_dd,2,19,19};
38
edit_box address_box= {250,207,16,0xffffff,0x94AECE,0xffffff,0xffffff,0,sizeof(editURL),#editURL,#mouse_dd,2,19,19};
Line 39... Line 39...
39
scroll_bar scroll1 = { 18,200,398, 44,18,0,115,15,0,0xeeeeee,0xD2CED0,0x555555,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1};
39
scroll_bar scroll1 = { 18,200,398, 44,18,0,115,15,0,0xeeeeee,0xD2CED0,0x555555,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1};
40
 
40
 
Line 67... Line 67...
67
	if (!URL) strcpy(#URL, "/sys/home.htm");
67
	if (!URL) strcpy(#URL, "/sys/home.htm");
68
	strcpy(#editURL, #URL);
68
	strcpy(#editURL, #URL);
Line 69... Line 69...
69
	
69
	
70
	Form.width=WIN_W;
70
	Form.width=WIN_W;
71
	Form.height=WIN_H;
-
 
72
	
71
	Form.height=WIN_H;
73
	SetElementSizes();
-
 
74
 
72
	SetElementSizes();
Line 75... Line 73...
75
	WB1.OpenPage();
73
	WB1.OpenPage();
76
 
74
 
77
	SetEventMask(0x27);
75
	SetEventMask(0x27);
Line 90... Line 88...
90
				};*/
88
				};*/
Line 91... Line 89...
91
				
89
				
92
				btn=GetProcessSlot(Form.ID); 
90
				btn=GetProcessSlot(Form.ID); 
Line 93... Line 91...
93
				IF (btn<>GetActiveProcess()) break; //åñëè îêíî íå àêòèâíî íà ñîáûòèÿ ìûøè íå ðåàãèðóåì
91
				IF (btn<>GetActiveProcess()) break; //åñëè îêíî íå àêòèâíî íà ñîáûòèÿ ìûøè íå ðåàãèðóåì
Line 94... Line 92...
94
 
92
 
Line 95... Line 93...
95
				edit_box_mouse stdcall (#edit1);
93
				edit_box_mouse stdcall (#address_box);
96
 
94
 
Line 148... Line 146...
148
				}
146
				}
149
				break;
147
				break;
150
			case evKey:
148
			case evKey:
151
				key = GetKey();
149
				key = GetKey();
Line 152... Line 150...
152
				
150
				
153
				if (edit1.flags & 0b10) SWITCH(key) //åñëè àêòèâíà ñòðîêà àäðåñà èãíîðèðóåì íåêîòîðûå êíîïêè
151
				if (address_box.flags & 0b10) SWITCH(key) //åñëè àêòèâíà ñòðîêà àäðåñà èãíîðèðóåì íåêîòîðûå êíîïêè
Line 154... Line 152...
154
					{ CASE 52: CASE 53: CASE 54: goto _EDIT_MARK; } 
152
					{ CASE 52: CASE 53: CASE 54: goto _EDIT_MARK; } 
Line 155... Line 153...
155
 
153
 
156
				WB1.Scan(key);
154
				WB1.Scan(key);
157
				
155
				
158
				_EDIT_MARK:
156
				_EDIT_MARK:
159
				if (key<>0x0d) && (key<>183) && (key<>184) && (key<>173) {EAX=key<<8; edit_box_key stdcall(#edit1);} //àäðåñíàÿ ñòðîêà
157
				if (key<>0x0d) && (key<>183) && (key<>184) && (key<>173) {EAX=key<<8; edit_box_key stdcall(#address_box);} //àäðåñíàÿ ñòðîêà
160
				break;
158
				break;
161
			case evReDraw:
159
			case evReDraw:
Line 174... Line 172...
174
	}
172
	}
175
}
173
}
Line 176... Line 174...
176
 
174
 
177
void SetElementSizes()
175
void SetElementSizes()
178
{
176
{
179
	edit1.width = Form.width-266;
177
	address_box.width = Form.width-266;
180
	WB1.top = 44;
178
	WB1.top = 44;
181
	WB1.width = Form.cwidth - 4;
179
	WB1.width = Form.width - 10 - scroll1.size_x;
182
	WB1.height = Form.cheight - WB1.top;
180
	WB1.height = Form.height - WB1.top - GetSkinHeight() - 4;
183
	WB1.line_h = 10;
181
	WB1.line_h = 10;
184
	lines.column_max = WB1.width - 30 / 6;
182
	lines.column_max = WB1.width - 30 / 6;
185
	lines.visible = WB1.height - 3 / WB1.line_h - 2;
183
	lines.visible = WB1.height - 3 / WB1.line_h - 2;
Line 186... Line 184...
186
}
184
}
187
 
185
 
188
 
186
 
189
void Draw_Window()
187
void Draw_Window()
Line 190... Line 188...
190
{
188
{
191
	int j;
189
	int j;
192
	DefineAndDrawWindow(215,100,WIN_W,WIN_H,0x73,0x00E4DFE1,0,0);
190
	DefineAndDrawWindow(215,100,WIN_W,WIN_H,0x73,0xE4DFE1,0,0);
193
 
191