1 /* Copyright (C) 2020 Wildfire Games.
2 * This file is part of 0 A.D.
4 * 0 A.D. is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
9 * 0 A.D. is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef INCLUDED_SGUIMESSAGE
19 #define INCLUDED_SGUIMESSAGE
32 GUIM_MOUSE_PRESS_LEFT
,
33 GUIM_MOUSE_PRESS_LEFT_ITEM
,
34 GUIM_MOUSE_PRESS_RIGHT
,
36 GUIM_MOUSE_DOWN_RIGHT
,
37 GUIM_MOUSE_DBLCLICK_LEFT
,
38 GUIM_MOUSE_DBLCLICK_LEFT_ITEM
, // Triggered when doubleclicking on a list item
39 GUIM_MOUSE_DBLCLICK_RIGHT
,
40 GUIM_MOUSE_RELEASE_LEFT
,
41 GUIM_MOUSE_RELEASE_RIGHT
,
43 GUIM_MOUSE_WHEEL_DOWN
,
44 GUIM_SETTINGS_UPDATED
, // SGUIMessage.m_Value = name of setting
50 GUIM_LOAD
, // Called after all objects were added to the GUI.
53 GUIM_PRESSED_MOUSE_RIGHT
,
54 GUIM_PRESSED_MOUSE_RIGHT_DISABLED
,
55 GUIM_DOUBLE_PRESSED_MOUSE_RIGHT
,
56 GUIM_PRESSED_MOUSE_RELEASE
,
57 GUIM_PRESSED_MOUSE_RELEASE_RIGHT
,
58 GUIM_TAB
, // Used by CInput
63 * Message send to IGUIObject::HandleMessage() in order
64 * to give life to Objects manually with
65 * a derived HandleMessage().
69 // This should be passed as a const reference or pointer.
70 NONCOPYABLE(SGUIMessage
);
72 SGUIMessage(EGUIMessageType _type
) : type(_type
), skipped(false) {}
73 SGUIMessage(EGUIMessageType _type
, const CStr
& _value
) : type(_type
), value(_value
), skipped(false) {}
76 * This method can be used to allow other event handlers to process this GUI event,
77 * by default an event is not skipped (only the first handler will process it).
79 * @param skip true to allow further event handling, false to prevent it
81 void Skip(bool skip
= true) { skipped
= skip
; }
84 * Describes what the message regards
94 * Flag that specifies if object skipped handling the event
99 #endif // INCLUDED_SGUIMESSAGE