scummvm/gui/Tooltip.h

57 lines
1.8 KiB
C
Raw Normal View History

2011-04-16 14:08:33 +02:00
/* ScummVM - Graphic Adventure Engine
2011-04-11 15:40:01 +02:00
*
2011-04-16 14:08:33 +02:00
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
2011-04-11 15:40:01 +02:00
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef GUI_TOOLTIP_H
#define GUI_TOOLTIP_H
2011-05-01 17:49:40 +02:00
#include "common/keyboard.h"
#include "common/str-array.h"
2011-04-11 15:40:01 +02:00
#include "gui/dialog.h"
namespace GUI {
2011-05-01 17:49:40 +02:00
class Widget;
2011-04-11 15:40:01 +02:00
class Tooltip : public Dialog {
public:
Tooltip();
2011-04-14 12:41:26 +02:00
void setup(Dialog *parent, Widget *widget, int x, int y);
void drawDialog();
2011-04-11 15:40:01 +02:00
protected:
2011-04-14 12:41:26 +02:00
virtual void handleMouseDown(int x, int y, int button, int clickCount) { close(); }
virtual void handleMouseUp(int x, int y, int button, int clickCount) { close(); }
virtual void handleMouseWheel(int x, int y, int direction) { close(); }
virtual void handleKeyDown(Common::KeyState state) { close(); }
virtual void handleKeyUp(Common::KeyState state) { close(); }
virtual void handleMouseMoved(int x, int y, int button) { close(); }
2011-04-11 15:40:01 +02:00
int _maxWidth;
int _xdelta, _ydelta;
Common::StringArray _wrappedLines;
2011-04-14 12:41:26 +02:00
};
} // End of namespace GUI
2011-04-11 15:40:01 +02:00
2011-04-14 12:41:26 +02:00
#endif // GUI_TOOLTIP_H