~ubuntu-branches/ubuntu/utopic/rlvm/utopic-proposed

« back to all changes in this revision

Viewing changes to src/Platforms/gcn/SDLTrueTypeFont.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Ying-Chun Liu (PaulLiu), Ying-Chun Liu (PaulLiu), Elliot Glaysher
  • Date: 2011-05-19 00:28:44 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20110519002844-qszwmj7oiixww0eg
Tags: 0.12-1
[ Ying-Chun Liu (PaulLiu) <paulliu@debian.org> ]
* New upstream release

[ Elliot Glaysher <glaysher@umich.edu> ]
* New GTK+ interface with desktop integration and UI refinements
* Partial Japanese localizations
* Fix graphics corruption in in-game dialogs when a dialog is brought
  up, and then fullscreen mode activated
* Smooth the output of text in rlBabel using games
* Don't play voice samples while fast forwarding

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include <SDL/SDL_ttf.h>
34
34
#include <boost/shared_ptr.hpp>
35
35
 
 
36
#include "base/notification_observer.h"
 
37
#include "base/notification_registrar.h"
36
38
#include "guichan/color.hpp"
37
39
#include "guichan/font.hpp"
38
40
#include "guichan/platform.hpp"
62
64
 * @author Walluce Pinkham
63
65
 * @author Olof Naessén
64
66
 */
65
 
class SDLTrueTypeFont : public gcn::Font {
 
67
class SDLTrueTypeFont : public gcn::Font,
 
68
                        public NotificationObserver {
66
69
 public:
67
70
  SDLTrueTypeFont(const std::string& filename, int size);
68
71
  virtual ~SDLTrueTypeFont();
93
96
  virtual void drawString(gcn::Graphics* graphics, const std::string& text,
94
97
                          int x, int y);
95
98
 
 
99
  // NotificationObserver:
 
100
  virtual void Observe(NotificationType type,
 
101
                       const NotificationSource& source,
 
102
                       const NotificationDetails& details);
 
103
 
96
104
 private:
97
105
  TTF_Font *font_;
98
106
 
104
112
 
105
113
  LRUCache<std::pair<std::string, std::string>,
106
114
           boost::shared_ptr<gcn::OpenGLImage> > image_cache_;
 
115
 
 
116
  NotificationRegistrar registrar_;
107
117
};
108
118
 
109
119
#endif  // SRC_PLATFORMS_GCN_SDLTRUETYPEFONT_HPP_