1 /*!
2 	@file
3 	@author		Albert Semenov
4 	@date		01/2009
5 	@module
6 */
7 #pragma once
8 
9 #include <MyGUI.h>
10 #include "Config.h"
11 #include "Marshaling.h"
12 
13 namespace MyGUI
14 {
15 	namespace Managed
16 	{
17 
18 		#ifndef MMYGUI_USING_EXTERNAL_TYPE
19 
20 		public value struct IntPoint
21 		{
22 			int left, top;
23 
IntPointIntPoint24 			IntPoint( int _left, int _top ) : left( _left ), top( _top ) { }
25 
26 			static bool operator == ( IntPoint lvalue, IntPoint rvalue )
27 			{
28 				return ( lvalue.left == rvalue.left && lvalue.top == rvalue.top );
29 			}
EqualsIntPoint30 			virtual bool Equals(IntPoint other)
31 			{
32 				return *this == other;
33 			}
34 			static bool operator != ( IntPoint lvalue, IntPoint rvalue )
35 			{
36 				return !(lvalue == rvalue);
37 			}
38 
39 		};
40 
41 		#else
42 
43 		typedef MMYGUI_EXTERNAL_NAMESPACE IntPoint IntPoint;
44 
45 		#endif // MMYGUI_USING_EXTERNAL_TYPE
46 
47 		template <> struct Convert<const MyGUI::IntPoint&>
48 		{
49 			typedef IntPoint Type;
50 			inline static const IntPoint& To(const MyGUI::IntPoint& _value)
51 			{
52 				return reinterpret_cast<const IntPoint&>(_value);
53 			}
54 			inline static MyGUI::IntPoint& From(IntPoint& _value)
55 			{
56 				return reinterpret_cast<MyGUI::IntPoint&>(_value);
57 			}
58 		};
59 		template <> struct Convert<MyGUI::IntPoint>
60 		{
61 			typedef IntPoint Type;
62 			inline static const IntPoint& To(const MyGUI::IntPoint& _value)
63 			{
64 				return reinterpret_cast<const IntPoint&>(_value);
65 			}
66 			inline static MyGUI::IntPoint& From(IntPoint& _value)
67 			{
68 				return reinterpret_cast<MyGUI::IntPoint&>(_value);
69 			}
70 		};
71 
72 	} // namespace Managed
73 } // namespace MyGUI
74