changeset 1792:c4dd094670d3

more key/button modifiers
author corvid <corvid@lavabit.com>
date Thu, 06 Jan 2011 02:56:14 +0000
parents 8a5a07c67265
children 02c3ad96082d
files dw/fltkui.cc dw/fltkviewbase.cc dw/fltkviewport.cc
diffstat 3 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/dw/fltkui.cc	Thu Jan 06 02:51:08 2011 +0000
+++ b/dw/fltkui.cc	Thu Jan 06 02:56:14 2011 +0000
@@ -293,12 +293,12 @@
    int s1 = ::fltk::event_state ();
    int s2 = (core::ButtonState)0;
 
-   if (s1 & ::fltk::SHIFT)   s2 |= core::SHIFT_MASK;
-   if (s1 & ::fltk::CTRL)    s2 |= core::CONTROL_MASK;
-   if (s1 & ::fltk::ALT)     s2 |= core::META_MASK;
-   if (s1 & ::fltk::BUTTON1) s2 |= core::BUTTON1_MASK;
-   if (s1 & ::fltk::BUTTON2) s2 |= core::BUTTON2_MASK;
-   if (s1 & ::fltk::BUTTON3) s2 |= core::BUTTON3_MASK;
+   if (s1 & FL_SHIFT)   s2 |= core::SHIFT_MASK;
+   if (s1 & FL_CTRL)    s2 |= core::CONTROL_MASK;
+   if (s1 & FL_ALT)     s2 |= core::META_MASK;
+   if (s1 & FL_BUTTON1) s2 |= core::BUTTON1_MASK;
+   if (s1 & FL_BUTTON2) s2 |= core::BUTTON2_MASK;
+   if (s1 & FL_BUTTON3) s2 |= core::BUTTON3_MASK;
 
    return (core::ButtonState)s2;
 }
--- a/dw/fltkviewbase.cc	Thu Jan 06 02:51:08 2011 +0000
+++ b/dw/fltkviewbase.cc	Thu Jan 06 02:56:14 2011 +0000
@@ -187,12 +187,12 @@
    int s1 = Fl::event_state ();
    int s2 = (core::ButtonState)0;
 
-   if (s1 & SHIFT)   s2 |= core::SHIFT_MASK;
-   if (s1 & CTRL)    s2 |= core::CONTROL_MASK;
-   if (s1 & ALT)     s2 |= core::META_MASK;
-   if (s1 & BUTTON1) s2 |= core::BUTTON1_MASK;
-   if (s1 & BUTTON2) s2 |= core::BUTTON2_MASK;
-   if (s1 & BUTTON3) s2 |= core::BUTTON3_MASK;
+   if (s1 & FL_SHIFT)   s2 |= core::SHIFT_MASK;
+   if (s1 & FL_CTRL)    s2 |= core::CONTROL_MASK;
+   if (s1 & FL_ALT)     s2 |= core::META_MASK;
+   if (s1 & FL_BUTTON1) s2 |= core::BUTTON1_MASK;
+   if (s1 & FL_BUTTON2) s2 |= core::BUTTON2_MASK;
+   if (s1 & FL_BUTTON3) s2 |= core::BUTTON3_MASK;
 
    return (core::ButtonState)s2;
 }
--- a/dw/fltkviewport.cc	Thu Jan 06 02:51:08 2011 +0000
+++ b/dw/fltkviewport.cc	Thu Jan 06 02:56:14 2011 +0000
@@ -215,7 +215,7 @@
    _MSG("FltkViewport::handle %d\n", event);
 
    if (hscrollbar->Rectangle::contains (Fl::event_x (), Fl::event_y ()) &&
-       !(Fl::event_state() & (SHIFT | CTRL | ALT)) &&
+       !(Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT)) &&
        hscrollbar->send (event)) {
       return 1;
    }