Ernst Lippe <[EMAIL PROTECTED]> writes:
> There are two possible GUI styles: dragging in the preview and using
> scrollbars. These could also be combined.
> Open issue: Scrollbars make the widget visually bigger and makes its
> internal structure more complicated. The alternative of giving the
> preview widget two GtkAdjustments, that can be used by the developer to
> "wrap" the widget with scroll-bars, does not work when the preview
> widget has a visible scroll-bar and/or zoom controls. Scroll-bars
> will not be supported in the first release of the preview widget.
I don't understand the problem here. IMO using two adjustments to
control the displayed area is very convenient and makes it perfectly
easy to add scroll-bars. I'd suggest you try to come up with an API
that uses adjustments. Perhaps you could outlines what problems you
> Open issue: What should the GUI look like? A commonly used approach is
> to have a "+" and "-" button and a label to show the current scale.
> Another suggestion was to use spin-buttons. Because it seems most
> desirable that the scaling factors are more or less exponential the
> standard Gtk spinbuttons are not very useful. The first release of
> the preview widget will use "+" and "-" buttons.
please consider to use the icons provided by GTK+:
> Requirement 10. The preview must emit a signal when the user has
> scrolled or zoomed the preview.
> This signal can be used to synchronize multiple previews (e.g. see
> Filter Pack). This signal should contain information about the new
> position and/or scale. This signal will be emitted before the preview
> attempts to update the rendered image. The signal will only be
> emitted when the preview was scrolled by the user via the GUI. The
> signal will not be emitted when scrolling or zooming through the API.
I'd suggest not to include information about the new position and/or
scale in the signal but to provide a way to retrieve this information
from the preview widget. Actually if you go for two adjustments and
expose them in your API you don't need to deal with signals at all
since it should be sufficient to connect to the "value_changed" and
"changed" signals of the two adjustments.
> Requirement 11. The preview should have an option to emit signals
> about the scrolling position while the user is still scrolling the
> For efficiency reasons it is in general desirable that the scrolling
> signal is only emitted when the user has stopped scrolling. However,
> when the plug-in developer wants to synchronize scrolling multiple
> previews this signal must also be emitted during the scroll.
You should probably model this after gtk-range-set-update-policy():
> Requirement 12. The preview must support an API to scroll the preview
> and change the magnification.
> This functionality is needed to synchronize multiple previews.
and again you get this all for free if you go for two adjustments.
Synchronizing two previews would boil down to synchronizing the
Gimp-developer mailing list