Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/display/graphicsWindowInputDevice.I

Go to the documentation of this file.
00001 // Filename: graphicsWindowInputDevice.I
00002 // Created by:  drose (24May00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 ////////////////////////////////////////////////////////////////////
00020 //     Function: GraphicsWindowInputDevice::Default Constructor
00021 //       Access: Public
00022 //  Description:
00023 ////////////////////////////////////////////////////////////////////
00024 INLINE GraphicsWindowInputDevice::
00025 GraphicsWindowInputDevice() {
00026   _flags = 0;
00027 }
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //     Function: GraphicsWindowInputDevice::get_name
00031 //       Access: Public
00032 //  Description:
00033 ////////////////////////////////////////////////////////////////////
00034 INLINE string GraphicsWindowInputDevice::
00035 get_name() const {
00036   return _name;
00037 }
00038 
00039 ////////////////////////////////////////////////////////////////////
00040 //     Function: GraphicsWindowInputDevice::has_pointer
00041 //       Access: Public
00042 //  Description:
00043 ////////////////////////////////////////////////////////////////////
00044 INLINE bool GraphicsWindowInputDevice::
00045 has_pointer() const {
00046   return ((_flags & IDF_has_pointer) != 0);
00047 }
00048 
00049 ////////////////////////////////////////////////////////////////////
00050 //     Function: GraphicsWindowInputDevice::has_keyboard
00051 //       Access: Public
00052 //  Description:
00053 ////////////////////////////////////////////////////////////////////
00054 INLINE bool GraphicsWindowInputDevice::
00055 has_keyboard() const {
00056   return ((_flags & IDF_has_keyboard) != 0);
00057 }
00058 
00059 ////////////////////////////////////////////////////////////////////
00060 //     Function: GraphicsWindowInputDevice::get_mouse_data
00061 //       Access: Public
00062 //  Description: Returns the MouseData associated with the nth input
00063 //               device.
00064 ////////////////////////////////////////////////////////////////////
00065 INLINE const MouseData &GraphicsWindowInputDevice::
00066 get_mouse_data() const {
00067   return _mouse_data;
00068 }
00069 
00070 ////////////////////////////////////////////////////////////////////
00071 //     Function: GraphicsWindowInputDevice::set_pointer_in_window
00072 //       Access: Public
00073 //  Description: To be called by a particular kind of GraphicsWindow
00074 //               to indicate that the pointer is within the window, at
00075 //               the given pixel coordinates.
00076 ////////////////////////////////////////////////////////////////////
00077 INLINE void GraphicsWindowInputDevice::
00078 set_pointer_in_window(int x, int y) {
00079   _mouse_data._in_window = true;
00080   _mouse_data._xpos = x;
00081   _mouse_data._ypos = y;
00082 }
00083 
00084 ////////////////////////////////////////////////////////////////////
00085 //     Function: GraphicsWindowInputDevice::set_pointer_out_of_window
00086 //       Access: Public
00087 //  Description: To be called by a particular kind of GraphicsWindow
00088 //               to indicate that the pointer is no longer within the
00089 //               window.
00090 ////////////////////////////////////////////////////////////////////
00091 INLINE void GraphicsWindowInputDevice::
00092 set_pointer_out_of_window() {
00093   _mouse_data._in_window = false;
00094 }
00095 
00096 ////////////////////////////////////////////////////////////////////
00097 //     Function: GraphicsWindowInputDevice::operator ==
00098 //       Access: Public
00099 //  Description:
00100 ////////////////////////////////////////////////////////////////////
00101 INLINE bool GraphicsWindowInputDevice::
00102 operator == (const GraphicsWindowInputDevice &) const {
00103   return true;
00104 }
00105 
00106 ////////////////////////////////////////////////////////////////////
00107 //     Function: GraphicsWindowInputDevice::operator !=
00108 //       Access: Public
00109 //  Description:
00110 ////////////////////////////////////////////////////////////////////
00111 INLINE bool GraphicsWindowInputDevice::
00112 operator != (const GraphicsWindowInputDevice &) const {
00113   return false;
00114 }
00115 
00116 ////////////////////////////////////////////////////////////////////
00117 //     Function: GraphicsWindowInputDevice::operator <
00118 //       Access: Public
00119 //  Description:
00120 ////////////////////////////////////////////////////////////////////
00121 INLINE bool GraphicsWindowInputDevice::
00122 operator < (const GraphicsWindowInputDevice &) const {
00123   return false;
00124 }

Generated on Fri May 2 00:36:34 2003 for Panda by doxygen1.3