diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2008-01-14 22:27:00 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2008-01-14 22:27:00 (GMT) |
commit | e1db89e2d7d56afca5335550ee1c9ff87fd54ba4 (patch) | |
tree | 779b52814dedd08eb56d1875cb2f97bbcdd39e8b /src/FbTk/Text.hh | |
parent | c6099d777d844699fb8a4243921159898bc4f45c (diff) | |
download | fluxbox-e1db89e2d7d56afca5335550ee1c9ff87fd54ba4.zip fluxbox-e1db89e2d7d56afca5335550ee1c9ff87fd54ba4.tar.bz2 |
moved code a bit around, cleaned up some classes
Diffstat (limited to 'src/FbTk/Text.hh')
-rw-r--r-- | src/FbTk/Text.hh | 10 |
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 | |||
27 | namespace FbTk { | 25 | namespace FbTk { |
28 | 26 | ||
29 | class Font; | 27 | class Font; |
@@ -37,7 +35,7 @@ enum Orientation { ROT0=0, ROT90, ROT180, ROT270 }; | |||
37 | */ | 35 | */ |
38 | int doAlignment(int max_width, int bevel, FbTk::Justify justify, | 36 | int 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 |
79 | inline void untranslateCoords(Orientation orient, int &orig_x, int &orig_y, unsigned int w, unsigned int h) { | 77 | inline 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 |
105 | inline void translatePosition(Orientation orient, int &x, int &y, unsigned int w, unsigned int h, unsigned int bw) { | 103 | inline 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 | ||
124 | inline void translateSize(Orientation orient, unsigned int &w, unsigned int &h) { | 122 | inline 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 | ||