Subversion Repositories Kolibri OS

Rev

Rev 7521 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7521 Rev 7977
Line 1... Line 1...
1
#define TOIMAGE 1
1
#define TOIMAGE 1
2
#define TOCANVAS 2
2
#define TOCANVAS 2
Line 3... Line 3...
3
 
3
 
4
 
4
 
5
struct Tool {
5
struct TOOL {
6
	int id;
6
	int id;
7
	dword cursor;
7
	dword cursor;
8
	void (*activate)();
8
	void (*activate)();
9
	void (*deactivate)();
9
	void (*deactivate)();
10
	void (*onMouseEvent)(int x, int y, int lkm, int pkm);
10
	void (*onMouseEvent)(int x, int y, int lkm, int pkm);
11
	void (*onKeyEvent)(dword keycode);
11
	void (*onKeyEvent)(dword keycode);
Line 12... Line 12...
12
	void (*onCanvasDraw)();
12
	void (*onCanvasDraw)();
13
};
13
} tools[8];
14
 
-
 
Line 15... Line 14...
15
int previousTool = -1;
14
 
16
int currentTool = -1;
15
int previousTool = -1;
17
Tool tools[8];
16
int currentTool = -1;
18
 
17
 
Line 106... Line 105...
106
		tools[index].activate();
105
		tools[index].activate();
Line 107... Line 106...
107
 
106
 
108
	Cursor.Restore();
107
	Cursor.Restore();
109
	if (wrapper.hovered()) SetCursor();
108
	if (wrapper.hovered()) SetCursor();
-
 
109
	DrawCanvas();
110
	DrawCanvas();
110
	DrawLeftPanelSelection();
Line 111... Line 111...
111
}
111
}
112
 
112
 
113
void SetCursor()
113
void SetCursor()