ClanLib
2.3.7
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
Sources
API
GUI
Providers
gui_theme_provider.h
Go to the documentation of this file.
1
/*
2
** ClanLib SDK
3
** Copyright (c) 1997-2011 The ClanLib Team
4
**
5
** This software is provided 'as-is', without any express or implied
6
** warranty. In no event will the authors be held liable for any damages
7
** arising from the use of this software.
8
**
9
** Permission is granted to anyone to use this software for any purpose,
10
** including commercial applications, and to alter it and redistribute it
11
** freely, subject to the following restrictions:
12
**
13
** 1. The origin of this software must not be misrepresented; you must not
14
** claim that you wrote the original software. If you use this software
15
** in a product, an acknowledgment in the product documentation would be
16
** appreciated but is not required.
17
** 2. Altered source versions must be plainly marked as such, and must not be
18
** misrepresented as being the original software.
19
** 3. This notice may not be removed or altered from any source distribution.
20
**
21
** Note: Some of the libraries ClanLib may link to may have additional
22
** requirements or restrictions.
23
**
24
** File Author(s):
25
**
26
** Magnus Norddahl
27
** Harry Storbacka
28
** Kenneth Gangstoe
29
** Mark Page
30
*/
31
34
35
#pragma once
36
37
#include "../api_gui.h"
38
39
class
CL_GUIThemePart
;
40
class
CL_GraphicContext
;
41
class
CL_ResourceManager
;
42
class
CL_GUIComponent
;
43
class
CL_Colorf
;
44
class
CL_Size
;
45
class
CL_Rect
;
46
class
CL_Font
;
47
51
class
CL_API_GUI
CL_GUIThemeProvider
52
{
55
56
public
:
57
virtual
~CL_GUIThemeProvider
() {
return
; }
58
62
63
public
:
71
virtual
CL_StringRef
get_property(
72
const
CL_GUIThemePart
&part,
73
const
CL_StringRef
&name,
74
const
CL_StringRef
&css_value) = 0;
75
77
virtual
CL_ResourceManager
get_resources()
const
= 0;
78
82
83
public
:
84
86
virtual
void
destroy() = 0;
87
89
virtual
void
add_resources(
CL_ResourceManager
resources) = 0;
90
92
virtual
void
set_resources(
CL_ResourceManager
resources) = 0;
93
95
virtual
void
render_box(
96
CL_GraphicContext
&gc,
97
CL_GUIThemePart
&part,
98
const
CL_Rect
&rect,
99
const
CL_Rect
&clip_rect) = 0;
100
101
virtual
CL_Rect
render_text(
102
CL_GraphicContext
&gc,
103
CL_GUIThemePart
&part,
104
CL_Font
&font,
105
const
CL_StringRef
&text,
106
const
CL_Rect
&content_rect,
107
const
CL_Rect
&clip_rect) = 0;
108
111
// This notification allows a theme to clean up cached theme part
112
// resources used by the component.
113
virtual
void
component_destroyed(
CL_GUIComponent
*component) = 0;
115
};
116
118
Generated on Fri Jun 14 2013 13:05:45 for ClanLib by
1.8.4