00001 /* 00002 * Copyright (C) 2004 Ivo Danihelka (ivo@danihelka.net) 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 */ 00009 #include "MouseStroke.h" 00010 00011 #include "StringTool.h" 00012 00013 //----------------------------------------------------------------- 00014 /** 00015 * Create new stroke from MouseButtonEvent. 00016 */ 00017 MouseStroke::MouseStroke(const SDL_MouseButtonEvent &event) 00018 : m_loc(event.x, event.y) 00019 { 00020 m_button = event.button; 00021 } 00022 //----------------------------------------------------------------- 00023 /** 00024 * Return text fashion. 00025 */ 00026 std::string 00027 MouseStroke::toString() const 00028 { 00029 return StringTool::toString(m_button); 00030 } 00031