~shevonar/widelands/reworking-menus

« back to all changes in this revision

Viewing changes to src/graphic/font_handler.h

  • Committer: Shevonar
  • Date: 2013-01-15 23:15:22 UTC
  • mfrom: (6432.1.56 trunk)
  • Revision ID: infomh@anmaruco.de-20130115231522-782njbcagjo6olef
mergedĀ currentĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef FONT_HANDLER_H
21
21
#define FONT_HANDLER_H
22
22
 
 
23
#include <boost/scoped_ptr.hpp>
 
24
 
 
25
#include "point.h"
23
26
#include "ui_basic/align.h"
24
 
#include "point.h"
25
 
#include "rgbcolor.h"
26
 
#include "graphic.h"
27
 
#include "picture_id.h"
28
 
 
29
 
#include <SDL_ttf.h>
30
 
 
31
 
#include <boost/scoped_ptr.hpp>
32
 
 
33
 
#include <list>
34
 
#include <cstring>
35
 
#include <vector>
36
 
 
37
 
struct RenderTarget;
 
27
 
 
28
class RenderTarget;
38
29
 
39
30
namespace UI {
40
31
 
62
53
                 Align align = Align_CenterLeft,
63
54
                 uint32_t caret = std::numeric_limits<uint32_t>::max());
64
55
        uint32_t draw_text_raw(RenderTarget &, const TextStyle &, Point dstpoint, const std::string & text);
65
 
        void draw_multiline
66
 
                (RenderTarget &,
67
 
                 const TextStyle &,
68
 
                 Point dstpoint,
69
 
                 const std::string & text,
70
 
                 Align align = Align_CenterLeft,
71
 
                 uint32_t wrap = std::numeric_limits<uint32_t>::max(),
72
 
                 uint32_t caret = std::numeric_limits<uint32_t>::max());
73
56
 
74
57
        void get_size
75
58
                (const TextStyle &,
84
67
        uint32_t get_fontheight(std::string const & name, int32_t size);
85
68
        void do_align
86
69
                (Align, int32_t & dstx, int32_t & dsty, int32_t w, int32_t h);
87
 
        // This deletes all cached pictures, it is called
88
 
        // from the graphics code before the graphics are flushed,
89
 
        // to make sure that everything is forgotten
90
 
        void flush_cache();
91
70
 
92
71
private:
93
72
        struct Data;