Added support for permanently showing the visible vectors, not only when
2003-09-12 Michael Natterer <mitch@gimp.org> Added support for permanently showing the visible vectors, not only when the vectors tool is active: * app/display/gimpdisplayshell.[ch]: added gimp_display_shell_draw_vector() which draws a single GimpVectors object and gimp_display_shell_draw_vectors() which draws all visible ones. Added "gint paused_count" and new functions gimp_display_shell_paunse()/resume(). Pause/resume the active tool and draw/undraw the visible vectors when paused_count changes from 0 to 1 and from 1 to 0. * app/display/gimpdisplayshell-callbacks.c * app/display/gimpdisplayshell-scale.c * app/display/gimpdisplayshell-scroll.c: call the new freeze()/thaw() functions instead of calling the tool_manager directly. Removes the tools/ sependency from the scale and scroll files. Also draw the vectors once when the canvas is realized so XOR drawing is in the correct state. * app/display/gimpdisplayshell-handlers.c: connect to image->vectors' "add" and "remove" signal and to the "freeze", "thaw" and "visibility_changed" signals of all vectors in image->vectors and update vectors drawing accordingly.
This commit is contained in:

committed by
Michael Natterer

parent
7cf4eb467a
commit
a0d33a531d
@ -170,6 +170,12 @@ struct _GimpDisplayShell
|
||||
|
||||
GimpDisplayShellAppearance appearance;
|
||||
GimpDisplayShellAppearance fullscreen_appearance;
|
||||
|
||||
gint paused_count;
|
||||
|
||||
GQuark vectors_freeze_handler;
|
||||
GQuark vectors_thaw_handler;
|
||||
GQuark vectors_visible_handler;
|
||||
};
|
||||
|
||||
struct _GimpDisplayShellClass
|
||||
@ -222,6 +228,9 @@ void gimp_display_shell_expose_full (GimpDisplayShell *shell);
|
||||
|
||||
void gimp_display_shell_flush (GimpDisplayShell *shell);
|
||||
|
||||
void gimp_display_shell_pause (GimpDisplayShell *shell);
|
||||
void gimp_display_shell_resume (GimpDisplayShell *shell);
|
||||
|
||||
void gimp_display_shell_draw_area (GimpDisplayShell *shell,
|
||||
gint x,
|
||||
gint y,
|
||||
@ -235,6 +244,10 @@ void gimp_display_shell_draw_guides (GimpDisplayShell *shell);
|
||||
|
||||
void gimp_display_shell_draw_grid (GimpDisplayShell *shell);
|
||||
|
||||
void gimp_display_shell_draw_vector (GimpDisplayShell *shell,
|
||||
GimpVectors *vectors);
|
||||
void gimp_display_shell_draw_vectors (GimpDisplayShell *shell);
|
||||
|
||||
void gimp_display_shell_update_icon (GimpDisplayShell *shell);
|
||||
|
||||
void gimp_display_shell_shrink_wrap (GimpDisplayShell *shell);
|
||||
|
Reference in New Issue
Block a user