added mousewheel support
authorRob Haarsma <phaseIV@zonnet.nl>
Tue, 28 Jan 2003 00:18:16 +0000 (00:18 +0000)
committerRob Haarsma <phaseIV@zonnet.nl>
Tue, 28 Jan 2003 00:18:16 +0000 (00:18 +0000)
source/blender/src/drawtext.c
source/blender/src/editimasel.c
source/blender/src/editsound.c

index eb79095b7dd9d7ac77bbdc8cd924f87b6f1d5ee8..178710f93872c9372ba5d441d4408c5c6f744c05 100644 (file)
@@ -1140,6 +1140,16 @@ void winqreadtextspace(unsigned short event, short val, char ascii)
                        screen_skip(st, -st->viewlines);
                        do_draw= 1;
                        break;
+
+               case WHEELUPMOUSE:
+                       screen_skip(st, -3);
+                       do_draw= 1;
+                       break;
+
+               case WHEELDOWNMOUSE:
+                       screen_skip(st, 3);
+                       do_draw= 1;
+                       break;
                }
        }
 
index de45951b33d02de7935eecdf482e2844703b029c..c572e17d6c195c111411bb4d1eed2717cc330cf2 100644 (file)
@@ -267,6 +267,31 @@ void winqreadimasel(unsigned short event, short val, char ascii)
                }
                break;
                
+       case WHEELUPMOUSE:
+       case WHEELDOWNMOUSE:
+               switch(area_event){
+               case IMS_INDIRSLI:
+               case IMS_INDIR:
+                       if (simasel->dirsli){
+                               if (event == WHEELUPMOUSE)      simasel->topdir -= 1;
+                               if (event == WHEELDOWNMOUSE)    simasel->topdir += 1;   
+                               queredraw = 1;
+                       }
+                       break;
+               case IMS_INFILESLI:
+               case IMS_INFILE:
+                       if(simasel->imasli){
+                               if (event == WHEELUPMOUSE)      simasel->image_slider -= 0.2 * simasel->slider_height;
+                               if (event == WHEELDOWNMOUSE)    simasel->image_slider += 0.2 * simasel->slider_height;
+                               
+                               if(simasel->image_slider < 0.0) simasel->image_slider = 0.0;
+                               if(simasel->image_slider > 1.0) simasel->image_slider = 1.0;
+                               queredraw = 1;
+                       }       
+                       break;
+               }
+               break;
+
        case PAGEUPKEY:
        case PAGEDOWNKEY:
                switch(area_event){
index d4cc52bcb8f036b27d942698d93efb4fb292d112..b9c2f8282810c023b4d335fb8ab995d6f0d76175 100644 (file)
@@ -140,6 +140,7 @@ void winqreadsoundspace(unsigned short event, short val, char ascii)
                case RIGHTMOUSE:
                        /* mouse_select_seq(); */
                        break;
+               case WHEELDOWNMOUSE:
                case PADPLUSKEY:
                        dx= (float)(0.1154*(G.v2d->cur.xmax-G.v2d->cur.xmin));
                        G.v2d->cur.xmin+= dx;
@@ -148,6 +149,7 @@ void winqreadsoundspace(unsigned short event, short val, char ascii)
 
                        doredraw= 1;
                        break;
+               case WHEELUPMOUSE:
                case PADMINUS:
                        dx= (float)(0.15*(G.v2d->cur.xmax-G.v2d->cur.xmin));
                        G.v2d->cur.xmin-= dx;