Subversion Repositories Kolibri OS

Rev

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

Rev 7225 Rev 7226
Line 4... Line 4...
4
:struct _tabs
4
:struct _tabs
5
{
5
{
6
	int x,y,w,h;
6
	int x,y,w,h;
7
	int active_tab;
7
	int active_tab;
-
 
8
	int c;
8
	void draw_button();
9
	void draw_button();
9
	int click();
10
	int click();
10
	void draw_wrapper();
11
	void draw_wrapper();
11
};
12
};
Line 23... Line 24...
23
	DrawBar(x+1, y+h+1, w-2, 2, system.color.work_dark); //"shadow"
24
	DrawBar(x+1, y+h+1, w-2, 2, system.color.work_dark); //"shadow"
Line 24... Line 25...
24
 
25
 
25
	DrawBar(x, y+TAB_HEIGHT-1, w, 1, color_light_border);
26
	DrawBar(x, y+TAB_HEIGHT-1, w, 1, color_light_border);
-
 
27
	DrawBar(x, y+TAB_HEIGHT, w, 1, color_light);
-
 
28
 
26
	DrawBar(x, y+TAB_HEIGHT, w, 1, color_light);
29
	c = y + TAB_HEIGHT;
Line 27... Line 30...
27
}
30
}
28
 
31
 
29
:void _tabs::draw_button(dword xx,yy, but_id, text)
32
:void _tabs::draw_button(dword xx, but_id, text)
30
{
33
{
31
	dword col_bg, col_text;
-
 
Line 32... Line 34...
32
	dword ww=strlen(text)*8, hh=TAB_HEIGHT;
34
	dword col_bg, col_text;
33
	yy -= hh;
35
	dword ww=strlen(text)*8, hh=TAB_HEIGHT;
34
 
36
 
35
	if (but_id==active_tab)
37
	if (but_id==active_tab)
Line 41... Line 43...
41
	{
43
	{
42
		col_bg=0xC3A1B7;
44
		col_bg=0xC3A1B7;
43
		col_text=0x333333;
45
		col_text=0x333333;
44
	} 
46
	} 
45
	DefineHiddenButton(xx,yy, ww-1,hh-1, but_id);
47
	DefineHiddenButton(xx,y, ww-1,hh-1, but_id);
46
	WriteText(xx, yy+6, 0x90, col_text, text);
48
	WriteText(xx, y+6, 0x90, col_text, text);
47
	DrawBar(xx, yy+hh-3, ww, 3, col_bg);
49
	DrawBar(xx, y+hh-3, ww, 3, col_bg);
48
}
50
}
49
 
51
 
Line 50... Line 52...
50
:int _tabs::click(int N)
52
:int _tabs::click(int N)
51
{
53
{
52
	if (N==active_tab) return false;
54
	if (N==active_tab) return false;