1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
diff -Naur /usr/src/ufo-0.8.4/include/ufo/config/stamp-h1 ./include/ufo/config/stamp-h1
--- /usr/src/ufo-0.8.4/include/ufo/config/stamp-h1 1969-12-31 16:00:00.000000000 -0800
+++ ./include/ufo/config/stamp-h1 2006-08-19 13:34:43.000000000 -0700
@@ -0,0 +1 @@
+timestamp for include/ufo/config/ufo_config_gnu.hpp
diff -Naur /usr/src/ufo-0.8.4/include/ufo/util/udimension.hpp ./include/ufo/util/udimension.hpp
--- /usr/src/ufo-0.8.4/include/ufo/util/udimension.hpp 2005-09-30 05:36:48.000000000 -0700
+++ ./include/ufo/util/udimension.hpp 2006-08-19 13:34:40.000000000 -0700
@@ -32,6 +32,8 @@
#include "uinsets.hpp"
+using namespace std;
+
namespace ufo {
/** @short An abstraction to dimension (width and height).
@@ -239,14 +241,14 @@
inline void
UDimension::clamp(const UDimension & maxDim) {
- w = std::min(w, maxDim.w);
- h = std::min(h, maxDim.h);
+ w = min(w, maxDim.w);
+ h = min(h, maxDim.h);
}
inline void
UDimension::expand(const UDimension & minDim) {
- w = std::max(w, minDim.w);
- h = std::max(h, minDim.h);
+ w = max(w, minDim.w);
+ h = max(h, minDim.h);
}
inline void
diff -Naur /usr/src/ufo-0.8.4/include/ufo/util/urectangle.hpp ./include/ufo/util/urectangle.hpp
--- /usr/src/ufo-0.8.4/include/ufo/util/urectangle.hpp 2005-09-30 05:36:48.000000000 -0700
+++ ./include/ufo/util/urectangle.hpp 2006-08-19 13:34:40.000000000 -0700
@@ -218,10 +218,10 @@
{}
inline URectangle::URectangle(const UPoint & p1, const UPoint & p2) {
- x = std::min(p1.x, p2.x);
- y = std::min(p1.y, p2.y);
- w = std::abs(p2.x - p1.x);
- h = std::abs(p2.y - p1.y);
+ x = min(p1.x, p2.x);
+ y = min(p1.y, p2.y);
+ w = abs(p2.x - p1.x);
+ h = abs(p2.y - p1.y);
}
inline URectangle::URectangle(const UDimension & d)
@@ -261,34 +261,34 @@
inline void
URectangle::clamp(const UDimension & maxDim) {
- w = std::min(w, maxDim.w);
- h = std::min(h, maxDim.h);
+ w = min(w, maxDim.w);
+ h = min(h, maxDim.h);
}
inline void
URectangle::expand(const UDimension & minDim) {
- w = std::max(w, minDim.w);
- h = std::max(h, minDim.h);
+ w = max(w, minDim.w);
+ h = max(h, minDim.h);
}
inline void
URectangle::intersect(const URectangle & rect) {
- int x1 = std::max(x, rect.x);
- int y1 = std::max(y, rect.y);
- int x2 = std::min(x + w, rect.x + rect.w);
- int y2 = std::min(y + h, rect.y + rect.h);
+ int x1 = max(x, rect.x);
+ int y1 = max(y, rect.y);
+ int x2 = min(x + w, rect.x + rect.w);
+ int y2 = min(y + h, rect.y + rect.h);
setBounds(x1, y1, x2 - x1, y2 - y1);
- w = std::max(w, 0);
- h = std::max(h, 0);
+ w = max(w, 0);
+ h = max(h, 0);
}
inline void
URectangle::unite(const URectangle & rect) {
- int x1 = std::min(x, rect.x);
- int y1 = std::min(y, rect.y);
- int x2 = std::max(x + w, rect.x + rect.w);
- int y2 = std::max(y + h, rect.y + rect.h);
+ int x1 = min(x, rect.x);
+ int y1 = min(y, rect.y);
+ int x2 = max(x + w, rect.x + rect.w);
+ int y2 = max(y + h, rect.y + rect.h);
setBounds(x1, y1, x2 - x1 + 1, y2 - y1 + 1);
}
@@ -313,10 +313,10 @@
const URectangle & src2, URectangle * dest) {
if (dest) {
// allow using src rectangle as dest rectangle
- int x = std::min(src1.x, src2.x);
- int y = std::min(src1.y, src2.y);
- dest->w = std::max(src1.x + src1.w, src2.x + src2.w) - x;
- dest->h = std::max(src1.y + src1.h, src2.y + src2.h) - y;
+ int x = min(src1.x, src2.x);
+ int y = min(src1.y, src2.y);
+ dest->w = max(src1.x + src1.w, src2.x + src2.w) - x;
+ dest->h = max(src1.y + src1.h, src2.y + src2.h) - y;
dest->x = x;
dest->y = y;
}
diff -Naur /usr/src/ufo-0.8.4/include/ufo/ux/ux_sdl_prototypes.hpp ./include/ufo/ux/ux_sdl_prototypes.hpp
--- /usr/src/ufo-0.8.4/include/ufo/ux/ux_sdl_prototypes.hpp 2005-02-13 09:49:30.000000000 -0800
+++ ./include/ufo/ux/ux_sdl_prototypes.hpp 2006-08-19 13:34:40.000000000 -0700
@@ -25,7 +25,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-
+#include <SDL.h>
#define UFO_SDL_PROC_UNUSED(ret,func,params)
UFO_SDL_PROC(SDL_Surface *,SDL_SetVideoMode,(int, int,int, Uint32))
diff -Naur /usr/src/ufo-0.8.4/include/ufo/widgets/uradiobutton.hpp ./include/ufo/widgets/uradiobutton.hpp
--- /usr/src/ufo-0.8.4/include/ufo/widgets/uradiobutton.hpp 2005-05-21 08:19:54.000000000 -0700
+++ ./include/ufo/widgets/uradiobutton.hpp 2006-08-19 13:34:43.000000000 -0700
@@ -48,6 +48,12 @@
public:
URadioButton();
URadioButton(const std::string & text);
+
+ std::string getValue() { return m_value; };
+ void setValue(std::string v) { m_value = v; };
+
+private:
+ std::string m_value;
};
} // namespace ufo
diff -Naur /usr/src/ufo-0.8.4/src/widgets/upopupmenu.cpp ./src/widgets/upopupmenu.cpp
--- /usr/src/ufo-0.8.4/src/widgets/upopupmenu.cpp 2005-10-11 12:26:17.000000000 -0700
+++ ./src/widgets/upopupmenu.cpp 2006-08-19 13:31:02.000000000 -0700
@@ -86,7 +86,7 @@
/*m_popup->sigPopupAboutToClose().disconnect(m_closeSlot);
m_sigMenuAboutToClose(this);
UWidget::setVisible(false);*/
- m_popup->hide();
+ //m_popup->hide();
}
}
diff -Naur /usr/src/ufo-0.8.4/src/xml/uxul.cpp ./src/xml/uxul.cpp
--- /usr/src/ufo-0.8.4/src/xml/uxul.cpp 2005-10-24 09:00:55.000000000 -0700
+++ ./src/xml/uxul.cpp 2006-08-19 13:31:01.000000000 -0700
@@ -330,6 +330,11 @@
if ("radio" == value) {
URadioButton * radioButton = new URadioButton();
genericButton(radioElement, radioButton);
+
+ if (radioElement->Attribute("value")) {
+ radioButton->setValue(radioElement->Attribute("value"));
+ }
+
radioButton->setButtonGroup(buttonGroup);
container->add(radioButton);
}
@@ -571,11 +576,6 @@
genericWidget(widgetElement, tabBox);
container->add(tabBox);
}
-
- // generic widget attributes
- //if (widget) {
- // genericWidget(widgetElement, widget);
- //}
}
}
|