cleaned all trailing white space from source files.
[sdk] / ecere / src / gui / controls / ScrollBar.ec
index 404ca1c..4c897b0 100644 (file)
@@ -63,7 +63,7 @@ public:
             // SNAPDOWN(position, lineStep);
 
          if(position < 0) position = 0;
-         if(position >= range) 
+         if(position >= range)
             position = range - 1;
 
          if(thumb)
@@ -84,7 +84,7 @@ public:
    property bool snap { property_category $"Behavior" set { sbStyle.snap = value; } get { return sbStyle.snap; } };
    property int range
    {
-      property_category $"Behavior" 
+      property_category $"Behavior"
       set
       {
          total = value + seen - 1;
@@ -95,7 +95,7 @@ public:
    // Improve this, needs to be done in 2 so updates commented out for seen
    property int seen
    {
-      property_category $"Behavior" 
+      property_category $"Behavior"
       set
       {
          if(this)
@@ -111,7 +111,7 @@ public:
    };
    property int total
    {
-      property_category $"Behavior" 
+      property_category $"Behavior"
       set
       {
          if(this)
@@ -174,7 +174,7 @@ private:
       bool NotifyPushed(Button button, int x, int y, Modifiers mods)
       {
          action = down;
-         Action(action, 0, (Key)mods);
+         Action(action, 0, Key { modifiers = mods });
          timer.Start();
          return true;
       }
@@ -186,8 +186,8 @@ private:
 
       bool NotifyPushed(Button button, int x, int y, Modifiers mods)
       {
-         action = up; 
-         Action(action, 0, (Key)mods);
+         action = up;
+         Action(action, 0, Key { modifiers = mods });
          timer.Start();
          return true;
       }
@@ -220,7 +220,7 @@ private:
                }
                position = y - thumbClick.y + thumb.position.y;
                if(height)
-                  position = (position - SB_HEIGHT) * (range - 1) / height;
+                  position = (int)((int64)(position - SB_HEIGHT) * (range - 1) / height);
                if(guiApp.textMode)
                {
                   SNAPUP(position, textCellH);
@@ -235,7 +235,7 @@ private:
                }
                position = x - thumbClick.x + thumb.position.x;
                if(height)
-                  position = (position - upBtn.size.w) * (range - 1) / height;
+                  position = (int)((int64)(position - upBtn.size.w) * (range - 1) / height);
                if(guiApp.textMode)
                {
                   SNAPUP(position, textCellW);
@@ -247,9 +247,9 @@ private:
                if(sbStyle.snap)
                   SNAPDOWN(position, lineStep);
                if(position == 0)
-                  Action(setPosition, position, (Key)mods);
+                  Action(setPosition, position, Key { modifiers = mods });
                else
-                  Action(setPosition, position, (Key)mods);
+                  Action(setPosition, position, Key { modifiers = mods });
             }
          }
          return true;
@@ -303,7 +303,7 @@ private:
    bool draggingThumb;
    Point pos, thumbClick;
    bool inside;
-   
+
    void OnRedraw(Surface surface)
    {
       int sbWidth = SB_WIDTH;
@@ -480,7 +480,7 @@ private:
             thumbSize = seen * size / total;
          }
          else
-            thumbSize = 0;      
+            thumbSize = 0;
 
          if(sbStyle.vertical)
          {
@@ -525,7 +525,7 @@ private:
       else
          action = pageDown;
 
-      Action(action, 0, (Key)mods);
+      Action(action, 0, Key { modifiers = mods });
       timer.Start();
 
       Update(null);
@@ -577,9 +577,9 @@ private:
       {
          case left:
          case up:     Action(up, 0, key); break;
-         case right: 
-         case down:   
-            Action(down, 0, key); 
+         case right:
+         case down:
+            Action(down, 0, key);
             break;
          case pageUp:   Action(pageUp, 0, key); break;
          case pageDown:  Action(pageDown, 0, key); break;