Subversion Repositories Kolibri OS

Rev

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

Rev 3458 Rev 3464
Line 26... Line 26...
26
int use_truetype = 0;
26
int use_truetype = 0;
27
char fontlol[64];
27
char fontlol[64];
Line 28... Line 28...
28
 
28
 
29
char editURL[sizeof(URL)],
29
char editURL[sizeof(URL)],
30
	page_links[12000],
30
	page_links[12000],
Line 31... Line 31...
31
	header[300];
31
	header[2048];
32
 
32
 
33
struct lines{
33
struct lines{
Line 34... Line 34...
34
	int visible, all, first, column_max;
34
	int visible, all, first, column_max;
35
};
35
};
36
 
36
 
Line 37... Line 37...
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 edit1= {250,207,16,0xffffff,0x94AECE,0xffffff,0xffffff,0,sizeof(editURL),#editURL,#mouse_dd,2,19,19};
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}; //details in scroll_lib.h--
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};
Line 40... Line 40...
40
 
40
 
41
 
41
 
Line 42... Line 42...
42
proc_info Form;
42
proc_info Form;
43
#define WIN_W 640
43
#define WIN_W 640
Line 135... Line 135...
135
				}
135
				}
Line 136... Line 136...
136
 
136
 
137
				break;
137
				break;
138
			case evButton:
138
			case evButton:
139
				btn=GetButtonID();
139
				btn=GetButtonID();
140
				IF (btn==1)
140
				if (btn==1)
141
				{
141
				{
142
					KillProcess(downloader_id);
142
					KillProcess(downloader_id);
143
					ExitProcess();
143
					ExitProcess();
144
				}
144
				}
Line 154... Line 154...
154
					{ CASE 52: CASE 53: CASE 54: goto _EDIT_MARK; } 
154
					{ CASE 52: CASE 53: CASE 54: goto _EDIT_MARK; } 
Line 155... Line 155...
155
 
155
 
Line 156... Line 156...
156
				WB1.Scan(key);
156
				WB1.Scan(key);
157
				
157
				
158
				_EDIT_MARK:
158
				_EDIT_MARK:
159
				IF (key<>0x0d) && (key<>183) && (key<>184) && (key<>173) {EAX=key<<8; edit_box_key stdcall(#edit1);} //àäðåñíàÿ ñòðîêà
159
				if (key<>0x0d) && (key<>183) && (key<>184) && (key<>173) {EAX=key<<8; edit_box_key stdcall(#edit1);} //àäðåñíàÿ ñòðîêà
160
				break;
160
				break;
161
			case evReDraw:
161
			case evReDraw:
162
				Draw_Window();
162
				Draw_Window();
Line 176... Line 176...
176
 
176
 
177
void SetElementSizes()
177
void SetElementSizes()
178
{
178
{
179
	edit1.width=Form.width-266;
179
	edit1.width = Form.width-266;
180
	WB1.top=44;
180
	WB1.top = 44;
181
	WB1.width=Form.width-13;
181
	WB1.width = Form.cwidth - 4;
-
 
182
	WB1.height = Form.cheight - WB1.top;
182
	WB1.height=onTop(43,5);
183
	WB1.line_h = 10;
183
	lines.column_max = WB1.width - 30 / 6;
184
	lines.column_max = WB1.width - 30 / 6;
184
	lines.visible = WB1.height - 3 / 10 - 2;
185
	lines.visible = WB1.height - 3 / WB1.line_h - 2;
Line 185... Line 186...
185
}
186
}
186
 
187
 
187
 
188
 
188
void Draw_Window()
189
void Draw_Window()
Line 189... Line 190...
189
{
190
{
190
	int j;
191
	int j;
191
	DefineAndDrawWindow(215,100,WIN_W,WIN_H,0x73,0x00E4DFE1,0,0);
192
	DefineAndDrawWindow(215,100,WIN_W,WIN_H,0x73,0x00E4DFE1,0,0);
192
 
193
 
193
	GetProcessInfo(#Form, SelfInfo);
194
	GetProcessInfo(#Form, SelfInfo);
194
	if (Form.status_window>2) //åñëè ñâåðíóòî â çàãîëîâîê, íè÷åãî íå ðèñóåì
195
	if (Form.status_window>2)
195
	{
196
	{
196
		DrawTitle(#header);
197
		DrawTitle(#header);
Line 197... Line 198...
197
		return;
198
		return;
198
	}
199
	}
Line 199... Line 200...
199
	if (Form.height<120) MoveSize(OLD,OLD,OLD,120);
200
	if (Form.height<120) MoveSize(OLD,OLD,OLD,120);
200
	if (Form.width<280) MoveSize(OLD,OLD,280,OLD);
201
	if (Form.width<280) MoveSize(OLD,OLD,280,OLD);
201
	
202
	
202
	PutPaletteImage(#toolbar,200,42,0,0,8,#toolbar_pal);
203
	PutPaletteImage(#toolbar,200,42,0,0,8,#toolbar_pal);
203
	if (GetProcessSlot(downloader_id)<>0) _PutImage(88,10, 24,24, #stop_btn);
204
	if (GetProcessSlot(downloader_id)<>0) _PutImage(88,10, 24,24, #stop_btn);
204
	
205
	
205
	DrawBar(200,0,onLeft(200,9),43,0xE4DFE1); //çàêðàøèâàåì ôîí ïîä òóëáàðîì
206
	DrawBar(200,0,Form.cwidth-200,43,0xE4DFE1);
206
	DrawBar(0,42,onLeft(5,4),1,0xE2DBDC); //âûïóêëîñòü
207
	DrawBar(0,42,Form.cwidth,1,0xE2DBDC);
207
	DrawBar(0,43,onLeft(5,4),1,0xD2CED0); //âûïóêëîñòü
208
	DrawBar(0,43,Form.cwidth,1,0xD2CED0);
Line 208... Line 209...
208
	for (j=0; j<5; j++) DefineButton(j*37+11, 7, 29, 29, 300+j+BT_HIDE, 0xE4DFE1);
209
	for (j=0; j<5; j++) DefineButton(j*37+11, 7, 29, 29, 300+j+BT_HIDE, 0xE4DFE1);
209
	_PutImage(onLeft(57,0),14, 40,19, #URLgoto);
210
	_PutImage(Form.cwidth-48,14, 40,19, #URLgoto);
210
	DefineButton(onLeft(37,0),15, 18, 16, GOTOURL+BT_HIDE, 0xE4DFE1);
211
	DefineButton(Form.cwidth-28,15, 18, 16, GOTOURL+BT_HIDE, 0xE4DFE1);
211
	DefineButton(onLeft(56,0),15, 17, 16, SEARCHWEB+BT_HIDE, 0xE4DFE1);
212
	DefineButton(Form.cwidth-47,15, 17, 16, SEARCHWEB+BT_HIDE, 0xE4DFE1);
212
	DrawRectangle(205,14,onLeft(58,205),18,0x94AECE); //îáîäîê ïîëîñû àäðåñà
213
	DrawRectangle(205,14,Form.cwidth-205-49,18,0x94AECE); //around adress bar
213
	DrawRectangle(206,15,onLeft(59,205),16,0xE4ECF3);
214
	DrawRectangle(206,15,Form.cwidth-205-50,16,0xE4ECF3);
Line 214... Line -...
214
 
-
 
215
	SetElementSizes();
-
 
216
	WB1.ShowPage();
-
 
Line 217... Line 215...
217
	//tre();
215