Show kdragmanager.h syntax highlighted
/*
Copyright (C) 2003, 2004 by Luca Cappa
Written by Luca Cappa groton@users.sourceforge.net
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __KDRAGMANAGER_H__
#define __KDRAGMANAGER_H__
#include "csutil/scf.h"
#include "csutil/ref.h"
struct iEventHandler;
struct iEvent;
struct iKDragHandler;
#define KDM_ROTATING_KEY "rotating"
#define KDM_TRANSLATING_KEY "translating"
#define KDM_XAXIS_KEY "x-axis"
#define KDM_YAXIS_KEY "y-axis"
//-------------------------------------------------------------------------------------
struct KDragManager : public iEventHandler
{
private:
csRef<iKDraggable> m_dragged;
public:
SCF_DECLARE_IBASE;
KDragManager ();
virtual ~KDragManager ();
virtual bool HandleEvent (iEvent& p_e);
static csPtr<iEvent> CreateAnEvent (iEventOutlet* p_eO, int p_id)
{
csRef<iEvent> lEvent = p_eO->CreateEvent ();
lEvent->Type = csevCommand;
lEvent->Add("cmdCode", p_id);
return (csPtr<iEvent>) lEvent;
}
};
#endif // __KDRAGMANAGER_H__
See more files for this project here