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

panda/src/tform/mouseWatcherParameter.cxx

Go to the documentation of this file.
00001 // Filename: mouseWatcherParameter.cxx
00002 // Created by:  drose (06Jul01)
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 #include "mouseWatcherParameter.h"
00020 
00021 ////////////////////////////////////////////////////////////////////
00022 //     Function: MouseWatcherParameter::output
00023 //       Access: Published
00024 //  Description: 
00025 ////////////////////////////////////////////////////////////////////
00026 void MouseWatcherParameter::
00027 output(ostream &out) const {
00028   bool output_anything = false;
00029 
00030   if (has_button()) {
00031     out << _button;
00032     output_anything = true;
00033   }
00034 
00035   if (has_keycode()) {
00036     if (output_anything) {
00037       out << ", ";
00038     }
00039     out << "key" << _keycode;
00040     output_anything = true;
00041   }
00042 
00043   if (_mods.is_any_down()) {
00044     if (output_anything) {
00045       out << ", ";
00046     }
00047     out << _mods;
00048     output_anything = true;
00049   }
00050 
00051   if (has_mouse()) {
00052     if (output_anything) {
00053       out << ", ";
00054     }
00055     out << "(" << _mouse << ")";
00056     output_anything = true;
00057   }
00058 
00059   if (is_outside()) {
00060     if (output_anything) {
00061       out << ", ";
00062     }
00063     out << "outside";
00064     output_anything = true;
00065   }
00066 
00067   if (!output_anything) {
00068     out << "no parameters";
00069   }
00070 }

Generated on Fri May 2 00:44:29 2003 for Panda by doxygen1.3