📄 input_event.h
字号:
/* $Id: input_event.h,v 1.5 2004/01/02 15:42:43 mbn Exp $
**
** ClanLib Game SDK
** Copyright (C) 2003 The ClanLib Team
** For a total list of contributers see the file CREDITS.
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library 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
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
*/
//! clanDisplay="Input"
//! header=display.h
#ifndef header_inputevent
#define header_inputevent
#if _MSC_VER > 1000
#pragma once
#endif
#include "input_device.h"
#include "../Core/Math/point.h"
//: Structure descripting an input device event.
//- !group=Display/Input!
//- !header=display.h!
class CL_InputEvent
{
public:
//: Event types.
enum Type
{
no_key = 0,
pressed = 1,
released = 2,
double_clicked = 3,
moved = 4,
pointer_moved = 4,
axis_moved = 5,
ball_moved = 6
};
//! Construction:
public:
//: Constructs a 'NoKey' key.
CL_InputEvent();
~CL_InputEvent();
//! Attributes:
public:
//: Key identifier.
int id;
//: Character sequence generated by event.
std::string str;
//: Event type.
Type type;
//: Device that event originates from.
CL_InputDevice device;
//: Mouse position at event time.
CL_Point mouse_pos;
//: Axis position.
float axis_pos;
//: Set to true if left alt was down when event occoured.
bool left_alt;
//: Set to true if right alt was down when event occoured.
bool right_alt;
//: Set to true if left control was down when event occoured.
bool left_ctrl;
//: Set to true if right control was down when event occoured.
bool right_ctrl;
//: Set to true if left shift was down when event occoured.
bool left_shift;
//: Set to true if right shift was down when event occoured.
bool right_shift;
//: Specifies the repeat count for this event.
//- <p>The variable contains the number of times the keystroke is
//: autorepeated as a result of the user holding down the key.</p>
int repeat_count;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -