00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "mouseWatcherParameter.h"
00020
00021
00022
00023
00024
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 }