~ubuntu-branches/ubuntu/vivid/mygui/vivid

« back to all changes in this revision

Viewing changes to MyGUIEngine/include/MyGUI_IBItemInfo.h

  • Committer: Package Import Robot
  • Author(s): Scott Howard, Bret Curtis, Scott Howard
  • Date: 2014-09-18 17:57:48 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140918175748-dd8va78mvpw1jbes
Tags: 3.2.1-1
[ Bret Curtis ]
* Updated license for majority of files from LGPL to Expat (MIT)

[ Scott Howard ]
* New upstream release
* Updated patch to add build option for system GLEW libraries
* All patches accepted upstream except shared_libraries.patch
* Bumped SONAME due to dropped symbols, updated *.symbols and package
  names
* Updated license of debian/* to Expat with permission of all authors
* Don't install Doxygen autogenerated md5 and map files (thanks
  lintian)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*!
2
 
        @file
3
 
        @author         Albert Semenov
4
 
        @date           11/2008
5
 
*/
6
 
/*
7
 
        This file is part of MyGUI.
8
 
 
9
 
        MyGUI is free software: you can redistribute it and/or modify
10
 
        it under the terms of the GNU Lesser General Public License as published by
11
 
        the Free Software Foundation, either version 3 of the License, or
12
 
        (at your option) any later version.
13
 
 
14
 
        MyGUI is distributed in the hope that it will be useful,
15
 
        but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
        GNU Lesser General Public License for more details.
18
 
 
19
 
        You should have received a copy of the GNU Lesser General Public License
20
 
        along with MyGUI.  If not, see <http://www.gnu.org/licenses/>.
21
 
*/
22
 
#ifndef __MYGUI_ITEM_INFO_H__
23
 
#define __MYGUI_ITEM_INFO_H__
24
 
 
25
 
#include "MyGUI_Prerequest.h"
26
 
 
27
 
namespace MyGUI
28
 
{
29
 
 
30
 
        // структура информации об отображении элемента
31
 
        /** Info about ItemBox item*/
32
 
        struct MYGUI_EXPORT IBDrawItemInfo
33
 
        {
34
 
 
35
 
                IBDrawItemInfo() :
36
 
                        index(ITEM_NONE),
37
 
                        update(false),
38
 
                        select(false),
39
 
                        active(false),
40
 
                        drag(false),
41
 
                        drop_accept(false),
42
 
                        drop_refuse(false)
43
 
                {
44
 
                }
45
 
 
46
 
                IBDrawItemInfo(size_t _index, size_t _select, size_t _active, size_t _accept, size_t _refuse, bool _update, bool _drag) :
47
 
                        index(_index),
48
 
                        update(_update),
49
 
                        select(_index == _select),
50
 
                        active(_index == _active),
51
 
                        drag(_drag),
52
 
                        drop_accept(_index == _accept),
53
 
                        drop_refuse(_index == _refuse)
54
 
                {
55
 
                }
56
 
 
57
 
                /** Index of element */
58
 
                size_t index;
59
 
                /** State and interdan data changed */
60
 
                bool update;
61
 
                /** Is widget selected */
62
 
                bool select;
63
 
                /** Is widget active */
64
 
                bool active;
65
 
                /** Is widget able to be dragged */
66
 
                bool drag;
67
 
                /** Is widget accepting drop */
68
 
                bool drop_accept;
69
 
                /** Is widget refuseing drop */
70
 
                bool drop_refuse;
71
 
        };
72
 
 
73
 
        struct MYGUI_EXPORT IBNotifyItemData
74
 
        {
75
 
                enum NotifyItem
76
 
                {
77
 
                        MousePressed,
78
 
                        MouseReleased,
79
 
                        KeyPressed,
80
 
                        KeyReleased
81
 
                };
82
 
 
83
 
                IBNotifyItemData(size_t _index, NotifyItem _notify, int _x, int _y, MouseButton _id) :
84
 
                        index(_index),
85
 
                        notify(_notify),
86
 
                        x(_x),
87
 
                        y(_y),
88
 
                        id(_id),
89
 
                        code(KeyCode::None),
90
 
                        key(0)
91
 
                {
92
 
                }
93
 
 
94
 
                IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code, Char _key) :
95
 
                        index(_index),
96
 
                        notify(_notify),
97
 
                        x(0),
98
 
                        y(0),
99
 
                        id(MouseButton::None),
100
 
                        code(_code),
101
 
                        key(_key)
102
 
                {
103
 
                }
104
 
 
105
 
                IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code) :
106
 
                        index(_index),
107
 
                        notify(_notify),
108
 
                        x(0),
109
 
                        y(0),
110
 
                        id(MouseButton::None),
111
 
                        code(_code),
112
 
                        key(KeyCode::None)
113
 
                {
114
 
                }
115
 
 
116
 
                /** Item index */
117
 
                size_t index;
118
 
                /** Notify type */
119
 
                NotifyItem notify;
120
 
                /** If Mouse* notify type - mouse x position, else 0 */
121
 
                int x;
122
 
                /** If Mouse* notify type - mouse y position, else 0 */
123
 
                int y;
124
 
                /** If Mouse* notify type - mouse button id position, else 0 */
125
 
                MouseButton id;
126
 
                /** If Key* notify type - key code, else 0 */
127
 
                KeyCode code;
128
 
                /** If Key* notify type - mouse button id position, else 0 */
129
 
                Char key;
130
 
        };
131
 
 
132
 
} // namespace MyGUI
133
 
 
134
 
#endif // __MYGUI_ITEM_INFO_H__
 
1
/*
 
2
 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
 
3
 * Distributed under the MIT License
 
4
 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
 
5
 */
 
6
 
 
7
#ifndef __MYGUI_ITEM_INFO_H__
 
8
#define __MYGUI_ITEM_INFO_H__
 
9
 
 
10
#include "MyGUI_Prerequest.h"
 
11
 
 
12
namespace MyGUI
 
13
{
 
14
 
 
15
        // структура информации об отображении элемента
 
16
        /** Info about ItemBox item*/
 
17
        struct MYGUI_EXPORT IBDrawItemInfo
 
18
        {
 
19
 
 
20
                IBDrawItemInfo() :
 
21
                        index(ITEM_NONE),
 
22
                        update(false),
 
23
                        select(false),
 
24
                        active(false),
 
25
                        drag(false),
 
26
                        drop_accept(false),
 
27
                        drop_refuse(false)
 
28
                {
 
29
                }
 
30
 
 
31
                IBDrawItemInfo(size_t _index, size_t _select, size_t _active, size_t _accept, size_t _refuse, bool _update, bool _drag) :
 
32
                        index(_index),
 
33
                        update(_update),
 
34
                        select(_index == _select),
 
35
                        active(_index == _active),
 
36
                        drag(_drag),
 
37
                        drop_accept(_index == _accept),
 
38
                        drop_refuse(_index == _refuse)
 
39
                {
 
40
                }
 
41
 
 
42
                /** Index of element */
 
43
                size_t index;
 
44
                /** State and interdan data changed */
 
45
                bool update;
 
46
                /** Is widget selected */
 
47
                bool select;
 
48
                /** Is widget active */
 
49
                bool active;
 
50
                /** Is widget able to be dragged */
 
51
                bool drag;
 
52
                /** Is widget accepting drop */
 
53
                bool drop_accept;
 
54
                /** Is widget refuseing drop */
 
55
                bool drop_refuse;
 
56
        };
 
57
 
 
58
        struct MYGUI_EXPORT IBNotifyItemData
 
59
        {
 
60
                enum NotifyItem
 
61
                {
 
62
                        MousePressed,
 
63
                        MouseReleased,
 
64
                        KeyPressed,
 
65
                        KeyReleased
 
66
                };
 
67
 
 
68
                IBNotifyItemData(size_t _index, NotifyItem _notify, int _x, int _y, MouseButton _id) :
 
69
                        index(_index),
 
70
                        notify(_notify),
 
71
                        x(_x),
 
72
                        y(_y),
 
73
                        id(_id),
 
74
                        code(KeyCode::None),
 
75
                        key(0)
 
76
                {
 
77
                }
 
78
 
 
79
                IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code, Char _key) :
 
80
                        index(_index),
 
81
                        notify(_notify),
 
82
                        x(0),
 
83
                        y(0),
 
84
                        id(MouseButton::None),
 
85
                        code(_code),
 
86
                        key(_key)
 
87
                {
 
88
                }
 
89
 
 
90
                IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code) :
 
91
                        index(_index),
 
92
                        notify(_notify),
 
93
                        x(0),
 
94
                        y(0),
 
95
                        id(MouseButton::None),
 
96
                        code(_code),
 
97
                        key(KeyCode::None)
 
98
                {
 
99
                }
 
100
 
 
101
                /** Item index */
 
102
                size_t index;
 
103
                /** Notify type */
 
104
                NotifyItem notify;
 
105
                /** If Mouse* notify type - mouse x position, else 0 */
 
106
                int x;
 
107
                /** If Mouse* notify type - mouse y position, else 0 */
 
108
                int y;
 
109
                /** If Mouse* notify type - mouse button id position, else 0 */
 
110
                MouseButton id;
 
111
                /** If Key* notify type - key code, else 0 */
 
112
                KeyCode code;
 
113
                /** If Key* notify type - mouse button id position, else 0 */
 
114
                Char key;
 
115
        };
 
116
 
 
117
} // namespace MyGUI
 
118
 
 
119
#endif // __MYGUI_ITEM_INFO_H__