summaryrefslogtreecommitdiff
path: root/src/FbTk/Text.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Text.hh')
-rw-r--r--src/FbTk/Text.hh10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/FbTk/Text.hh b/src/FbTk/Text.hh
index f2b4162..494d365 100644
--- a/src/FbTk/Text.hh
+++ b/src/FbTk/Text.hh
@@ -22,8 +22,6 @@
22#ifndef FBTK_TEXT_HH 22#ifndef FBTK_TEXT_HH
23#define FBTK_TEXT_HH 23#define FBTK_TEXT_HH
24 24
25#include <sys/types.h>
26
27namespace FbTk { 25namespace FbTk {
28 26
29class Font; 27class Font;
@@ -37,7 +35,7 @@ enum Orientation { ROT0=0, ROT90, ROT180, ROT270 };
37 */ 35 */
38int doAlignment(int max_width, int bevel, FbTk::Justify justify, 36int doAlignment(int max_width, int bevel, FbTk::Justify justify,
39 const FbTk::Font &font, const char * const text, 37 const FbTk::Font &font, const char * const text,
40 size_t textlen, size_t &newlen); 38 unsigned int textlen, unsigned int &newlen);
41 39
42/** 40/**
43 There are 3 interesting translations: 41 There are 3 interesting translations:
@@ -76,7 +74,7 @@ inline void translateCoords(Orientation orient, int &x, int &y, unsigned int w,
76} 74}
77 75
78// still require w and h in ROT0 coords 76// still require w and h in ROT0 coords
79inline void untranslateCoords(Orientation orient, int &orig_x, int &orig_y, unsigned int w, unsigned int h) { 77inline void untranslateCoords(Orientation orient, int orig_x, int orig_y, unsigned int w, unsigned int h) {
80 78
81 int x = orig_x; 79 int x = orig_x;
82 int y = orig_y; 80 int y = orig_y;
@@ -102,7 +100,7 @@ inline void untranslateCoords(Orientation orient, int &orig_x, int &orig_y, unsi
102 100
103// When positioning an X11 box inside another area, we need to 101// When positioning an X11 box inside another area, we need to
104// relocate the x,y coordinates 102// relocate the x,y coordinates
105inline void translatePosition(Orientation orient, int &x, int &y, unsigned int w, unsigned int h, unsigned int bw) { 103inline void translatePosition(Orientation orient, int x, int y, unsigned int w, unsigned int h, unsigned int bw) {
106 104
107 switch(orient) { 105 switch(orient) {
108 case ROT0: 106 case ROT0:
@@ -121,7 +119,7 @@ inline void translatePosition(Orientation orient, int &x, int &y, unsigned int w
121 119
122} 120}
123 121
124inline void translateSize(Orientation orient, unsigned int &w, unsigned int &h) { 122inline void translateSize(Orientation orient, unsigned int w, unsigned int h) {
125 if (orient == ROT0 || orient == ROT180) 123 if (orient == ROT0 || orient == ROT180)
126 return; 124 return;
127 125