summaryrefslogtreecommitdiff
path: root/fluid/Fl_Widget_Type.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2008-08-15 20:32:01 +0000
committerMatthias Melcher <fltk@matthiasm.com>2008-08-15 20:32:01 +0000
commit3d6201a610acd8f0a83b2e985370d455cff57735 (patch)
treeeff57b9f3f0f5ecd10fe4d5cf824d0edeb238330 /fluid/Fl_Widget_Type.cxx
parent358af515f7ebfc7c45d9ca5c1c38b604d9817bff (diff)
Made the 'align' flags somewhat more typesafe and the associated functions more self explenatory. The large commit results from a new run of Fluid of the Fluid .fl files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6160 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/Fl_Widget_Type.cxx')
-rw-r--r--fluid/Fl_Widget_Type.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx
index e1213008a..9ea39fcfe 100644
--- a/fluid/Fl_Widget_Type.cxx
+++ b/fluid/Fl_Widget_Type.cxx
@@ -1133,7 +1133,7 @@ static Fl_Menu_Item alignmenu[] = {
{0}};
void align_cb(Fl_Button* i, void *v) {
- int b = int(long(i->user_data()));
+ Fl_Align b = Fl_Align(long(i->user_data()));
if (v == LOAD) {
if (current_widget->is_menu_item()) {i->deactivate(); return;} else i->activate();
i->value(current_widget->o->align() & b);
@@ -1142,8 +1142,8 @@ void align_cb(Fl_Button* i, void *v) {
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
if (o->selected && o->is_widget()) {
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
- int x = q->o->align();
- int y;
+ Fl_Align x = q->o->align();
+ Fl_Align y;
if (i->value()) {
y = x | b;
if (b == FL_ALIGN_LEFT || b == FL_ALIGN_TOP) {
@@ -2260,10 +2260,10 @@ void Fl_Widget_Type::write_widget_code() {
}
if (o->align() != tplate->align() || subclass()) {
int i = o->align();
- write_c("%s%s->align(%s", indent(), var,
+ write_c("%s%s->align(Fl_Align(%s", indent(), var,
item_name(alignmenu, i & ~FL_ALIGN_INSIDE));
if (i & FL_ALIGN_INSIDE) write_c("|FL_ALIGN_INSIDE");
- write_c(");\n");
+ write_c("));\n");
}
// avoid the unsupported combination of flegs when user sets
// "when" to "FL_WHEN_NEVER", but keeps the "no change" set.