- Fluid avoids writing unsopported combinations of the
"when()" flags (STR #1501) - Fl_Browser_ would allow keyboard callbacks even though "when()" was set to "never" (STR #1501) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5639 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
ecdd893933
commit
e36d3a07ce
4
CHANGES
4
CHANGES
@ -1,5 +1,9 @@
|
|||||||
CHANGES IN FLTK 1.1.8
|
CHANGES IN FLTK 1.1.8
|
||||||
|
|
||||||
|
- Fluid avoids writing unsupported combinations of the
|
||||||
|
"when()" flags (STR #1501)
|
||||||
|
- Fl_Browser_ would allow keyboard callbacks even though
|
||||||
|
"when()" was set to "never" (STR #1501)
|
||||||
- Added automated little helpers to Sudoku
|
- Added automated little helpers to Sudoku
|
||||||
- Added example code for Wizard with the
|
- Added example code for Wizard with the
|
||||||
Tabs demo (STR #1564)
|
Tabs demo (STR #1564)
|
||||||
|
@ -2223,9 +2223,15 @@ void Fl_Widget_Type::write_widget_code() {
|
|||||||
if (i & FL_ALIGN_INSIDE) write_c("|FL_ALIGN_INSIDE");
|
if (i & FL_ALIGN_INSIDE) write_c("|FL_ALIGN_INSIDE");
|
||||||
write_c(");\n");
|
write_c(");\n");
|
||||||
}
|
}
|
||||||
if (o->when() != tplate->when() || subclass())
|
// avoid the unsupported combination of flegs when user sets
|
||||||
|
// "when" to "FL_WHEN_NEVER", but keeps the "no change" set.
|
||||||
|
// FIXME: This could be reflected in the GUI by graying out the button.
|
||||||
|
Fl_When ww = o->when();
|
||||||
|
if (ww==FL_WHEN_NOT_CHANGED)
|
||||||
|
ww = FL_WHEN_NEVER;
|
||||||
|
if (ww != tplate->when() || subclass())
|
||||||
write_c("%s%s->when(%s);\n", indent(), var,
|
write_c("%s%s->when(%s);\n", indent(), var,
|
||||||
item_name(whensymbolmenu, o->when()));
|
item_name(whensymbolmenu, ww));
|
||||||
if (!o->visible() && o->parent())
|
if (!o->visible() && o->parent())
|
||||||
write_c("%s%s->hide();\n", indent(), var);
|
write_c("%s%s->hide();\n", indent(), var);
|
||||||
if (!o->active())
|
if (!o->active())
|
||||||
|
@ -578,32 +578,32 @@ int Fl_Browser_::handle(int event) {
|
|||||||
if (type()==FL_HOLD_BROWSER) switch (Fl::event_key()) {
|
if (type()==FL_HOLD_BROWSER) switch (Fl::event_key()) {
|
||||||
case FL_Down:
|
case FL_Down:
|
||||||
while ((l = item_next(l)))
|
while ((l = item_next(l)))
|
||||||
if (item_height(l)>0) {select_only(l, 1); break;}
|
if (item_height(l)>0) {select_only(l, when()); break;}
|
||||||
return 1;
|
return 1;
|
||||||
case FL_Up:
|
case FL_Up:
|
||||||
while ((l = item_prev(l))) if (item_height(l)>0) {
|
while ((l = item_prev(l))) if (item_height(l)>0) {
|
||||||
select_only(l, 1); break;}
|
select_only(l, when()); break;}
|
||||||
return 1;
|
return 1;
|
||||||
} else switch (Fl::event_key()) {
|
} else switch (Fl::event_key()) {
|
||||||
case FL_Enter:
|
case FL_Enter:
|
||||||
case FL_KP_Enter:
|
case FL_KP_Enter:
|
||||||
select_only(l, 1);
|
select_only(l, when());
|
||||||
return 1;
|
return 1;
|
||||||
case ' ':
|
case ' ':
|
||||||
selection_ = l;
|
selection_ = l;
|
||||||
select(l, !item_selected(l), 1);
|
select(l, !item_selected(l), when());
|
||||||
return 1;
|
return 1;
|
||||||
case FL_Down:
|
case FL_Down:
|
||||||
while ((l = item_next(l))) {
|
while ((l = item_next(l))) {
|
||||||
if (Fl::event_state(FL_SHIFT|FL_CTRL))
|
if (Fl::event_state(FL_SHIFT|FL_CTRL))
|
||||||
select(l, l1 ? item_selected(l1) : 1, 1);
|
select(l, l1 ? item_selected(l1) : 1, when());
|
||||||
if (item_height(l)>0) goto J1;
|
if (item_height(l)>0) goto J1;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
case FL_Up:
|
case FL_Up:
|
||||||
while ((l = item_prev(l))) {
|
while ((l = item_prev(l))) {
|
||||||
if (Fl::event_state(FL_SHIFT|FL_CTRL))
|
if (Fl::event_state(FL_SHIFT|FL_CTRL))
|
||||||
select(l, l1 ? item_selected(l1) : 1, 1);
|
select(l, l1 ? item_selected(l1) : 1, when());
|
||||||
if (item_height(l)>0) goto J1;
|
if (item_height(l)>0) goto J1;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user