File: button_opengl.h

package info (click to toggle)
clanlib 0.5.4-1-6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 10,320 kB
  • ctags: 10,893
  • sloc: cpp: 76,056; xml: 3,281; sh: 2,961; perl: 1,204; asm: 837; makefile: 775
file content (63 lines) | stat: -rw-r--r-- 1,143 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef header_button_style_opengl
#define header_button_style_opengl

#include <ClanLib/gui.h>
#include <ClanLib/core.h>

class CL_Button;
class CL_StyleManager_OpenGL;
class CL_ResourceManager;
class CL_Font;

class CL_Button_OpenGL : public CL_ComponentStyle
{
public:
	CL_Button_OpenGL(
		CL_Button *button,
		CL_StyleManager_OpenGL *style);

	virtual ~CL_Button_OpenGL();

private:
	CL_Slot slot_paint;
	void on_paint();
	void on_paint_texture();
	void on_paint_anim();

	CL_Slot slot_mouse_enter;
	void on_mouse_enter();

	CL_Slot slot_mouse_leave;
	void on_mouse_leave();

	CL_Button *button;
	
	bool highlighted;

	int highlightSizeUpper;
	int highlightSizeLower;

	float highlightUpperRGB[3];
	float highlightLowerRGB[3];
	float highlightUpperDeltaRGB[3];
	float highlightLowerDeltaRGB[3];

	CL_Timer timer;
	CL_Slot slot_timer;
	void on_timer();

	CL_StyleManager_OpenGL *style;
	CL_ResourceManager *resources;

	CL_Font *font;

	CL_Surface *surface_up_left;
	CL_Surface *surface_up_center;
	CL_Surface *surface_up_right;

	CL_Surface *surface_down_left;
	CL_Surface *surface_down_center;
	CL_Surface *surface_down_right;
};

#endif