Subversion Repositories Kolibri OS

Rev

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

Rev 7806 Rev 7906
Line 1... Line -...
1
#define TAB_PADDING 15
-
 
-
 
1
#ifndef TAB_PADDING
2
#define TAB_HEIGHT 28
2
#define TAB_PADDING 15
-
 
3
#endif
-
 
4
 
3
 
5
#define TAB_HEIGHT 28
Line 4... Line 6...
4
:struct _tabs
6
 
5
{
7
:struct _tabs
6
	int active_tab;
8
{
7
	int x,y,w,h;
9
	int active_tab;
8
	void draw_button();
10
	int x,y,w,h;
9
	int click();
11
	dword draw_button();
10
	void draw_wrapper();
12
	int click();
11
};
13
	void draw_wrapper();
Line 12... Line 14...
12
 
14
};
13
:void _tabs::draw_wrapper()
15
 
14
{
16
:void _tabs::draw_wrapper()
15
	DrawRectangle(x,y+TAB_HEIGHT,w-1,h-TAB_HEIGHT, sc.work_graph);
17
{
16
	DrawRectangle(x+1,y+1+TAB_HEIGHT,w-3,h-2-TAB_HEIGHT, sc.work_light);
18
	DrawRectangle(x,y+TAB_HEIGHT,w-1,h-TAB_HEIGHT, sc.work_graph);
Line 17... Line 19...
17
}
19
	DrawBar(x+1,y+1+TAB_HEIGHT,w-3,1, sc.work_light);
18
 
20
}
19
:void _tabs::draw_button(dword xx, but_id, text)
21
 
20
{
22
:dword _tabs::draw_button(dword xx, but_id, text)
Line 21... Line 23...
21
	dword col_bg, col_text;
23
{
Line 34... Line 36...
34
	DefineHiddenButton(xx-2,y, ww-1+4,hh-1, but_id);
36
	} 
35
	WriteText(xx, y+6, 0x90, col_text, text);
37
	DefineHiddenButton(xx-2,y, ww-1+4,hh-1, but_id);
36
	DrawBar(xx, y+hh-3, ww, 3, col_bg);
38
	WriteText(xx, y+6, 0x90, col_text, text);
37
	//DrawStandartCaptButton(xx, y, but_id, text); //GetFreeButtonId()
39
	DrawBar(xx, y+hh-3, ww, 3, col_bg);
38
}
40
	//DrawStandartCaptButton(xx, y, but_id, text); //GetFreeButtonId()
-
 
41
	return xx;
39
 
42
}
Line 40... Line 43...
40
:int _tabs::click(int N)
43
 
41
{
44
:int _tabs::click(int N)
42
	if (N==active_tab) return false;
45
{