changeset 1794:a973b2fa80aa

when
author corvid <corvid@lavabit.com>
date Thu, 06 Jan 2011 03:09:45 +0000
parents 02c3ad96082d
children 0099818bc45b
files dw/fltkui.cc src/findbar.cc src/ui.cc
diffstat 3 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/dw/fltkui.cc	Thu Jan 06 03:05:02 2011 +0000
+++ b/dw/fltkui.cc	Thu Jan 06 03:09:45 2011 +0000
@@ -262,7 +262,7 @@
                             label);
    button->set_flag (::fltk::RAW_LABEL);
    button->callback (widgetCallback, this);
-   button->when (::fltk::WHEN_RELEASE);
+   button->when (FL_WHEN_RELEASE);
    return button;
 }
 
@@ -315,7 +315,7 @@
 void FltkLabelButtonResource::widgetCallback (::fltk::Widget *widget,
                                               void *data)
 {
-   if ((widget->when () & ::fltk::WHEN_RELEASE) &&
+   if ((widget->when () & FL_WHEN_RELEASE) &&
        ((Fl::event_key() == FL_Enter) ||
         (Fl::event_button() == FL_LEFT_MOUSE ||
          Fl::event_button() == FL_MIDDLE_MOUSE))) {
@@ -363,7 +363,7 @@
 {
    FltkComplexButtonResource *res = (FltkComplexButtonResource*)data;
 
-   if (widget->when() == ::fltk::WHEN_RELEASE &&
+   if (widget->when() == FL_WHEN_RELEASE &&
        ((Fl::event_key() == FL_Enter) ||
         (Fl::event_button() == FL_LEFT_MOUSE ||
          Fl::event_button() == FL_MIDDLE_MOUSE))) {
@@ -430,7 +430,7 @@
       new ComplexButton (allocation->x, allocation->y, allocation->width,
                          allocation->ascent + allocation->descent);
    button->callback (widgetCallback, this);
-   button->when (::fltk::WHEN_RELEASE);
+   button->when (FL_WHEN_RELEASE);
    if (!relief)
       button->box(::fltk::FLAT_BOX);
 
@@ -479,7 +479,7 @@
    if (password)
       input->type(::fltk::Input::SECRET);
    input->callback (widgetCallback, this);
-   input->when (::fltk::WHEN_ENTER_KEY_ALWAYS);
+   input->when (FL_WHEN_ENTER_KEY_ALWAYS);
 
    if (label) {
       input->label(label);
@@ -525,7 +525,7 @@
     * page. BUG: this must be investigated and reported to FLTK2 team
     */
    _MSG("when = %d\n", widget->when ());
-   if ((widget->when () & ::fltk::WHEN_ENTER_KEY_ALWAYS) &&
+   if ((widget->when () & FL_WHEN_ENTER_KEY_ALWAYS) &&
        (Fl::event_key() == FL_Enter))
       ((FltkEntryResource*)data)->emitActivate ();
 }
@@ -801,7 +801,7 @@
 void FltkRadioButtonResource::widgetCallback (::fltk::Widget *widget,
                                               void *data)
 {
-   if (widget->when () & ::fltk::WHEN_CHANGED)
+   if (widget->when () & FL_WHEN_CHANGED)
       ((FltkRadioButtonResource*)data)->buttonClicked ();
 }
 
@@ -834,7 +834,7 @@
                                allocation->width,
                                allocation->ascent + allocation->descent);
    button->set_flag (::fltk::RAW_LABEL);
-   button->when (::fltk::WHEN_CHANGED);
+   button->when (FL_WHEN_CHANGED);
    button->callback (widgetCallback, this);
    button->type (::fltk::Button::TOGGLE);
 
@@ -1149,7 +1149,7 @@
       menu->type(::fltk::Browser::MULTI);
    menu->set_flag (::fltk::RAW_LABEL);
    menu->callback(widgetCallback,this);
-   menu->when(::fltk::WHEN_CHANGED);
+   menu->when(FL_WHEN_CHANGED);
    return menu;
 }
 
--- a/src/findbar.cc	Thu Jan 06 03:05:02 2011 +0000
+++ b/src/findbar.cc	Thu Jan 06 03:09:45 2011 +0000
@@ -132,7 +132,7 @@
     x += input_width + gap;
     resizable(i);
     i->color(206);
-    i->when(WHEN_ENTER_KEY_ALWAYS);
+    i->when(FL_WHEN_ENTER_KEY_ALWAYS);
     i->callback(search_cb2, this);
     i->clear_tab_to_focus();
     i->set_click_to_focus();
--- a/src/ui.cc	Thu Jan 06 03:05:02 2011 +0000
+++ b/src/ui.cc	Thu Jan 06 03:09:45 2011 +0000
@@ -469,7 +469,7 @@
 
     Input *i = Location = new CustInput(0,0,0,0,0);
     i->color(CuteColor);
-    i->when(WHEN_ENTER_KEY);
+    i->when(FL_WHEN_ENTER_KEY);
     i->callback(location_cb, this);
     i->set_click_to_focus();