Subversion Repositories Kolibri OS

Rev

Rev 7617 | Rev 7908 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7617 Rev 7648
Line 41... Line 41...
41
double *points;
41
double *points;
42
Dword point_count = 0;
42
Dword point_count = 0;
43
double x1,y1,x2,y2;
43
double x1,y1,x2,y2;
44
char *funct = NULL;
44
char *funct = NULL;
Line 45... Line 45...
45
 
45
 
46
char edit_path[1024];
46
char edit_path[256];
47
//Dword editbox_y = WND_H - 16, editbox_w = WND_W - 70;
47
edit_box mybox = {0,92,WND_H-16-32,0xffffff,0x94AECE,0,0x808080,0x10000000,
48
edit_box mybox = {0,9*8-5,WND_H - 16-32,0xffffff,0x94AECE,0,0x808080,0,sizeof(edit_path),0,(dword)&edit_path, 0, 0}; //100000000000010b}; 
-
 
Line 49... Line 48...
49
 
48
	sizeof(edit_path)-1,0,(dword)&edit_path, 0, 0};
Line 50... Line 49...
50
 
49
 
Line 378... Line 377...
378
 
377
 
379
	int i,j,k;
378
	int i,j,k;
380
	double d;
379
	double d;
Line 381... Line 380...
381
	Dword filesize, num_number;
380
	Dword filesize, num_number;
382
 
-
 
383
	double *p2;
-
 
384
 
-
 
Line 385... Line 381...
385
	if (edit_path[0] == '\0')
381
 
386
		return 0;
382
	double *p2=0;
387
 
383
 
388
	// get file size
384
	// get file size
Line 395... Line 391...
395
	Dword rr = kos_FileSystemAccess( &(fileInfo) ); // â CKosFile íåò îïðåäåëåíèÿ ðàçìåðà
391
	Dword rr = kos_FileSystemAccess( &(fileInfo) ); // â CKosFile íåò îïðåäåëåíèÿ ðàçìåðà
396
	sprintf(debuf, "getsize: %U\n", rr);
392
	sprintf(debuf, "getsize: %U\n", rr);
397
	rtlDebugOutString(debuf);
393
	rtlDebugOutString(debuf);
398
	if (rr != 0)
394
	if (rr != 0)
399
	{
395
	{
400
		kos_WriteTextToWindow(10,10,0,0x00,(char*)er_file_not_found,strlen(er_file_not_found));
396
		kos_WriteTextToWindow(10,10,0x90,0xFF0000,(char*)er_file_not_found,strlen(er_file_not_found));
401
		return 0;
397
		return 0;
402
	}
398
	}
Line 403... Line 399...
403
 
399
 
404
	filesize = bdvk.size_low;
400
	filesize = bdvk.size_low;
Line 550... Line 546...
550
}
546
}
Line 551... Line 547...
551
 
547
 
552
void draw_window(void)
548
void draw_window(void)
553
{
549
{
554
	double xx0=0.0, yy0=0.0;
-
 
555
	sProcessInfo info;
-
 
556
	Dword wi, he;
-
 
557
	void *p;
-
 
558
 
-
 
559
	for (int i = 0; i < 1024; i++)
-
 
560
		info.rawData[i] = 0;
-
 
561
	kos_ProcessInfo(&info, 0xFFFFFFFF);
-
 
562
 
-
 
563
	p = info.rawData + 42;			// magic
-
 
564
	wi = *(Dword *)(p);
-
 
565
	he = *(Dword *)((Byte *)p + 4);
-
 
566
 
-
 
567
	if (wi == 0) 
-
 
568
		wi = WND_W;
-
 
569
	if (he == 0)
-
 
570
		he = WND_H;
-
 
571
 
-
 
572
	mybox.top = he - 50;
-
 
Line 573... Line 550...
573
	mybox.width = wi - mybox.left - 80;
550
	double xx0=0.0, yy0=0.0;
574
 
551
 
575
	kos_WindowRedrawStatus(1);
552
	kos_WindowRedrawStatus(1);
Line -... Line 553...
-
 
553
	kos_DefineAndDrawWindow(100,80,WND_W,WND_H, 0x33,0xFFFFFF,0,0,(Dword)full_head);
-
 
554
	kos_WindowRedrawStatus(2);
-
 
555
 
-
 
556
	sProcessInfo info;
-
 
557
	kos_ProcessInfo(&info, 0xFFFFFFFF);
-
 
558
	int cWidth = info.processInfo.width - 9;
-
 
559
	int cHeight = info.processInfo.height - kos_GetSkinHeight() - 4;
-
 
560
 
576
	kos_DefineAndDrawWindow(10,40,WND_W,WND_H, 0x33,0xFFFFFF,0,0,(Dword)full_head);
561
	mybox.top = cHeight - 50;
Line 577... Line 562...
577
	kos_WindowRedrawStatus(2);
562
	mybox.width = cWidth - mybox.left - 80;
578
 
563
 
579
	if (info.rawData[70]&0x04) return; //íè÷åãî íå äåëàòü åñëè îêíî ñõëîïíóòî â çàãîëîâîê
564
	if (info.processInfo.status_window&0x04) return; //draw nothing if window is rolled-up
-
 
565
 
580
 
566
	if (point_count == 0 && funct == NULL)
581
	if (point_count == 0 && funct == NULL)
567
	{
582
	{
568
		kos_WriteTextToWindow((cWidth - 8 * strlen(empty_text))/2,cHeight/2-25,0x90,
583
		kos_WriteTextToWindow((wi - 6 * strlen(empty_text))/2,he/2,0,0x000000,(char *)empty_text,strlen(empty_text));
569
			0x000000,(char *)empty_text,strlen(empty_text));
584
	}
570
	}
Line 585... Line 571...
585
	else
571
	else
Line 586... Line 572...
586
	{
572
	{
587
		drawFunction(&fu, coord(10, 20), coord(id(wi - 20), id(he - 70)),
-
 
588
							coord(x1,y1), coord(x2,y2), 0x00ff0000);
-
 
589
 
-
 
Line 590... Line 573...
590
	}
573
		drawFunction(&fu, coord(10, 20), coord(id(cWidth - 20), id(cHeight - 70)),
591
 
-
 
Line -... Line 574...
-
 
574
							coord(x1,y1), coord(x2,y2), 0x00ff0000);
-
 
575
 
592
	kos_WriteTextToWindow(4, mybox.top + 4, 0, 0, (char*)str_filename, strlen(str_filename));
576
	}
Line 593... Line 577...
593
 
577
 
594
	if ((void*)edit_box_draw != NULL)
578
	kos_WriteTextToWindow(15, mybox.top + 4, 0x90, 0x000000, (char*)str_filename, strlen(str_filename));
595
		edit_box_draw((DWORD)&mybox);
579