00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "mouseWatcherParameter.h"
00016
00017
00018
00019
00020
00021
00022 void MouseWatcherParameter::
00023 output(ostream &out) const {
00024 bool output_anything = false;
00025
00026 if (has_button()) {
00027 out << _button;
00028 output_anything = true;
00029 }
00030
00031 if (has_keycode()) {
00032 if (output_anything) {
00033 out << ", ";
00034 }
00035 out << "key" << _keycode;
00036 output_anything = true;
00037 }
00038
00039 if (_mods.is_any_down()) {
00040 if (output_anything) {
00041 out << ", ";
00042 }
00043 out << _mods;
00044 output_anything = true;
00045 }
00046
00047 if (has_mouse()) {
00048 if (output_anything) {
00049 out << ", ";
00050 }
00051 out << "(" << _mouse << ")";
00052 output_anything = true;
00053 }
00054
00055 if (is_outside()) {
00056 if (output_anything) {
00057 out << ", ";
00058 }
00059 out << "outside";
00060 output_anything = true;
00061 }
00062
00063 if (!output_anything) {
00064 out << "no parameters";
00065 }
00066 }