Subversion Repositories Kolibri OS

Rev

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

Rev 7495 Rev 7503
Line 5... Line 5...
5
char debuf[50] = "";
5
char debuf[50] = "";
6
 
6
 
7
 
7
 
Line 8... Line -...
8
// ïî÷åìó-òî íå áûëî â ñòàíäàðòíîé áèáëèîòåêå
-
 
9
void kos_DrawLine( Word x1, Word y1, Word x2, Word y2, Dword colour, Dword invert )
8
void kos_DrawRegion(Word x, Word y,Word width, Word height, Dword color1, Word invert)
10
{
9
{
11
	Dword arg1, arg2, arg3;
10
	kos_DrawLine(x,y,x+width-2,y,color1,invert);
12
 
-
 
13
	//
-
 
14
	arg1 = ( x1 << 16 ) | x2;
11
	kos_DrawLine(x,y+1,x,y+height-1,color1,invert);
15
	arg2 = ( y1 << 16 ) | y2;
12
	kos_DrawLine(x+width-1,y,x+width-1,y+height-2,color1,invert);
16
	arg3 = (invert)?0x01000000:colour;
13
	kos_DrawLine(x+1,y+height-1,x+width-1,y+height-1,color1,invert);
17
	//
-
 
18
	__asm{
-
 
19
		mov eax, 38
-
 
20
		mov ebx, arg1
-
 
21
		mov ecx, arg2
-
 
22
		mov edx, arg3
-
 
23
		int 0x40
-
 
24
	}
-
 
25
}
14
}
Line 26... Line -...
26
 
-
 
27
// ïîõèùåíî èç áèáëèîòåêè ê C--
15
 
28
void DrawRegion(Dword x,Dword y,Dword width,Dword height,Dword color1)
16
void kos_DrawCutTextSmall(Word x, Word y, int areaWidth, Dword textColour, char *textPtr)
29
{
17
{
30
	kos_DrawBar(x,y,width,1,color1); //ïîëîñà ãîð ñâåðõó
18
	if (textPtr) {
31
	kos_DrawBar(x,y+height,width,1,color1); //ïîëîñà ãîð ñíèçó
19
		int textLen = strlen(textPtr);
32
	kos_DrawBar(x,y,1,height,color1); //ïîëîñà âåðò ñëåâà
20
		if (textLen*6 > areaWidth) textLen = areaWidth / 6;
-
 
21
		kos_WriteTextToWindow(x,y,0,textColour,textPtr,textLen);	
33
	kos_DrawBar(x+width,y,1,height+1,color1); //ïîëîñà âåðò ñïðàâà
22
	}
34
}
-
 
Line 35... Line 23...
35
 
23
}
36
 
24
 
37
// äà, ýòî áàÿí
25
// äà, ýòî áàÿí
38
int atoi(const char* string)
26
int atoi(const char* string)