Subversion Repositories Kolibri OS

Rev

Rev 8153 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8153 maxcodehac 1
#include 
2
#include 
3
#include 
4
 
5
using namespace Kolibri;
6
 
7
const char header[] = "Title";
8
const char string[] = "Exit";
9
 
10
bool KolibriOnStart(TStartData &kos_start, TThreadData th)
11
{
12
	kos_start.Left = 10;
13
	kos_start.Top = 40;
14
	kos_start.Width = 150;
15
	kos_start.Height = 80;
16
	kos_start.WinData.WindowColor = 0xFFFFFF;
17
	kos_start.WinData.Title = header;
18
	return true;
19
}
20
 
21
void KolibriOnPaint(void)
22
{
8165 IgorA 23
	DrawButton(1,0xB0B0B0, 10,10,50,20);
8153 maxcodehac 24
	DrawText(15, 15, 0, string);
8165 IgorA 25
	DrawButton(2,0xff0000, 10,40,50,20);
26
	DrawButton(3,0x00ff00, 70,10,50,20);
27
	DrawButton(4,0x0000ff, 70,40,50,20);
8153 maxcodehac 28
}
8165 IgorA 29
 
30
void KolibriOnButton(long id, TThreadData th)
31
{
32
	switch(id){
33
	case 2:
34
		SetWindowCaption("Red");
35
		break;
36
	case 3:
37
		SetWindowCaption("Green");
38
		break;
39
	case 4:
40
		SetWindowCaption("Blue");
41
		//break;
42
	};
43
}
44
/*
8153 maxcodehac 45
bool KolibriOnClose(TThreadData th)
46
{
47
	return true;
48
}
49
int KolibriOnIdle(TThreadData th)
50
{
51
	return -1;
52
}
53
void KolibriOnSize(int window_rect[], TThreadData th) {}
54
void KolibriOnKeyPress(TThreadData th)
55
{
56
	GetKey();
57
}
58
void KolibriOnMouse(TThreadData th) {}
8165 IgorA 59
*/