Softly sliding of subcomponents with ResizingSplitter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Softly sliding of subcomponents with ResizingSplitter

Ulli Wenk
Hi,
does anybody knows how to implement a soft sliding of subcomponents
being top/left components of a ResizingSplitterView? Or is there already
an implementation of such an contemporary feature?
I've tried it by the following implementation but it doesn't fulfill the
simplest requirements. Only in case that one component is a graphical
view it moves softly, but with some ugly stripes during the movement. In
nearly all other cases (DataSet, normal Canvas...) it immediately
swashes after waiting half a second:

ResizingSplitterView>>moveSoftlyBy: aPoint

     self cursorWaitWhile:
         [| thePfraction |
         thePfraction := aPoint x = 0
             ifTrue: "vertically move"
                 [0@ ((aPoint y) /50)]
             ifFalse: "horizontally move"
                 [((aPoint x) /50)@0].
         50 timesRepeat:
             [self moveBy: thePfraction.
             10 milliseconds wait]].

Any ideas or hints?
Regards, Ulli

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Softly sliding of subcomponents with ResizingSplitter

Reinout Heeck-2
On 5/4/2011 1:16 PM, Ulli Wenk wrote:

> Hi,
> does anybody knows how to implement a soft sliding of subcomponents
> being top/left components of a ResizingSplitterView? Or is there already
> an implementation of such an contemporary feature?
> I've tried it by the following implementation but it doesn't fulfill the
> simplest requirements. Only in case that one component is a graphical
> view it moves softly, but with some ugly stripes during the movement. In
> nearly all other cases (DataSet, normal Canvas...) it immediately
> swashes after waiting half a second:
>
> ResizingSplitterView>>moveSoftlyBy: aPoint
>
>       self cursorWaitWhile:
>           [| thePfraction |
>           thePfraction := aPoint x = 0
>               ifTrue: "vertically move"
>                   [0@ ((aPoint y) /50)]
>               ifFalse: "horizontally move"
>                   [((aPoint x) /50)@0].
>           50 timesRepeat:
>               [self moveBy: thePfraction.
>               10 milliseconds wait]].
>
> Any ideas or hints?

I would try this:
just after the #moveBy: force the windowmanager to repaint all changed
areas, probably something like:

self topComponent ifNotNil: [:window | window windowManger repairDamages]



R
-


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc