1997-11-25 06:05:25 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
1998-04-13 13:44:11 +08:00
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
1997-11-25 06:05:25 +08:00
|
|
|
*/
|
2000-12-17 05:37:03 +08:00
|
|
|
|
1999-03-07 20:56:03 +08:00
|
|
|
#include "config.h"
|
|
|
|
|
2000-12-17 05:37:03 +08:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2001-01-25 06:36:18 +08:00
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
|
|
|
|
2000-12-17 05:37:03 +08:00
|
|
|
#include "apptypes.h"
|
|
|
|
|
2001-05-09 03:29:15 +08:00
|
|
|
#include "widgets/gimpdnd.h"
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "disp_callbacks.h"
|
|
|
|
#include "gdisplay_ops.h"
|
2001-04-22 08:38:56 +08:00
|
|
|
#include "gimpui.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
#include "interface.h"
|
|
|
|
#include "gui/menus.h"
|
|
|
|
#include "nav_window.h"
|
|
|
|
|
1999-09-28 01:58:10 +08:00
|
|
|
#include "gimphelp.h"
|
2001-01-22 11:30:42 +08:00
|
|
|
#include "gimpimage.h"
|
2001-02-20 07:37:49 +08:00
|
|
|
#include "gimppattern.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "gimprc.h"
|
1999-07-07 11:18:54 +08:00
|
|
|
#include "qmask.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1999-07-07 11:18:54 +08:00
|
|
|
#include "pixmaps/qmasksel.xpm"
|
|
|
|
#include "pixmaps/qmasknosel.xpm"
|
1999-09-02 06:39:44 +08:00
|
|
|
#include "pixmaps/navbutton.xpm"
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1998-11-23 22:47:09 +08:00
|
|
|
#include "libgimp/gimpintl.h"
|
|
|
|
|
2000-02-09 07:45:20 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
/* local functions */
|
2001-01-22 11:30:42 +08:00
|
|
|
static void gdisplay_destroy (GtkWidget *widget,
|
|
|
|
GDisplay *display);
|
|
|
|
static gint gdisplay_delete (GtkWidget *widget,
|
|
|
|
GdkEvent *event,
|
|
|
|
GDisplay *display);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1999-08-20 03:53:30 +08:00
|
|
|
static GtkTargetEntry display_target_table[] =
|
|
|
|
{
|
|
|
|
GIMP_TARGET_LAYER,
|
|
|
|
GIMP_TARGET_CHANNEL,
|
1999-08-23 22:19:26 +08:00
|
|
|
GIMP_TARGET_LAYER_MASK,
|
1999-10-10 04:33:53 +08:00
|
|
|
GIMP_TARGET_COLOR,
|
|
|
|
GIMP_TARGET_PATTERN
|
1999-08-20 03:53:30 +08:00
|
|
|
};
|
|
|
|
static guint display_n_targets = (sizeof (display_target_table) /
|
|
|
|
sizeof (display_target_table[0]));
|
1999-07-01 17:13:39 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
static void
|
new ui for the "Layer Offset" dialog.
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
|
|
|
gdisplay_destroy (GtkWidget *widget,
|
1997-11-25 06:05:25 +08:00
|
|
|
GDisplay *gdisp)
|
|
|
|
{
|
|
|
|
gdisplay_remove_and_delete (gdisp);
|
|
|
|
}
|
|
|
|
|
2001-01-22 11:30:42 +08:00
|
|
|
static gboolean
|
new ui for the "Layer Offset" dialog.
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
|
|
|
gdisplay_delete (GtkWidget *widget,
|
|
|
|
GdkEvent *event,
|
1999-06-21 07:29:34 +08:00
|
|
|
GDisplay *gdisp)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
|
|
|
gdisplay_close_window (gdisp, FALSE);
|
|
|
|
|
1998-03-15 11:15:35 +08:00
|
|
|
return TRUE;
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
2001-04-22 08:38:56 +08:00
|
|
|
static gpointer
|
2001-04-21 02:01:29 +08:00
|
|
|
gdisplay_get_accel_context (gpointer data)
|
|
|
|
{
|
|
|
|
GDisplay *gdisp;
|
|
|
|
|
|
|
|
gdisp = (GDisplay *) data;
|
|
|
|
|
|
|
|
if (gdisp)
|
|
|
|
return gdisp->gimage;
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
void
|
2000-04-02 23:34:30 +08:00
|
|
|
create_display_shell (GDisplay *gdisp,
|
new ui for the "Layer Offset" dialog.
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
|
|
|
gint width,
|
|
|
|
gint height,
|
|
|
|
gchar *title,
|
|
|
|
gint type)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2000-02-09 07:45:20 +08:00
|
|
|
static GdkPixmap *qmasksel_pixmap = NULL;
|
|
|
|
static GdkBitmap *qmasksel_mask = NULL;
|
|
|
|
static GdkPixmap *qmasknosel_pixmap = NULL;
|
|
|
|
static GdkBitmap *qmasknosel_mask = NULL;
|
|
|
|
static GdkPixmap *navbutton_pixmap = NULL;
|
|
|
|
static GdkBitmap *navbutton_mask = NULL;
|
2000-04-02 23:34:30 +08:00
|
|
|
|
|
|
|
GtkWidget *main_vbox;
|
|
|
|
GtkWidget *disp_vbox;
|
|
|
|
GtkWidget *upper_hbox;
|
|
|
|
GtkWidget *lower_hbox;
|
|
|
|
GtkWidget *inner_table;
|
|
|
|
GtkWidget *status_hbox;
|
1998-06-09 17:20:46 +08:00
|
|
|
GtkWidget *arrow;
|
1999-07-07 11:18:54 +08:00
|
|
|
GtkWidget *pixmap;
|
2000-04-02 23:34:30 +08:00
|
|
|
GtkWidget *label_frame;
|
|
|
|
GtkWidget *nav_ebox;
|
1999-07-07 11:18:54 +08:00
|
|
|
|
|
|
|
GSList *group = NULL;
|
|
|
|
|
1999-11-03 17:58:46 +08:00
|
|
|
gint n_width, n_height;
|
|
|
|
gint s_width, s_height;
|
|
|
|
gint scalesrc, scaledest;
|
|
|
|
gint contextid;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-01-22 11:30:42 +08:00
|
|
|
/* adjust the initial scale -- so that window fits on screen
|
|
|
|
* the 75% value is the same as in gdisplay_shrink_wrap. It
|
|
|
|
* probably should be a user-configurable option.
|
|
|
|
*/
|
2000-11-12 08:43:15 +08:00
|
|
|
s_width = gdk_screen_width () * 0.75;
|
|
|
|
s_height = gdk_screen_height () * 0.75;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
scalesrc = SCALESRC (gdisp);
|
|
|
|
scaledest = SCALEDEST (gdisp);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
n_width = SCALEX (gdisp, width);
|
|
|
|
n_height = SCALEX (gdisp, height);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* Limit to the size of the screen... */
|
|
|
|
while (n_width > s_width || n_height > s_height)
|
|
|
|
{
|
|
|
|
if (scaledest > 1)
|
|
|
|
scaledest--;
|
|
|
|
else
|
|
|
|
if (scalesrc < 0xff)
|
|
|
|
scalesrc++;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
n_width = width *
|
|
|
|
(scaledest * SCREEN_XRES (gdisp)) / (scalesrc * gdisp->gimage->xresolution);
|
|
|
|
n_height = height *
|
|
|
|
(scaledest * SCREEN_XRES (gdisp)) / (scalesrc * gdisp->gimage->xresolution);
|
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
gdisp->scale = (scaledest << 8) + scalesrc;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* the toplevel shell */
|
1997-11-25 06:05:25 +08:00
|
|
|
gdisp->shell = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
1998-02-14 23:30:31 +08:00
|
|
|
gtk_widget_ref (gdisp->shell);
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_window_set_title (GTK_WINDOW (gdisp->shell), title);
|
1998-01-26 06:13:00 +08:00
|
|
|
gtk_window_set_wmclass (GTK_WINDOW (gdisp->shell), "image_window", "Gimp");
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_window_set_policy (GTK_WINDOW (gdisp->shell), TRUE, TRUE, TRUE);
|
|
|
|
gtk_object_set_user_data (GTK_OBJECT (gdisp->shell), (gpointer) gdisp);
|
2001-01-22 11:30:42 +08:00
|
|
|
gtk_widget_set_events (gdisp->shell, (GDK_POINTER_MOTION_MASK |
|
|
|
|
GDK_POINTER_MOTION_HINT_MASK |
|
|
|
|
GDK_BUTTON_PRESS_MASK |
|
|
|
|
GDK_KEY_PRESS_MASK |
|
|
|
|
GDK_KEY_RELEASE_MASK));
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "delete_event",
|
|
|
|
GTK_SIGNAL_FUNC (gdisplay_delete),
|
|
|
|
gdisp);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "destroy",
|
1999-10-27 02:27:27 +08:00
|
|
|
GTK_SIGNAL_FUNC (gdisplay_destroy),
|
1997-11-25 06:05:25 +08:00
|
|
|
gdisp);
|
|
|
|
|
1999-08-20 03:53:30 +08:00
|
|
|
/* active display callback */
|
1999-06-04 02:28:39 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "button_press_event",
|
1999-10-27 02:27:27 +08:00
|
|
|
GTK_SIGNAL_FUNC (gdisplay_shell_events),
|
1999-06-04 02:28:39 +08:00
|
|
|
gdisp);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "key_press_event",
|
1999-10-27 02:27:27 +08:00
|
|
|
GTK_SIGNAL_FUNC (gdisplay_shell_events),
|
1999-06-04 02:28:39 +08:00
|
|
|
gdisp);
|
|
|
|
|
1999-08-20 03:53:30 +08:00
|
|
|
/* dnd stuff */
|
|
|
|
gtk_drag_dest_set (gdisp->shell,
|
|
|
|
GTK_DEST_DEFAULT_ALL,
|
|
|
|
display_target_table, display_n_targets,
|
|
|
|
GDK_ACTION_COPY);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "drag_drop",
|
|
|
|
GTK_SIGNAL_FUNC (gdisplay_drag_drop),
|
|
|
|
gdisp);
|
1999-10-28 23:05:49 +08:00
|
|
|
gimp_dnd_color_dest_set (gdisp->shell, gdisplay_drop_color, gdisp);
|
2001-02-20 07:37:49 +08:00
|
|
|
gimp_dnd_viewable_dest_set (gdisp->shell,
|
|
|
|
GIMP_TYPE_PATTERN,
|
2001-05-03 20:26:05 +08:00
|
|
|
gdisplay_drop_pattern, gdisp);
|
1999-08-20 03:53:30 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* the popup menu */
|
2001-04-21 00:27:44 +08:00
|
|
|
gdisp->ifactory = menus_get_image_factory ();
|
1998-06-15 12:46:32 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* The accelerator table for images */
|
2001-04-21 02:01:29 +08:00
|
|
|
gimp_window_add_accel_group (GTK_WINDOW (gdisp->shell),
|
|
|
|
gdisp->ifactory,
|
|
|
|
gdisplay_get_accel_context,
|
|
|
|
gdisp);
|
2000-04-02 23:34:30 +08:00
|
|
|
|
|
|
|
/* connect the "F1" help key */
|
|
|
|
gimp_help_connect_help_accel (gdisp->shell,
|
|
|
|
gimp_standard_help_func,
|
|
|
|
"image/image_window.html");
|
|
|
|
|
|
|
|
/* GtkTable widgets are not able to shrink a row/column correctly if
|
|
|
|
* widgets are attached with GTK_EXPAND even if those widgets have
|
|
|
|
* other rows/columns in their rowspan/colspan where they could
|
|
|
|
* nicely expand without disturbing the row/column which is supposed
|
|
|
|
* to shrink. --Mitch
|
|
|
|
*
|
|
|
|
* Changed the packing to use hboxes and vboxes which behave nicer:
|
|
|
|
*
|
|
|
|
* main_vbox
|
|
|
|
* |
|
|
|
|
* +-- disp_vbox
|
|
|
|
* | |
|
|
|
|
* | +-- upper_hbox
|
|
|
|
* | | |
|
|
|
|
* | | +-- inner_table
|
|
|
|
* | | | |
|
|
|
|
* | | | +-- origin
|
|
|
|
* | | | +-- hruler
|
|
|
|
* | | | +-- vruler
|
|
|
|
* | | | +-- canvas
|
|
|
|
* | | |
|
|
|
|
* | | +-- vscrollbar
|
|
|
|
* | |
|
|
|
|
* | +-- lower_hbox
|
|
|
|
* | |
|
|
|
|
* | +-- qmaskoff
|
|
|
|
* | +-- qmaskon
|
|
|
|
* | +-- hscrollbar
|
|
|
|
* | +-- navbutton
|
|
|
|
* |
|
|
|
|
* +-- statusarea
|
|
|
|
* |
|
|
|
|
* +-- cursorlabel
|
|
|
|
* +-- statusbar
|
|
|
|
* +-- progressbar
|
|
|
|
* +-- cancelbutton
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* first, set up the container hierarchy *********************************/
|
|
|
|
|
|
|
|
/* the vbox containing all widgets */
|
|
|
|
main_vbox = gtk_vbox_new (FALSE, 2);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 2);
|
|
|
|
gtk_container_add (GTK_CONTAINER (gdisp->shell), main_vbox);
|
|
|
|
|
|
|
|
/* another vbox for everything except the statusbar */
|
|
|
|
disp_vbox = gtk_vbox_new (FALSE, 1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (main_vbox), disp_vbox, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (disp_vbox);
|
|
|
|
|
|
|
|
/* a hbox for the inner_table and the vertical scrollbar */
|
|
|
|
upper_hbox = gtk_hbox_new (FALSE, 1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (disp_vbox), upper_hbox, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (upper_hbox);
|
|
|
|
|
|
|
|
/* the table containing origin, rulers and the canvas */
|
|
|
|
inner_table = gtk_table_new (2, 2, FALSE);
|
|
|
|
gtk_table_set_col_spacing (GTK_TABLE (inner_table), 0, 1);
|
|
|
|
gtk_table_set_row_spacing (GTK_TABLE (inner_table), 0, 1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (upper_hbox), inner_table, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (inner_table);
|
|
|
|
|
|
|
|
/* the hbox containing qmask buttons, vertical scrollbar and nav button */
|
|
|
|
lower_hbox = gtk_hbox_new (FALSE, 1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (disp_vbox), lower_hbox, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (lower_hbox);
|
|
|
|
|
|
|
|
/* eventbox and hbox for status area */
|
|
|
|
gdisp->statusarea = gtk_event_box_new ();
|
|
|
|
gtk_box_pack_start (GTK_BOX (main_vbox), gdisp->statusarea, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
gimp_help_set_help_data (gdisp->statusarea, NULL, "#status_area");
|
|
|
|
|
|
|
|
status_hbox = gtk_hbox_new (FALSE, 2);
|
|
|
|
gtk_container_add (GTK_CONTAINER (gdisp->statusarea), status_hbox);
|
|
|
|
gtk_widget_show (status_hbox);
|
|
|
|
|
|
|
|
gtk_container_set_resize_mode (GTK_CONTAINER (status_hbox),
|
|
|
|
GTK_RESIZE_QUEUE);
|
1998-06-15 12:46:32 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* create the scrollbars *************************************************/
|
1999-11-03 17:58:46 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* the horizontal scrollbar */
|
|
|
|
gdisp->hsbdata =
|
|
|
|
GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, width, 1, 1, width));
|
|
|
|
gdisp->hsb = gtk_hscrollbar_new (gdisp->hsbdata);
|
|
|
|
GTK_WIDGET_UNSET_FLAGS (gdisp->hsb, GTK_CAN_FOCUS);
|
1999-11-03 17:58:46 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* the vertical scrollbar */
|
|
|
|
gdisp->vsbdata =
|
|
|
|
GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, height, 1, 1, height));
|
|
|
|
gdisp->vsb = gtk_vscrollbar_new (gdisp->vsbdata);
|
|
|
|
GTK_WIDGET_UNSET_FLAGS (gdisp->vsb, GTK_CAN_FOCUS);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* create the contents of the inner_table ********************************/
|
1998-06-15 10:25:27 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* the menu popup button */
|
1998-06-09 17:20:46 +08:00
|
|
|
gdisp->origin = gtk_button_new ();
|
1999-06-04 02:28:39 +08:00
|
|
|
GTK_WIDGET_UNSET_FLAGS (gdisp->origin, GTK_CAN_FOCUS);
|
1998-06-09 17:20:46 +08:00
|
|
|
gtk_widget_set_events (GTK_WIDGET (gdisp->origin),
|
|
|
|
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->origin), "button_press_event",
|
1999-10-27 02:27:27 +08:00
|
|
|
GTK_SIGNAL_FUNC (gdisplay_origin_button_press),
|
1998-06-09 17:20:46 +08:00
|
|
|
gdisp);
|
1998-07-20 23:07:13 +08:00
|
|
|
|
1999-11-03 17:58:46 +08:00
|
|
|
gimp_help_set_help_data (gdisp->origin, NULL, "#origin_button");
|
|
|
|
|
1998-06-09 17:20:46 +08:00
|
|
|
arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_OUT);
|
1999-03-12 11:44:59 +08:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (gdisp->origin), 0);
|
1998-06-09 17:20:46 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (gdisp->origin), arrow);
|
2000-04-02 23:34:30 +08:00
|
|
|
gtk_widget_show (arrow);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* the horizontal ruler */
|
1997-11-25 06:05:25 +08:00
|
|
|
gdisp->hrule = gtk_hruler_new ();
|
|
|
|
gtk_widget_set_events (GTK_WIDGET (gdisp->hrule),
|
|
|
|
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
|
|
|
gtk_signal_connect_object (GTK_OBJECT (gdisp->shell), "motion_notify_event",
|
1999-10-27 02:27:27 +08:00
|
|
|
GTK_SIGNAL_FUNC (GTK_WIDGET_CLASS (GTK_OBJECT (gdisp->hrule)->klass)->motion_notify_event),
|
1997-11-25 06:05:25 +08:00
|
|
|
GTK_OBJECT (gdisp->hrule));
|
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->hrule), "button_press_event",
|
1999-10-27 02:27:27 +08:00
|
|
|
GTK_SIGNAL_FUNC (gdisplay_hruler_button_press),
|
1997-11-25 06:05:25 +08:00
|
|
|
gdisp);
|
|
|
|
|
1999-11-03 17:58:46 +08:00
|
|
|
gimp_help_set_help_data (gdisp->hrule, NULL, "#ruler");
|
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* the vertical ruler */
|
1997-11-25 06:05:25 +08:00
|
|
|
gdisp->vrule = gtk_vruler_new ();
|
|
|
|
gtk_widget_set_events (GTK_WIDGET (gdisp->vrule),
|
|
|
|
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
|
|
|
gtk_signal_connect_object (GTK_OBJECT (gdisp->shell), "motion_notify_event",
|
1999-10-27 02:27:27 +08:00
|
|
|
GTK_SIGNAL_FUNC (GTK_WIDGET_CLASS (GTK_OBJECT (gdisp->vrule)->klass)->motion_notify_event),
|
1997-11-25 06:05:25 +08:00
|
|
|
GTK_OBJECT (gdisp->vrule));
|
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->vrule), "button_press_event",
|
1999-10-27 02:27:27 +08:00
|
|
|
GTK_SIGNAL_FUNC (gdisplay_vruler_button_press),
|
1997-11-25 06:05:25 +08:00
|
|
|
gdisp);
|
|
|
|
|
1999-11-03 17:58:46 +08:00
|
|
|
gimp_help_set_help_data (gdisp->vrule, NULL, "#ruler");
|
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* the canvas */
|
|
|
|
gdisp->canvas = gtk_drawing_area_new ();
|
|
|
|
gtk_drawing_area_size (GTK_DRAWING_AREA (gdisp->canvas), n_width, n_height);
|
|
|
|
gtk_widget_set_events (gdisp->canvas, CANVAS_EVENT_MASK);
|
|
|
|
gtk_widget_set_extension_events (gdisp->canvas, GDK_EXTENSION_EVENTS_ALL);
|
|
|
|
GTK_WIDGET_SET_FLAGS (gdisp->canvas, GTK_CAN_FOCUS);
|
|
|
|
gtk_object_set_user_data (GTK_OBJECT (gdisp->canvas), (gpointer) gdisp);
|
|
|
|
|
|
|
|
/* set the active display before doing any other canvas event processing */
|
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->canvas), "event",
|
|
|
|
GTK_SIGNAL_FUNC (gdisplay_shell_events),
|
|
|
|
gdisp);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->canvas), "event",
|
|
|
|
GTK_SIGNAL_FUNC (gdisplay_canvas_events),
|
1999-10-27 02:27:27 +08:00
|
|
|
gdisp);
|
1999-09-02 06:39:44 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* create the contents of the lower_hbox *********************************/
|
1999-11-03 17:58:46 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* the qmask buttons */
|
1999-10-27 02:27:27 +08:00
|
|
|
gdisp->qmaskoff = gtk_radio_button_new (group);
|
1999-07-07 11:18:54 +08:00
|
|
|
group = gtk_radio_button_group (GTK_RADIO_BUTTON (gdisp->qmaskoff));
|
2000-04-02 23:34:30 +08:00
|
|
|
gtk_widget_set_usize (GTK_WIDGET (gdisp->qmaskoff), 15, 15);
|
1999-07-07 11:18:54 +08:00
|
|
|
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (gdisp->qmaskoff), FALSE);
|
2000-04-02 23:34:30 +08:00
|
|
|
GTK_WIDGET_UNSET_FLAGS (gdisp->qmaskoff, GTK_CAN_FOCUS);
|
1999-07-07 11:18:54 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskoff), "toggled",
|
1999-10-27 02:27:27 +08:00
|
|
|
GTK_SIGNAL_FUNC (qmask_deactivate),
|
|
|
|
gdisp);
|
1999-08-08 04:55:26 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskoff), "button_press_event",
|
1999-10-27 02:27:27 +08:00
|
|
|
GTK_SIGNAL_FUNC (qmask_click_handler),
|
|
|
|
gdisp);
|
1999-07-07 11:18:54 +08:00
|
|
|
|
1999-11-03 17:58:46 +08:00
|
|
|
gimp_help_set_help_data (gdisp->qmaskoff, NULL, "#qmask_off_button");
|
|
|
|
|
1999-10-27 02:27:27 +08:00
|
|
|
gdisp->qmaskon = gtk_radio_button_new (group);
|
1999-07-07 11:18:54 +08:00
|
|
|
group = gtk_radio_button_group (GTK_RADIO_BUTTON (gdisp->qmaskon));
|
2000-04-02 23:34:30 +08:00
|
|
|
gtk_widget_set_usize (GTK_WIDGET (gdisp->qmaskon), 15, 15);
|
1999-07-07 11:18:54 +08:00
|
|
|
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (gdisp->qmaskon), FALSE);
|
2000-04-02 23:34:30 +08:00
|
|
|
GTK_WIDGET_UNSET_FLAGS (gdisp->qmaskon, GTK_CAN_FOCUS);
|
1999-07-07 11:18:54 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskon), "toggled",
|
1999-10-27 02:27:27 +08:00
|
|
|
GTK_SIGNAL_FUNC (qmask_activate),
|
|
|
|
gdisp);
|
1999-08-08 04:55:26 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskon), "button_press_event",
|
1999-10-27 02:27:27 +08:00
|
|
|
GTK_SIGNAL_FUNC (qmask_click_handler),
|
|
|
|
gdisp);
|
1999-07-07 11:18:54 +08:00
|
|
|
|
1999-11-03 17:58:46 +08:00
|
|
|
gimp_help_set_help_data (gdisp->qmaskon, NULL, "#qmask_on_button");
|
|
|
|
|
new ui for the "Layer Offset" dialog.
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gdisp->qmaskoff), TRUE);
|
2000-02-09 04:48:48 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* the navigation window button */
|
|
|
|
nav_ebox = gtk_event_box_new ();
|
|
|
|
gtk_signal_connect (GTK_OBJECT (nav_ebox), "button_press_event",
|
|
|
|
GTK_SIGNAL_FUNC (nav_popup_click_handler),
|
|
|
|
gdisp);
|
|
|
|
|
|
|
|
gimp_help_set_help_data (nav_ebox, NULL, "#nav_window_button");
|
|
|
|
|
2001-02-21 22:17:37 +08:00
|
|
|
/* We need to realize the shell so that we have a GdkWindow for
|
|
|
|
* the pixmap creation. */
|
|
|
|
|
|
|
|
gtk_widget_realize (gdisp->shell);
|
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* create the pixmaps ****************************************************/
|
2000-02-09 07:45:20 +08:00
|
|
|
if (!qmasksel_pixmap)
|
|
|
|
{
|
|
|
|
GtkStyle *style;
|
2000-04-02 23:34:30 +08:00
|
|
|
|
2000-02-09 07:45:20 +08:00
|
|
|
style = gtk_widget_get_style (gdisp->shell);
|
2000-04-02 23:34:30 +08:00
|
|
|
|
|
|
|
qmasksel_pixmap =
|
|
|
|
gdk_pixmap_create_from_xpm_d (gdisp->shell->window,
|
|
|
|
&qmasksel_mask,
|
|
|
|
&style->bg[GTK_STATE_NORMAL],
|
|
|
|
qmasksel_xpm);
|
|
|
|
qmasknosel_pixmap =
|
|
|
|
gdk_pixmap_create_from_xpm_d (gdisp->shell->window,
|
|
|
|
&qmasknosel_mask,
|
|
|
|
&style->bg[GTK_STATE_NORMAL],
|
|
|
|
qmasknosel_xpm);
|
|
|
|
navbutton_pixmap =
|
|
|
|
gdk_pixmap_create_from_xpm_d (gdisp->shell->window,
|
|
|
|
&navbutton_mask,
|
|
|
|
&style->bg[GTK_STATE_NORMAL],
|
|
|
|
navbutton_xpm);
|
2000-02-09 07:45:20 +08:00
|
|
|
}
|
|
|
|
|
2001-02-21 22:17:37 +08:00
|
|
|
/* Icon stuff */
|
|
|
|
gdisp->iconsize = 32;
|
2001-02-23 04:23:30 +08:00
|
|
|
gdisp->icon = NULL;
|
|
|
|
gdisp->iconmask = NULL;
|
|
|
|
gdisp->icon_needs_update = 0;
|
|
|
|
gdisp->icon_timeout_id = 0;
|
|
|
|
gdisp->icon_idle_id = 0;
|
|
|
|
gtk_signal_connect (GTK_OBJECT (gdisp->gimage), "invalidate_preview",
|
|
|
|
GTK_SIGNAL_FUNC (gdisplay_update_icon_scheduler),
|
|
|
|
gdisp);
|
|
|
|
gdisplay_update_icon_scheduler (gdisp->gimage, gdisp);
|
|
|
|
|
2001-02-21 22:17:37 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* create the GtkPixmaps */
|
2000-02-09 07:45:20 +08:00
|
|
|
pixmap = gtk_pixmap_new (qmasksel_pixmap, qmasksel_mask);
|
|
|
|
gtk_container_add (GTK_CONTAINER (gdisp->qmaskon), pixmap);
|
|
|
|
gtk_widget_show (pixmap);
|
|
|
|
|
|
|
|
pixmap = gtk_pixmap_new (qmasknosel_pixmap, qmasknosel_mask);
|
|
|
|
gtk_container_add (GTK_CONTAINER (gdisp->qmaskoff), pixmap);
|
|
|
|
gtk_widget_show (pixmap);
|
|
|
|
|
|
|
|
pixmap = gtk_pixmap_new (navbutton_pixmap, navbutton_mask);
|
2000-04-02 23:34:30 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (nav_ebox), pixmap);
|
2000-02-09 07:45:20 +08:00
|
|
|
gtk_widget_show (pixmap);
|
1999-06-26 19:16:47 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* create the contents of the status area *********************************/
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* the cursor label */
|
|
|
|
label_frame = gtk_frame_new (NULL);
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME (label_frame), GTK_SHADOW_IN);
|
1998-07-16 11:23:14 +08:00
|
|
|
|
1998-11-20 04:20:46 +08:00
|
|
|
gdisp->cursor_label = gtk_label_new (" ");
|
2000-04-02 23:34:30 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (label_frame), gdisp->cursor_label);
|
|
|
|
gtk_widget_show (gdisp->cursor_label);
|
1998-12-13 01:41:41 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* the statusbar */
|
1998-08-05 20:38:11 +08:00
|
|
|
gdisp->statusbar = gtk_statusbar_new ();
|
|
|
|
gtk_widget_set_usize (gdisp->statusbar, 1, -1);
|
1998-06-19 09:39:02 +08:00
|
|
|
gtk_container_set_resize_mode (GTK_CONTAINER (gdisp->statusbar),
|
|
|
|
GTK_RESIZE_QUEUE);
|
1998-06-15 10:25:27 +08:00
|
|
|
contextid = gtk_statusbar_get_context_id (GTK_STATUSBAR (gdisp->statusbar),
|
|
|
|
"title");
|
1998-08-05 20:38:11 +08:00
|
|
|
gtk_statusbar_push (GTK_STATUSBAR (gdisp->statusbar),
|
|
|
|
contextid,
|
|
|
|
title);
|
1998-07-20 23:07:13 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* the progress bar */
|
1999-11-03 17:58:46 +08:00
|
|
|
gdisp->progressbar = gtk_progress_bar_new ();
|
1998-08-05 20:38:11 +08:00
|
|
|
gtk_widget_set_usize (gdisp->progressbar, 80, -1);
|
1998-07-20 23:07:13 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* the cancel button */
|
|
|
|
gdisp->cancelbutton = gtk_button_new_with_label (_("Cancel"));
|
1998-07-12 23:18:07 +08:00
|
|
|
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
|
1998-07-15 20:15:24 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* pack all the widgets **************************************************/
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* fill the upper_hbox */
|
|
|
|
gtk_box_pack_start (GTK_BOX (upper_hbox), gdisp->vsb, FALSE, FALSE, 0);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* fill the inner_table */
|
|
|
|
gtk_table_attach (GTK_TABLE (inner_table), gdisp->origin, 0, 1, 0, 1,
|
|
|
|
GTK_FILL, GTK_FILL, 0, 0);
|
|
|
|
gtk_table_attach (GTK_TABLE (inner_table), gdisp->hrule, 1, 2, 0, 1,
|
|
|
|
GTK_EXPAND | GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
|
|
|
|
gtk_table_attach (GTK_TABLE (inner_table), gdisp->vrule, 0, 1, 1, 2,
|
|
|
|
GTK_FILL, GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
|
|
|
|
gtk_table_attach (GTK_TABLE (inner_table), gdisp->canvas, 1, 2, 1, 2,
|
|
|
|
GTK_EXPAND | GTK_SHRINK | GTK_FILL,
|
|
|
|
GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
|
1999-09-28 01:58:10 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* fill the lower_hbox */
|
|
|
|
gtk_box_pack_start (GTK_BOX (lower_hbox), gdisp->qmaskoff, FALSE, FALSE, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (lower_hbox), gdisp->qmaskon, FALSE, FALSE, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (lower_hbox), gdisp->hsb, TRUE, TRUE, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (lower_hbox), nav_ebox, FALSE, FALSE, 0);
|
1999-07-07 11:18:54 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* fill the status area */
|
|
|
|
gtk_box_pack_start (GTK_BOX (status_hbox), label_frame, FALSE, FALSE, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (status_hbox), gdisp->statusbar, TRUE, TRUE, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (status_hbox), gdisp->progressbar, FALSE, FALSE, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (status_hbox), gdisp->cancelbutton, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
/* show everything *******************************************************/
|
1998-10-07 16:59:11 +08:00
|
|
|
|
1998-08-05 20:38:11 +08:00
|
|
|
if (show_rulers)
|
|
|
|
{
|
|
|
|
gtk_widget_show (gdisp->origin);
|
|
|
|
gtk_widget_show (gdisp->hrule);
|
|
|
|
gtk_widget_show (gdisp->vrule);
|
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_widget_show (gdisp->canvas);
|
2000-04-02 23:34:30 +08:00
|
|
|
|
|
|
|
gtk_widget_show (gdisp->vsb);
|
|
|
|
gtk_widget_show (gdisp->hsb);
|
|
|
|
|
|
|
|
gtk_widget_show (gdisp->qmaskoff);
|
|
|
|
gtk_widget_show (gdisp->qmaskon);
|
|
|
|
gtk_widget_show (nav_ebox);
|
|
|
|
|
|
|
|
gtk_widget_show (label_frame);
|
1998-06-15 10:25:27 +08:00
|
|
|
gtk_widget_show (gdisp->statusbar);
|
|
|
|
gtk_widget_show (gdisp->progressbar);
|
1998-07-12 23:18:07 +08:00
|
|
|
gtk_widget_show (gdisp->cancelbutton);
|
1998-08-05 20:38:11 +08:00
|
|
|
if (show_statusbar)
|
|
|
|
{
|
|
|
|
gtk_widget_show (gdisp->statusarea);
|
|
|
|
}
|
1999-12-26 15:54:39 +08:00
|
|
|
|
1998-10-04 04:14:00 +08:00
|
|
|
gtk_widget_realize (gdisp->canvas);
|
2000-04-06 10:13:18 +08:00
|
|
|
gdk_window_set_back_pixmap (gdisp->canvas->window, NULL, FALSE);
|
1998-10-04 04:14:00 +08:00
|
|
|
|
2000-04-02 23:34:30 +08:00
|
|
|
/* we need to realize the cursor_label widget here, so the size gets
|
|
|
|
* computed correctly
|
|
|
|
*/
|
|
|
|
gtk_widget_realize (gdisp->cursor_label);
|
|
|
|
gdisplay_resize_cursor_label (gdisp);
|
|
|
|
|
|
|
|
gtk_widget_show (main_vbox);
|
|
|
|
gtk_widget_show (gdisp->shell);
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
/* set the focus to the canvas area */
|
|
|
|
gtk_widget_grab_focus (gdisp->canvas);
|
1999-03-12 11:44:59 +08:00
|
|
|
}
|