Show msg.h syntax highlighted
/***************************************************************************
msg.h - Window toolkit message class
-------------------
begin : Sun Nov 17 2002
copyright : (C) 2002 by Mattias Jansson
email : mattias@realityrift.com
***************************************************************************
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the NeoEngine, NeoWTK, msg.h
The Initial Developer of the Original Code is Mattias Jansson.
Portions created by Mattias Jansson are Copyright (C) 2002
Reality Rift Studios. All Rights Reserved.
***************************************************************************/
#ifndef __NEOWTKMSG_H
#define __NEOWTKMSG_H
#include "base.h"
#include <string>
/**
* \file msg.h
* Base class for windowing toolkit messages
*/
namespace NeoWTK
{
// External classes
class Object;
/**
* \class Msg
* \brief Data for a message
* \author Mattias Jansson (mattias@realityrift.com)
*/
class NEOWTK_API Msg
{
public:
/**
* \enum MSGID
* \brief Message IDs
*/
enum MSGID
{
INVALID = 0x00000000,
RESIZE = 0x00000101,
MOVE = 0x00000102,
MOUSE_ENTER = 0x00000201,
MOUSE_LEAVE = 0x00000202,
MOUSE_DOWN = 0x00000203,
MOUSE_UP = 0x00000204,
MOUSE_MOVE = 0x00000205,
BUTTON_DOWN = 0x00000301,
BUTTON_UP = 0x00000302,
KEYBOARD_FOCUS = 0x00000401,
KEYBOARD_DOWN = 0x00000402,
LAST_RESERVED = 0x00FFFFFF
};
public:
/*! ID */
MSGID m_eID;
/*! Sender object */
Object *m_pkSender;
/*! Receiver object */
Object *m_pkReceiver;
/*! Data */
unsigned int m_uiData[5];
/**
*/
Msg( MSGID eID = INVALID, Object *pkSender = 0, Object *pkReceiver = 0 ) : m_eID( eID ), m_pkSender( pkSender ), m_pkReceiver( pkReceiver ) {}
/**
* Get ID as string
* \return Message ID as string
*/
std::string GetIDAsString() const;
};
}; /*! namespace NeoWTK */
#endif
See more files for this project here