gcsx_tooltip.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* GCSx
  2. ** TOOLTIP.H
  3. **
  4. ** Tooltip popups
  5. */
  6. /*****************************************************************************
  7. ** Copyright (C) 2003-2006 Janson
  8. **
  9. ** This program is free software; you can redistribute it and/or modify
  10. ** it under the terms of the GNU General Public License as published by
  11. ** the Free Software Foundation; either version 2 of the License, or
  12. ** (at your option) any later version.
  13. **
  14. ** This program is distributed in the hope that it will be useful,
  15. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ** GNU General Public License for more details.
  18. **
  19. ** You should have received a copy of the GNU General Public License
  20. ** along with this program; if not, write to the Free Software
  21. ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
  22. *****************************************************************************/
  23. #ifndef __GCSx_TOOLTIP_H_
  24. #define __GCSx_TOOLTIP_H_
  25. class ToolTip : public Window {
  26. protected:
  27. std::string text;
  28. enum {
  29. TOOLTIP_BORDER = 1,
  30. TOOLTIP_PADDING_HORIZ = 5,
  31. TOOLTIP_PADDING_VERT = 2,
  32. };
  33. public:
  34. ToolTip(const char* tText);
  35. ~ToolTip();
  36. #ifndef NDEBUG
  37. const char* debugDump() const;
  38. #endif
  39. void popup(int xPos, int yPos);
  40. void display(SDL_Surface* destSurface, Rect& toDisplay, const Rect& clipArea, int xOffset, int yOffset);
  41. int event(int hasFocus, const SDL_Event* event);
  42. WindowType windowType() const;
  43. WindowSort windowSort() const;
  44. int refuseAll() const;
  45. };
  46. #endif