-
Notifications
You must be signed in to change notification settings - Fork 2
/
uicore_Global.h
74 lines (59 loc) · 2.08 KB
/
uicore_Global.h
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
64
65
66
67
68
69
70
71
72
73
74
/*
Copyright (C) 2007 Benjamin Litzelmann
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _UICORE_GLOBAL_H_
#define _UICORE_GLOBAL_H_
#include "uicore_BaseObject.h"
#include "uicore_Panel.h"
#include "uicore_Label.h"
#include "uicore_Button.h"
#include "uicore_SwitchButton.h"
#include "uicore_TextBox.h"
#include "uicore_CheckBox.h"
#include "uicore_Slider.h"
#include "uicore_ListBox.h"
#include "uicore_ListItem.h"
#include "uicore_DropDownBox.h"
#include "uicore_MessageBox.h"
#include "uicore_TitleBar.h"
#include "uicore_Import.h"
#include "uicore_Factory.h"
#include "math.h"
#include "string.h"
#ifdef min
#undef min
#endif
#ifdef max
#undef max
#endif
#ifdef bound
#undef bound
#endif
namespace UICore
{
extern BaseObject *draggingObject;
extern BaseObject *mouseOverObject;
extern BaseObject *focusedObject;
extern Panel *rootPanel;
template <typename T> inline T bound( T v, T b1, T b2 ) { return (v < b1 ? b1 : (v > b2 ? b2 : v) ); }
inline float round( float v ) { return (v - floor(v) < .5) ? floor(v) : ceil(v); }
/** Scale is needed to properly display borders */
void setScale( float scaleX, float scaleY );
void EventMouseDown( float x, float y, int button );
void EventMouseUp( float x, float y, int button );
void EventMouseMove( float x, float y, float xrel, float yrel );
void EventKeyDown( int key, int charVal );
void EventKeyUp( int key, int charVal );
}
#endif