core/vgui/vgui_modifier.cxx
Go to the documentation of this file.
00001 // This is core/vgui/vgui_modifier.cxx
00002 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00003 #pragma implementation
00004 #endif
00005 #include "vgui_modifier.h"
00006 #include <vcl_iostream.h>
00007 //:
00008 // \file
00009 // \author VGG, Oxford University
00010 // \brief  See vgui_modifier.h for a description of this file.
00011 
00012 vcl_ostream& operator<<(vcl_ostream& s, vgui_modifier m)
00013 {
00014   char const *spc = "";
00015   if (m & vgui_CTRL)  { s << spc << "ctrl";  spc=" "; }
00016   if (m & vgui_SHIFT) { s << spc << "shift"; spc=" "; }
00017   if (m & vgui_META)  { s << spc << "meta";  spc=" "; }
00018   if (m & vgui_ALT)   { s << spc << "alt";            }
00019   return s;
00020 }