Cyrille Chepelov wrote:

> Le dim, mai 20, 2001, à 12:51:48 -0600, Patrick Sung a écrit:
>
> > The problems is in ddisplay_update_scrollbars() in display.c, an extra
> > area (namely 'extra_border_x' and 'extra_border_y' is added to the
> > entire scrollable (by scroll bar) area (all 4 side).  However with key
> > scrolling it won't work because it never take those extra area into
> > account.  Since this extra area break a lot of scrolling function of
> > Dia, I would to suggest to take it off for now until we can better
> > define the scrollable area, drawing area, and viewing area (since this
> > could affect a lot of code on display.c and some other files; and may
> > also affect objects in Dia).
>
> What is the impact of your change (what was the extra_border_[xy] variables
> supposed to do) ?

When you create a new diagram, the diagram is scrollable.  This extra space is
created by the extra_border_[xy] variables when the canvas received a
GDK_CONFIGURE event (which is triggered once when new diagram is created).  Let
say if you have a preference setting of 200x200 pixels of initial visible area
size, extra_border_[xy] will give an extra 200 pixels to all four sides of the
canvas thus making available of 600x600 pixels area *to scroll*.  This extra
space is reachable only by using the scroll tool or the scroll (not mouse wheel
and arrow keys) because the ddisplay_scroll_[direction] functions are called
when the mouse wheel and key pressed event is triggered.  The ddisplay_scroll_
functions check against the diagram's extent (which is initialized to be
smaller 200x200 pixels).  Therefore those functions won't scroll the canvas
even when you see there are still 200 pixel on each side.

None of the objects aware of this extra space created as they are create on the
fly when the scrollbar position is being updated
(ddisplay_update_scrollbars()).

It would look so weird when you can still scroll up using the scroll bar but
not using the wheel or arrow keys. ;)

hope this clarify the changes. (ps. you can actually assign extra_border_[xy]
to zero and see what will happen)

Patrick

Reply via email to