Logo Search packages:      
Sourcecode: blender version File versions

KX_MouseFocusSensor Class Reference

#include <KX_MouseFocusSensor.h>

Inheritance diagram for KX_MouseFocusSensor:

SCA_MouseSensor SCA_ISensor SCA_ILogicBrick

List of all members.


Detailed Description

Id
KX_MouseFocusSensor.h,v 1.7 2004/05/16 13:05:15 kester Exp

***** BEGIN GPL/BL DUAL LICENSE BLOCK *****

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The Blender Foundation also sells licenses for use in proprietary software under the Blender License. See http://www.blender.org/BL/ for information about this.

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. All rights reserved.

The Original Code is: all of this file.

Contributor(s): none yet.

***** END GPL/BL DUAL LICENSE BLOCK ***** KX_MouseFocusSensor determines mouse in/out/over events. The mouse focus sensor extends the basic SCA_MouseSensor. It has been placed in KX because it needs access to the rasterizer and SuMO.

Definition at line 46 of file KX_MouseFocusSensor.h.


Public Types

enum  AllocationTYPE { STACKVALUE = 0, HEAPVALUE = 1 }
enum  DrawTYPE { STARTFRAME = 0, ENDFRAME = 1, INTERFRAME = 2 }
enum  KX_BOOL_TYPE { KX_BOOL_NODEF = 0, KX_TRUE, KX_FALSE, KX_BOOL_MAX }
enum  KX_MOUSESENSORMODE {
  KX_MOUSESENSORMODE_NODEF = 0, KX_MOUSESENSORMODE_LEFTBUTTON, KX_MOUSESENSORMODE_MIDDLEBUTTON, KX_MOUSESENSORMODE_RIGHTBUTTON,
  KX_MOUSESENSORMODE_WHEELUP, KX_MOUSESENSORMODE_WHEELDOWN, KX_MOUSESENSORMODE_POSITION, KX_MOUSESENSORMODE_POSITIONX,
  KX_MOUSESENSORMODE_POSITIONY, KX_MOUSESENSORMODE_MOVEMENT, KX_MOUSESENSORMODE_MAX
}

Public Member Functions

virtual int _delattr (const STR_String &attr)
virtual PyObject * _getattr (const STR_String &attr)
virtual PyObject * _repr (void)
virtual int _setattr (const STR_String &attr, PyObject *value)
void Activate (class SCA_LogicManager *logicmgr, CValue *event)
virtual CValue * AddRef ()
virtual CValue * Calc (VALUE_OPERATOR op, CValue *val)
virtual CValue * CalcFinal (VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val)
virtual void ClearProperties ()
virtual void CloneProperties (CValue *replica)
virtual CValue * ConvertPythonToValue (PyObject *pyobj)
virtual PyObject * ConvertValueToPython ()
virtual bool Evaluate (CValue *event)
void Execute (const CAction &a)
virtual CValue * FindIdentifier (const STR_String &identifiername)
SCA_IInputDevice::KX_EnumInputs GetHotKey ()
short int GetModeKey ()
virtual STR_String GetName ()
virtual float GetNumber ()
SCA_IObject * GetParent ()
virtual CValue * GetProperty (int inIndex)
virtual CValue * GetProperty (const STR_String &inName)
virtual int GetPropertyCount ()
float GetPropertyNumber (const STR_String &inName, float defnumber)
STR_String GetPropertyText (const STR_String &inName, const STR_String &deftext="")
int GetRefCount ()
 Reference Counting.
virtual CValue * GetReplica ()
virtual const STR_StringGetText ()
virtual double * GetVector3 (bool bGetTransformedVec=false)
bool isA (const char *mytypename)
bool isA (PyTypeObject *T)
bool IsActive ()
virtual bool IsAffected ()
virtual bool IsAnyPropertyModified ()
virtual bool IsCustomFlag1 ()
virtual bool IsCustomFlag2 ()
bool IsError ()
virtual bool IsModified ()
virtual bool IsPositiveTrigger ()
bool IsReleaseRequested ()
virtual bool IsSelected ()
bool IsSuspended ()
bool isValid (KX_MOUSESENSORMODE)
virtual bool IsVisible ()
 KX_MouseFocusSensor (class SCA_MouseManager *keybdmgr, int startx, int starty, short int mousemode, bool focusmode, RAS_ICanvas *canvas, KX_Scene *kxscene, SCA_IObject *gameobj, PyTypeObject *T=&Type)
 KX_PYMETHOD (CValue, GetName)
 KX_PYMETHOD (SCA_ILogicBrick, GetExecutePriority)
 KX_PYMETHOD (SCA_ILogicBrick, SetExecutePriority)
 KX_PYMETHOD (SCA_ILogicBrick, GetOwner)
 KX_PYMETHOD_DOC (SCA_ISensor, SetInvert)
 KX_PYMETHOD_DOC (SCA_ISensor, GetInvert)
 KX_PYMETHOD_DOC (SCA_ISensor, SetUseNegPulseMode)
 KX_PYMETHOD_DOC (SCA_ISensor, GetUseNegPulseMode)
 KX_PYMETHOD_DOC (SCA_ISensor, SetFrequency)
 KX_PYMETHOD_DOC (SCA_ISensor, GetFrequency)
 KX_PYMETHOD_DOC (SCA_ISensor, SetUsePosPulseMode)
 KX_PYMETHOD_DOC (SCA_ISensor, GetUsePosPulseMode)
 KX_PYMETHOD_DOC (SCA_ISensor, IsPositive)
 KX_PYMETHOD_DOC (SCA_MouseSensor, GetYPosition)
 KX_PYMETHOD_DOC (SCA_MouseSensor, GetXPosition)
 KX_PYMETHOD_DOC (KX_MouseFocusSensor, GetRaySource)
 KX_PYMETHOD_DOC (KX_MouseFocusSensor, GetRayTarget)
virtual bool LessComparedTo (SCA_ILogicBrick *other)
STR_String op2str (VALUE_OPERATOR op)
PyObject * Py_isA (PyObject *args)
void RegisterToManager ()
virtual int Release ()
virtual bool RemoveProperty (const STR_String &inName)
virtual void ReParent (SCA_IObject *parent)
virtual void ReplicaSetName (STR_String name)
void Resume ()
void SetActive (bool active)
virtual void SetAffected (bool bAffected=true)
virtual void SetColorOperator (VALUE_OPERATOR op)
virtual void SetCustomFlag1 (bool bCustomFlag)
virtual void SetCustomFlag2 (bool bCustomFlag)
void SetError (bool err)
void SetExecutePriority (int execute_Priority)
void SetInvert (bool inv)
virtual void SetModified (bool bModified)
virtual void SetName (STR_String name)
virtual void SetOwnerExpression (class CExpression *expr)
virtual void SetPropertiesModified (bool inModified)
virtual void SetProperty (const STR_String &name, CValue *ioProperty)
 Property Management.
void SetPulseMode (bool posmode, bool negmode, int freq)
void SetReleaseRequested (bool bReleaseRequested)
void SetSelected (bool bSelected)
void SetUeberExecutePriority (int execute_Priority)
virtual void SetValue (CValue *newval)
void SetVisible (bool vis)
void setX (short x)
void setY (short y)
void SpecialRelease ()
void Suspend ()
double * ZeroVector ()

Static Public Member Functions

static PyObject * __getattr (PyObject *PyObj, char *attr)
static PyObject * __repr (PyObject *PyObj)
static int __setattr (PyObject *PyObj, char *attr, PyObject *value)
static void PyDestructor (PyObject *P)
static PyObject * sPy_isA (PyObject *self, PyObject *args, PyObject *kwd)

Static Public Attributes

static class SCA_LogicManager * m_sCurrentLogicManager = NULL

Protected Member Functions

virtual void AddDataToReplica (CValue *replica)
PyObject * BoolToPyArg (bool)
virtual void DisableRefCount ()
CValue * GetEvent ()
bool PyArgToBool (int boolArg)
void RegisterEvent (CValue *eventval)
void RemoveEvent ()

Protected Attributes

bool m_bActive
CValue * m_eventval
int m_Execute_Priority
int m_Execute_Ueber_Priority
SCA_IObject * m_gameobj
STR_String m_name
STR_String m_text

Private Member Functions

bool ParentObjectHasFocus (void)

Private Attributes

class KX_KetsjiEnginem_engine
bool m_focusmode
RAS_ICanvas * m_gp_canvas
MT_Vector3 m_hitNormal
MT_Point3 m_hitPosition
KX_Scenem_kxscene
bool m_mouse_over_in_previous_frame
bool m_positive_event
MT_Point3 m_prevSourcePoint
MT_Point3 m_prevTargetPoint
 Py_Header

Classes

class  KX_MouseFocusSensor

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index