Fix for #102303 + lots of code clean-up

This commit is contained in:
Maurits Rijk
2003-01-02 20:35:33 +00:00
parent cb9d0cc2b8
commit a73614b650
68 changed files with 225 additions and 1340 deletions

View File

@ -1,3 +1,21 @@
2003-01-02 Maurits Rijk <lpeek.mrijk@consunet.nl>
* plug-ins/imagemap/imap_preview.[ch]: fix for #102303
* plug-ins/imagemap/imap_main.c
* plug-ins/imagemap/imap_object.c
* plug-ins/imagemap/imap_object_popup.c
* plug-ins/imagemap/imap_polygon.c
* plug-ins/imagemap/imap_edit_area_info.c
* plug-ins/imagemap/imap_cmd_*.c: code clean-up
* plug-ins/imagemap/imap_cmd_*.h: removed. All prototypes are now
in imap_commands.h
* plug-ins/imagemap/imap_commands.h: new file with command prototypes
* plug-ins/imagemap/Makefile.am: updated accordingly
2003-01-02 Michael Natterer <mitch@gimp.org>
* libgimpmodule/gimpmodule.[ch]: added GIMP_MODULE_ABI_VERSION

View File

@ -34,67 +34,38 @@ imagemap_SOURCES = \
imap_circle.c \
imap_circle.h \
imap_cmd_clear.c \
imap_cmd_clear.h \
imap_cmd_copy.c \
imap_cmd_copy.h \
imap_cmd_copy_object.c \
imap_cmd_copy_object.h \
imap_cmd_create.c \
imap_cmd_create.h \
imap_cmd_cut.c \
imap_cmd_cut.h \
imap_cmd_cut_object.c \
imap_cmd_cut_object.h \
imap_cmd_delete.c \
imap_cmd_delete.h \
imap_cmd_delete_point.c \
imap_cmd_delete_point.h \
imap_cmd_edit_object.c \
imap_cmd_edit_object.h \
imap_cmd_gimp_guides.c \
imap_cmd_gimp_guides.h \
imap_cmd_guides.c \
imap_cmd_guides.h \
imap_cmd_insert_point.c \
imap_cmd_insert_point.h \
imap_cmd_move.c \
imap_cmd_move.h \
imap_cmd_move_down.c \
imap_cmd_move_down.h \
imap_cmd_move_sash.c \
imap_cmd_move_sash.h \
imap_cmd_move_selected.c \
imap_cmd_move_selected.h \
imap_cmd_move_to_front.c \
imap_cmd_move_to_front.h \
imap_cmd_move_up.c \
imap_cmd_move_up.h \
imap_cmd_object_down.c \
imap_cmd_object_down.h \
imap_cmd_object_move.c \
imap_cmd_object_move.h \
imap_cmd_object_up.c \
imap_cmd_object_up.h \
imap_cmd_paste.c \
imap_cmd_paste.h \
imap_cmd_select.c \
imap_cmd_select.h \
imap_cmd_select_all.c \
imap_cmd_select_all.h \
imap_cmd_select_next.c \
imap_cmd_select_next.h \
imap_cmd_select_prev.c \
imap_cmd_select_prev.h \
imap_cmd_select_region.c \
imap_cmd_select_region.h \
imap_cmd_send_to_back.c \
imap_cmd_send_to_back.h \
imap_cmd_unselect.c \
imap_cmd_unselect.h \
imap_cmd_unselect_all.c \
imap_cmd_unselect_all.h \
imap_command.c \
imap_command.h \
imap_commands.h \
imap_csim_lex.c \
imap_csim_parse.c \
imap_csim_parse.h \

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,21 +25,17 @@
#include <gtk/gtk.h>
#include "imap_cmd_clear.h"
#include "imap_cmd_delete.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
static CmdExecuteValue_t clear_command_execute(Command_t *parent);
static void clear_command_undo(Command_t *parent);
static void clear_command_redo(Command_t *parent);
static CommandClass_t clear_command_class = {
NULL, /* clear_command_destruct */
clear_command_execute,
clear_command_undo,
clear_command_redo
NULL, /* clear_command_undo */
NULL /* clear_command_redo */
};
typedef struct {
@ -73,18 +69,5 @@ clear_command_execute(Command_t *parent)
object_list_delete_selected(command->list);
object_list_remove_remove_cb(command->list, id);
redraw_preview(); /* Fix me! */
return CMD_APPEND;
}
static void
clear_command_undo(Command_t *parent)
{
redraw_preview(); /* Fix me! */
}
static void
clear_command_redo(Command_t *parent)
{
redraw_preview(); /* Fix me! */
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_CLEAR_H
#define _IMAP_CMD_CLEAR_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *clear_command_new(ObjectList_t *list);
#endif /* _IMAP_CMD_CLEAR_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2002 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,7 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_copy.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2002 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_COPY_H
#define _IMAP_CMD_COPY_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *copy_command_new(ObjectList_t *list);
#endif /* _IMAP_CMD_COPY_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,7 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_copy_object.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_COPY_OBJECT_H
#define _IMAP_CMD_COPY_OBJECT_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *copy_object_command_new(Object_t *obj);
#endif /* _IMAP_CMD_COPY_OBJECT_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,7 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_create.h"
#include "imap_commands.h"
#include "imap_main.h"
@ -71,7 +71,6 @@ create_command_execute(Command_t *parent)
CreateCommand_t *command = (CreateCommand_t*) parent;
command->changed = object_list_get_changed(command->list);
object_list_append(command->list, object_ref(command->obj));
redraw_preview(); /* fix me! */
return CMD_APPEND;
}
@ -81,5 +80,4 @@ create_command_undo(Command_t *parent)
CreateCommand_t *command = (CreateCommand_t*) parent;
object_list_remove(command->list, command->obj);
object_list_set_changed(command->list, command->changed);
redraw_preview(); /* fix me! */
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_CREATE_H
#define _IMAP_CMD_CREATE_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *create_command_new(ObjectList_t *list, Object_t *obj);
#endif /* _IMAP_CMD_CREATE_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,22 +25,19 @@
#include <gtk/gtk.h>
#include "imap_cmd_delete.h"
#include "imap_cmd_cut.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
static void cut_command_destruct(Command_t *parent);
static CmdExecuteValue_t cut_command_execute(Command_t *parent);
static void cut_command_undo(Command_t *parent);
static void cut_command_redo(Command_t *parent);
static CommandClass_t cut_command_class = {
cut_command_destruct,
cut_command_execute,
cut_command_undo,
cut_command_redo
NULL /* cut_command_redo */
};
typedef struct {
@ -85,7 +82,6 @@ cut_command_execute(Command_t *parent)
object_list_cut(command->list);
object_list_remove_remove_cb(command->list, id);
redraw_preview(); /* Fix me! */
return CMD_APPEND;
}
@ -94,11 +90,4 @@ cut_command_undo(Command_t *parent)
{
CutCommand_t *command = (CutCommand_t*) parent;
object_list_copy(get_paste_buffer(), command->paste_buffer);
redraw_preview(); /* Fix me! */
}
static void
cut_command_redo(Command_t *command)
{
redraw_preview(); /* Fix me! */
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_CUT_H
#define _IMAP_CMD_CUT_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *cut_command_new(ObjectList_t *list);
#endif /* _IMAP_CMD_CUT_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,22 +25,17 @@
#include <gtk/gtk.h>
#include "imap_cmd_copy_object.h"
#include "imap_cmd_cut_object.h"
#include "imap_cmd_delete.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
static CmdExecuteValue_t cut_object_command_execute(Command_t *parent);
static void cut_object_command_undo(Command_t *parent);
static void cut_object_command_redo(Command_t *parent);
static CommandClass_t cut_object_command_class = {
NULL, /* cut_object_command_destruct */
cut_object_command_execute,
cut_object_command_undo,
cut_object_command_redo
NULL, /* cut_object_command_undo */
NULL /* cut_object_command_redo */
};
typedef struct {
@ -64,18 +59,5 @@ cut_object_command_new(Object_t *obj)
static CmdExecuteValue_t
cut_object_command_execute(Command_t *parent)
{
redraw_preview(); /* fix me! */
return CMD_APPEND;
}
static void
cut_object_command_undo(Command_t *parent)
{
redraw_preview(); /* fix me! */
}
static void
cut_object_command_redo(Command_t *parent)
{
redraw_preview(); /* fix me! */
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_CUT_OBJECT_H
#define _IMAP_CMD_CUT_OBJECT_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *cut_object_command_new(Object_t *obj);
#endif /* _IMAP_CMD_CUT_OBJECT_H */

View File

@ -25,8 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_delete.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_DELETE_H
#define _IMAP_CMD_DELETE_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *delete_command_new(ObjectList_t *list, Object_t *obj);
#endif /* _IMAP_CMD_DELETE_H */

View File

@ -25,8 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_delete_point.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "imap_polygon.h"
#include "libgimp/stdplugins-intl.h"
@ -72,7 +71,6 @@ delete_point_command_execute(Command_t *parent)
g_free(p->data);
polygon->points = g_list_remove_link(polygon->points, p);
redraw_preview(); /* Fix me! */
return CMD_APPEND;
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_DELETE_POINT_H
#define _IMAP_CMD_DELETE_POINT_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *delete_point_command_new(Object_t *obj, GdkPoint *point);
#endif /* _IMAP_CMD_DELETE_POINT_H */

View File

@ -25,8 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_edit_object.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
@ -72,6 +71,4 @@ edit_object_command_undo(Command_t *parent)
object_assign(command->copy, command->obj);
object_assign(copy, command->copy);
redraw_preview(); /* Fix me! */
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_EDIT_OBJECT_H
#define _IMAP_CMD_EDIT_OBJECT_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *edit_object_command_new(Object_t *obj);
#endif /* _IMAP_CMD_EDIT_OBJECT_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2002 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -29,9 +29,8 @@
#include <libgimp/gimp.h>
#include "imap_cmd_create.h"
#include "imap_commands.h"
#include "imap_default_dialog.h"
#include "imap_cmd_gimp_guides.h"
#include "imap_main.h"
#include "imap_rectangle.h"
#include "imap_table.h"

View File

@ -1,33 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2002 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_GIMP_GUIDES_H
#define _IMAP_CMD_GIMP_GUIDES_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *gimp_guides_command_new(ObjectList_t *list,
GimpDrawable *_drawable);
#endif /* _IMAP_CMD_GUIDES_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2002 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -23,13 +23,10 @@
#include "config.h"
#include <stdio.h>
#include <gtk/gtk.h>
#include "imap_cmd_create.h"
#include "imap_commands.h"
#include "imap_default_dialog.h"
#include "imap_cmd_guides.h"
#include "imap_main.h"
#include "imap_rectangle.h"
#include "imap_table.h"
@ -87,7 +84,6 @@ guides_ok_cb(gpointer data)
y += height + vspace;
}
subcommand_end();
redraw_preview();
}
static void

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2002 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_GUIDES_H
#define _IMAP_CMD_GUIDES_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *guides_command_new(ObjectList_t *list);
#endif /* _IMAP_CMD_GUIDES_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,7 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_insert_point.h"
#include "imap_commands.h"
#include "imap_main.h"
#include "imap_polygon.h"

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_INSERT_POINT_H
#define _IMAP_CMD_INSERT_POINT_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *insert_point_command_new(Object_t *obj, gint x, gint y, gint edge);
#endif /* _IMAP_CMD_INSERT_POINT_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -27,8 +27,7 @@
#include "libgimp/gimp.h"
#include "imap_cmd_move.h"
#include "imap_cmd_object_move.h"
#include "imap_commands.h"
#include "imap_main.h"
#include "libgimp/stdplugins-intl.h"
@ -153,7 +152,7 @@ button_release(GtkWidget *widget, GdkEventButton *event, gpointer data)
command_list_add(object_move_command_new(command->obj, command->obj_x,
command->obj_y));
preview_thaw();
// preview_thaw();
}
static CmdExecuteValue_t
@ -162,7 +161,7 @@ move_command_execute(Command_t *parent)
MoveCommand_t *command = (MoveCommand_t*) parent;
GtkWidget *widget = command->preview->preview;
preview_freeze();
// preview_freeze();
g_signal_connect(G_OBJECT(widget), "button_release_event",
G_CALLBACK (button_release), command);
g_signal_connect(G_OBJECT(widget), "motion_notify_event",

View File

@ -1,33 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_MOVE_H
#define _IMAP_CMD_MOVE_H
#include "imap_command.h"
#include "imap_object.h"
#include "imap_preview.h"
Command_t *move_command_new(Preview_t *preview, Object_t *obj, gint x, gint y);
#endif /* _IMAP_CMD_MOVE_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,21 +25,17 @@
#include <gtk/gtk.h>
#include "imap_cmd_copy.h"
#include "imap_cmd_object_down.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
static CmdExecuteValue_t move_down_command_execute(Command_t *parent);
static void move_down_command_undo(Command_t *parent);
static void move_down_command_redo(Command_t *parent);
CommandClass_t move_down_command_class = {
NULL, /* move_down_command_destruct */
move_down_command_execute,
move_down_command_undo,
move_down_command_redo
NULL, /* move_down_command_undo */
NULL /* move_down_command_redo */
};
typedef struct {
@ -83,18 +79,5 @@ move_down_command_execute(Command_t *parent)
object_list_move_selected_down(command->list);
object_list_remove_move_cb(command->list, id);
redraw_preview(); /* fix me! */
return CMD_APPEND;
}
static void
move_down_command_undo(Command_t *parent)
{
redraw_preview(); /* fix me! */
}
static void
move_down_command_redo(Command_t *parent)
{
redraw_preview(); /* fix me! */
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_MOVE_DOWN_H
#define _IMAP_CMD_MOVE_DOWN_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *move_down_command_new(ObjectList_t *list);
#endif /* _IMAP_CMD_MOVE_DOWN_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,8 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_copy.h"
#include "imap_cmd_edit_object.h"
#include "imap_commands.h"
#include "imap_main.h"
#include "libgimp/stdplugins-intl.h"
@ -36,8 +35,8 @@ COMMAND_PROTO(move_sash_command);
CommandClass_t move_sash_command_class = {
move_sash_command_destruct,
move_sash_command_execute,
move_sash_command_undo,
move_sash_command_redo
NULL, /* move_sash_command_undo */
NULL /* move_sash_command_redo */
};
typedef struct {
@ -128,7 +127,6 @@ sash_end(GtkWidget *widget, GdkEventButton *event, gpointer data)
if (obj->class->normalize)
object_normalize(obj);
gdk_gc_set_function(get_preferences()->selected_gc, GDK_COPY);
/* redraw_preview(); */
preview_thaw();
show_url();
}
@ -148,13 +146,3 @@ move_sash_command_execute(Command_t *parent)
return CMD_APPEND;
}
static void
move_sash_command_undo(Command_t *parent)
{
}
static void
move_sash_command_redo(Command_t *parent)
{
}

View File

@ -1,47 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_MOVE_SASH_H
#define _IMAP_CMD_MOVE_SASH_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *move_sash_command_new(GtkWidget *widget, Object_t *obj,
gint x, gint y, MoveSashFunc_t sash_func);
#endif /* _IMAP_CMD_MOVE_SASH_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,8 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_move_selected.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
@ -63,9 +62,6 @@ move_selected_command_execute(Command_t *parent)
{
MoveSelectedCommand_t *command = (MoveSelectedCommand_t*) parent;
object_list_move_selected(command->list, command->dx, command->dy);
#ifdef _OLD_
redraw_preview(); /* fix me! */
#endif
return CMD_APPEND;
}
@ -74,7 +70,4 @@ move_selected_command_undo(Command_t *parent)
{
MoveSelectedCommand_t *command = (MoveSelectedCommand_t*) parent;
object_list_move_selected(command->list, -command->dx, -command->dy);
#ifdef _OLD_
redraw_preview(); /* fix me! */
#endif
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_MOVE_SELECTED_H
#define _IMAP_CMD_MOVE_SELECTED_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *move_selected_command_new(ObjectList_t *list, gint dx, gint dy);
#endif /* _IMAP_CMD_MOVE_SELECTED_H */

View File

@ -25,22 +25,17 @@
#include <gtk/gtk.h>
#include "imap_cmd_create.h"
#include "imap_cmd_delete.h"
#include "imap_cmd_move_to_front.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
static CmdExecuteValue_t move_to_front_command_execute(Command_t *parent);
static void move_to_front_command_undo(Command_t *parent);
static void move_to_front_command_redo(Command_t *parent);
static CommandClass_t move_to_front_command_class = {
NULL, /* move_to_front_command_destruct, */
move_to_front_command_execute,
move_to_front_command_undo,
move_to_front_command_redo
NULL, /* move_to_front_command_undo */
NULL /* move_to_front_command_redo */
};
typedef struct {
@ -83,20 +78,7 @@ move_to_front_command_execute(Command_t *parent)
id2 = object_list_add_add_cb(command->list, add_one_object, command);
object_list_move_to_front(command->list);
redraw_preview(); /* Fix me! */
object_list_remove_remove_cb(command->list, id1);
object_list_remove_add_cb(command->list, id2);
return CMD_APPEND;
}
static void
move_to_front_command_undo(Command_t *command)
{
redraw_preview(); /* Fix me! */
}
static void
move_to_front_command_redo(Command_t *command)
{
redraw_preview(); /* Fix me! */
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_MOVE_TO_FRONT_H
#define _IMAP_CMD_MOVE_TO_FRONT_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *move_to_front_command_new(ObjectList_t *list);
#endif /* _IMAP_CMD_MOVE_TO_FRONT_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,21 +25,17 @@
#include <gtk/gtk.h>
#include "imap_cmd_move_up.h"
#include "imap_cmd_object_up.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
static CmdExecuteValue_t move_up_command_execute(Command_t *parent);
static void move_up_command_undo(Command_t *parent);
static void move_up_command_redo(Command_t *parent);
CommandClass_t move_up_command_class = {
NULL, /* move_up_command_destruct */
move_up_command_execute,
move_up_command_undo,
move_up_command_redo
NULL, /* move_up_command_undo */
NULL /* move_up_command_redo */
};
typedef struct {
@ -82,16 +78,5 @@ move_up_command_execute(Command_t *parent)
object_list_move_selected_up(command->list);
object_list_remove_move_cb(command->list, id);
redraw_preview(); /* fix me! */
return CMD_APPEND;
}
static void
move_up_command_undo(Command_t *parent)
{
}
static void
move_up_command_redo(Command_t *parent)
{
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_MOVE_UP_H
#define _IMAP_CMD_MOVE_UP_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *move_up_command_new(ObjectList_t *list);
#endif /* _IMAP_CMD_MOVE_UP_H */

View File

@ -25,8 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_copy.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
@ -69,7 +68,6 @@ object_down_command_execute(Command_t *parent)
{
ObjectDownCommand_t *command = (ObjectDownCommand_t*) parent;
object_list_move_down(command->list, command->obj);
redraw_preview(); /* fix me! */
return CMD_APPEND;
}
@ -78,5 +76,4 @@ object_down_command_undo(Command_t *parent)
{
ObjectDownCommand_t *command = (ObjectDownCommand_t*) parent;
object_list_move_up(command->list, command->obj);
redraw_preview(); /* fix me! */
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_OBJECT_DOWN_H
#define _IMAP_CMD_OBJECT_DOWN_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *object_down_command_new(ObjectList_t *list, Object_t *obj);
#endif /* _IMAP_CMD_OBJECT_DOWN_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,8 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_object_move.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
@ -71,9 +70,6 @@ object_move_command_execute(Command_t *parent)
{
ObjectMoveCommand_t *command = (ObjectMoveCommand_t*) parent;
object_move(command->obj, command->dx, command->dy);
#ifdef _OLD_
redraw_preview(); /* fix me! */
#endif
return CMD_APPEND;
}
@ -82,7 +78,4 @@ object_move_command_undo(Command_t *parent)
{
ObjectMoveCommand_t *command = (ObjectMoveCommand_t*) parent;
object_move(command->obj, -command->dx, -command->dy);
#ifdef _OLD_
redraw_preview(); /* fix me! */
#endif
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_OBJECT_MOVE_H
#define _IMAP_CMD_OBJECT_MOVE_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *object_move_command_new(Object_t *obj, gint x, gint y);
#endif /* _IMAP_CMD_OBJECT_MOVE_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,8 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_copy.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
@ -69,7 +68,6 @@ object_up_command_execute(Command_t *parent)
{
ObjectUpCommand_t *command = (ObjectUpCommand_t*) parent;
object_list_move_up(command->list, command->obj);
redraw_preview(); /* fix me! */
return CMD_APPEND;
}
@ -78,5 +76,4 @@ object_up_command_undo(Command_t *parent)
{
ObjectUpCommand_t *command = (ObjectUpCommand_t*) parent;
object_list_move_down(command->list, command->obj);
redraw_preview(); /* fix me! */
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_OBJECT_UP_H
#define _IMAP_CMD_OBJECT_UP_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *object_up_command_new(ObjectList_t *list, Object_t *obj);
#endif /* _IMAP_CMD_OBJECT_UP_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,9 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_create.h"
#include "imap_cmd_paste.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
@ -69,7 +67,6 @@ paste_command_execute(Command_t *parent)
id = object_list_add_add_cb(command->list, paste_one_object, command);
object_list_paste(command->list);
redraw_preview(); /* Fix me! */
object_list_remove_add_cb(command->list, id);
return CMD_APPEND;
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_PASTE_H
#define _IMAP_CMD_PASTE_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *paste_command_new(ObjectList_t *list);
#endif /* _IMAP_CMD_PASTE_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2002 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,8 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_select.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
@ -66,7 +65,6 @@ select_command_execute(Command_t *parent)
{
SelectCommand_t *command = (SelectCommand_t*) parent;
object_select(command->obj);
redraw_preview(); /* Fix me! */
return CMD_APPEND;
}
@ -75,5 +73,4 @@ select_command_undo(Command_t *parent)
{
SelectCommand_t *command = (SelectCommand_t*) parent;
object_unselect(command->obj);
redraw_preview(); /* Fix me! */
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_SELECT_H
#define _IMAP_CMD_SELECT_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *select_command_new(Object_t *obj);
#endif /* _IMAP_CMD_SELECT_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,21 +25,17 @@
#include <gtk/gtk.h>
#include "imap_cmd_select.h"
#include "imap_cmd_select_all.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
static CmdExecuteValue_t select_all_command_execute(Command_t *parent);
static void select_all_command_undo(Command_t *parent);
static void select_all_command_redo(Command_t *parent);
static CommandClass_t select_all_command_class = {
NULL, /* select_all_command_destruct, */
select_all_command_execute,
select_all_command_undo,
select_all_command_redo
NULL, /* select_all_command_undo */
NULL /* select_all_command_redo */
};
typedef struct {
@ -71,25 +67,9 @@ select_all_command_execute(Command_t *parent)
CmdExecuteValue_t rvalue;
id = object_list_add_select_cb(command->list, select_one_object, command);
if (object_list_select_all(command->list)) {
redraw_preview(); /* Fix me! */
rvalue = CMD_APPEND;
} else {
rvalue = CMD_DESTRUCT;
}
rvalue = (object_list_select_all(command->list))
? CMD_APPEND : CMD_DESTRUCT;
object_list_remove_select_cb(command->list, id);
return rvalue;
}
static void
select_all_command_undo(Command_t *parent)
{
redraw_preview(); /* Fix me! */
}
static void
select_all_command_redo(Command_t *parent)
{
redraw_preview(); /* Fix me! */
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_SELECT_ALL_H
#define _IMAP_CMD_SELECT_ALL_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *select_all_command_new(ObjectList_t *list);
#endif /* _IMAP_CMD_SELECT_ALL_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,23 +25,17 @@
#include <gtk/gtk.h>
#include "imap_cmd_select.h"
#include "imap_cmd_select_next.h"
#include "imap_cmd_unselect.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
static CmdExecuteValue_t select_next_command_execute(Command_t *parent);
static void select_next_command_undo(Command_t *command);
static void select_next_command_redo(Command_t *command);
static CommandClass_t select_next_command_class = {
NULL, /* select_next_command_destruct */
select_next_command_execute,
select_next_command_undo,
select_next_command_redo
NULL, /* select_next_command_undo */
NULL /* select_next_command_redo */
};
typedef struct {
@ -81,15 +75,3 @@ select_next_command_execute(Command_t *parent)
object_list_remove_select_cb(list, id);
return CMD_APPEND;
}
static void
select_next_command_undo(Command_t *command)
{
redraw_preview(); /* Fix me! */
}
static void
select_next_command_redo(Command_t *command)
{
redraw_preview(); /* Fix me! */
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_SELECT_NEXT_H
#define _IMAP_CMD_SELECT_NEXT_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *select_next_command_new(ObjectList_t *list);
#endif /* _IMAP_CMD_SELECT_NEXT_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,22 +25,17 @@
#include <gtk/gtk.h>
#include "imap_cmd_select.h"
#include "imap_cmd_select_prev.h"
#include "imap_cmd_unselect.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
static CmdExecuteValue_t select_prev_command_execute(Command_t *parent);
static void select_prev_command_undo(Command_t *command);
static void select_prev_command_redo(Command_t *command);
static CommandClass_t select_prev_command_class = {
NULL, /* select_prev_command_destruct */
select_prev_command_execute,
select_prev_command_undo,
select_prev_command_redo
NULL, /* select_prev_command_undo */
NULL /* select_prev_command_redo */
};
typedef struct {
@ -80,15 +75,3 @@ select_prev_command_execute(Command_t *parent)
object_list_remove_select_cb(list, id);
return CMD_APPEND;
}
static void
select_prev_command_undo(Command_t *command)
{
redraw_preview(); /* Fix me! */
}
static void
select_prev_command_redo(Command_t *command)
{
redraw_preview(); /* Fix me! */
}

View File

@ -1,32 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_SELECT_PREV_H
#define _IMAP_CMD_SELECT_PREV_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *select_prev_command_new(ObjectList_t *list);
#endif /* _IMAP_CMD_SELECT_PREV_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,23 +25,19 @@
#include <gtk/gtk.h>
#include "imap_commands.h"
#include "imap_rectangle.h"
#include "imap_cmd_select.h"
#include "imap_cmd_select_region.h"
#include "imap_cmd_unselect_all.h"
#include "imap_main.h"
#include "libgimp/stdplugins-intl.h"
static CmdExecuteValue_t select_region_command_execute(Command_t *parent);
static void select_region_command_undo(Command_t *parent);
static void select_region_command_redo(Command_t *parent);
static CommandClass_t select_region_command_class = {
NULL, /* select_region_command_destruct, */
select_region_command_execute,
select_region_command_undo,
select_region_command_redo
NULL, /* select_region_command_undo */
NULL /* select_region_command_redo */
};
typedef struct {
@ -121,7 +117,6 @@ select_release(GtkWidget *widget, GdkEventButton *event, gpointer data)
object_list_remove_select_cb(command->list, id);
if (count) {
redraw_preview(); /* Fix me! */
command_list_add(&command->parent);
} else { /* Nothing selected */
if (command->unselect_command->sub_commands)
@ -141,19 +136,7 @@ select_region_command_execute(Command_t *parent)
g_signal_connect(G_OBJECT(command->widget), "motion_notify_event",
G_CALLBACK (select_motion), command);
gdk_gc_set_function(get_preferences()->normal_gc, GDK_EQUIV);
gdk_gc_set_function(get_preferences()->normal_gc, GDK_XOR);
return CMD_IGNORE;
}
static void
select_region_command_undo(Command_t *command)
{
redraw_preview(); /* Fix me! */
}
static void
select_region_command_redo(Command_t *command)
{
redraw_preview(); /* Fix me! */
}

View File

@ -1,33 +0,0 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_CMD_SELECT_REGION_H
#define _IMAP_CMD_SELECT_REGION_H
#include "imap_command.h"
#include "imap_object.h"
Command_t *select_region_command_new(GtkWidget *widget, ObjectList_t *list,
gint x, gint y);
#endif /* _IMAP_CMD_SELECT_REGION_H */

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,22 +25,17 @@
#include <gtk/gtk.h>
#include "imap_cmd_create.h"
#include "imap_cmd_delete.h"
#include "imap_cmd_send_to_back.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
static CmdExecuteValue_t send_to_back_command_execute(Command_t *parent);
static void send_to_back_command_undo(Command_t *parent);
static void send_to_back_command_redo(Command_t *parent);
static CommandClass_t send_to_back_command_class = {
NULL, /* send_to_back_command_destruct, */
send_to_back_command_execute,
send_to_back_command_undo,
send_to_back_command_redo
NULL, /* send_to_back_command_undo */
NULL /* send_to_back_command_redo */
};
typedef struct {
@ -83,20 +78,7 @@ send_to_back_command_execute(Command_t *parent)
id2 = object_list_add_add_cb(command->list, add_one_object, command);
object_list_send_to_back(command->list);
redraw_preview(); /* Fix me! */
object_list_remove_remove_cb(command->list, id1);
object_list_remove_add_cb(command->list, id2);
return CMD_APPEND;
}
static void
send_to_back_command_undo(Command_t *command)
{
redraw_preview(); /* Fix me! */
}
static void
send_to_back_command_redo(Command_t *command)
{
redraw_preview(); /* Fix me! */
}

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2002 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,8 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_unselect.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
@ -67,7 +66,6 @@ unselect_command_execute(Command_t *command)
{
UnselectCommand_t *unselect_command = (UnselectCommand_t*) command;
object_unselect(unselect_command->obj);
redraw_preview(); /* Fix me! */
return CMD_APPEND;
}
@ -76,5 +74,4 @@ unselect_command_undo(Command_t *command)
{
UnselectCommand_t *unselect_command = (UnselectCommand_t*) command;
object_select(unselect_command->obj);
redraw_preview(); /* Fix me! */
}

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,9 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_unselect.h"
#include "imap_cmd_unselect_all.h"
#include "imap_main.h"
#include "imap_commands.h"
#include "libgimp/stdplugins-intl.h"
@ -36,8 +34,8 @@ COMMAND_PROTO(unselect_all_command);
static CommandClass_t unselect_all_command_class = {
unselect_all_command_destruct,
unselect_all_command_execute,
unselect_all_command_undo,
unselect_all_command_redo
NULL, /* unselect_all_command_undo */
NULL /* unselect_all_command_redo */
};
typedef struct {
@ -81,7 +79,6 @@ unselect_all_command_execute(Command_t *parent)
id = object_list_add_select_cb(command->list, select_one_object,
command);
if (object_list_deselect_all(command->list, command->exception)) {
redraw_preview(); /* Fix me! */
rvalue = CMD_APPEND;
} else {
rvalue = CMD_DESTRUCT;
@ -89,15 +86,3 @@ unselect_all_command_execute(Command_t *parent)
object_list_remove_select_cb(command->list, id);
return rvalue;
}
static void
unselect_all_command_undo(Command_t *command)
{
redraw_preview(); /* Fix me! */
}
static void
unselect_all_command_redo(Command_t *command)
{
redraw_preview(); /* Fix me! */
}

View File

@ -0,0 +1,65 @@
/*
* This is a plug-in for the GIMP.
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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.i
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _IMAP_COMMANDS_H
#define _IMAP_COMMANDS_H
#include "imap_command.h"
#include "imap_object.h"
#include "imap_preview.h"
Command_t *clear_command_new(ObjectList_t *list);
Command_t *copy_command_new(ObjectList_t *list);
Command_t *copy_object_command_new(Object_t *obj);
Command_t *create_command_new(ObjectList_t *list, Object_t *obj);
Command_t *cut_command_new(ObjectList_t *list);
Command_t *cut_object_command_new(Object_t *obj);
Command_t *delete_command_new(ObjectList_t *list, Object_t *obj);
Command_t *delete_point_command_new(Object_t *obj, GdkPoint *point);
Command_t *edit_object_command_new(Object_t *obj);
Command_t *gimp_guides_command_new(ObjectList_t *list,
GimpDrawable *_drawable);
Command_t *guides_command_new(ObjectList_t *list);
Command_t *insert_point_command_new(Object_t *obj, gint x, gint y, gint edge);
Command_t *move_down_command_new(ObjectList_t *list);
Command_t *move_command_new(Preview_t *preview, Object_t *obj, gint x, gint y);
Command_t *move_sash_command_new(GtkWidget *widget, Object_t *obj,
gint x, gint y, MoveSashFunc_t sash_func);
Command_t *move_selected_command_new(ObjectList_t *list, gint dx, gint dy);
Command_t *move_to_front_command_new(ObjectList_t *list);
Command_t *move_up_command_new(ObjectList_t *list);
Command_t *object_down_command_new(ObjectList_t *list, Object_t *obj);
Command_t *object_move_command_new(Object_t *obj, gint x, gint y);
Command_t *object_up_command_new(ObjectList_t *list, Object_t *obj);
Command_t *paste_command_new(ObjectList_t *list);
Command_t *select_all_command_new(ObjectList_t *list);
Command_t *select_command_new(Object_t *obj);
Command_t *select_next_command_new(ObjectList_t *list);
Command_t *select_prev_command_new(ObjectList_t *list);
Command_t *select_region_command_new(GtkWidget *widget, ObjectList_t *list,
gint x, gint y);
Command_t *send_to_back_command_new(ObjectList_t *list);
Command_t *unselect_all_command_new(ObjectList_t *list, Object_t *exception);
Command_t *unselect_command_new(Object_t *obj);
#endif /* _IMAP_COMMANDS_H */

View File

@ -30,7 +30,7 @@
#include <gtk/gtk.h>
#include "imap_browse.h"
#include "imap_cmd_edit_object.h"
#include "imap_commands.h"
#include "imap_default_dialog.h"
#include "imap_edit_area_info.h"
#include "imap_main.h"

View File

@ -36,28 +36,7 @@
#include "imap_about.h"
#include "imap_circle.h"
#include "imap_cmd_clear.h"
#include "imap_cmd_copy.h"
#include "imap_cmd_cut.h"
#include "imap_cmd_create.h"
#include "imap_cmd_gimp_guides.h"
#include "imap_cmd_guides.h"
#include "imap_cmd_move.h"
#include "imap_cmd_move_down.h"
#include "imap_cmd_move_sash.h"
#include "imap_cmd_move_selected.h"
#include "imap_cmd_move_to_front.h"
#include "imap_cmd_move_up.h"
#include "imap_cmd_object_move.h"
#include "imap_cmd_paste.h"
#include "imap_cmd_select.h"
#include "imap_cmd_select_all.h"
#include "imap_cmd_select_next.h"
#include "imap_cmd_select_prev.h"
#include "imap_cmd_select_region.h"
#include "imap_cmd_send_to_back.h"
#include "imap_cmd_unselect.h"
#include "imap_cmd_unselect_all.h"
#include "imap_commands.h"
#include "imap_default_dialog.h"
#include "imap_edit_area_info.h"
#include "imap_file.h"
@ -1200,12 +1179,13 @@ key_release_cb(GtkWidget *widget, GdkEventKey *event)
static void
geometry_changed(Object_t *obj, gpointer data)
{
redraw_preview(); /* Fix me! */
redraw_preview();
}
static void
data_changed(Object_t *obj, gpointer data)
{
redraw_preview();
set_all_sensitivities();
}

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2002 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,8 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_create.h"
#include "imap_command.h"
#include "imap_commands.h"
#include "imap_default_dialog.h"
#include "imap_grid.h"
#include "imap_main.h"
@ -273,6 +272,7 @@ object_select(Object_t *obj)
{
obj->selected = TRUE;
object_list_callback_call(&obj->list->select_cb, obj);
object_emit_geometry_signal(obj);
}
void
@ -280,19 +280,21 @@ object_unselect(Object_t *obj)
{
obj->selected = FALSE;
object_list_callback_call(&obj->list->select_cb, obj);
object_emit_geometry_signal(obj);
}
void
object_move(Object_t *obj, gint dx, gint dy)
{
obj->class->move(obj, dx, dy);
object_list_callback_call(&obj->list->geometry_cb, obj);
object_emit_geometry_signal(obj);
}
void
object_remove(Object_t *obj)
{
object_list_remove(obj->list, obj);
object_emit_geometry_signal(obj);
}
void

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -25,10 +25,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_copy_object.h"
#include "imap_cmd_cut_object.h"
#include "imap_cmd_object_down.h"
#include "imap_cmd_object_up.h"
#include "imap_commands.h"
#include "imap_main.h"
#include "imap_object_popup.h"

View File

@ -28,8 +28,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_delete_point.h"
#include "imap_cmd_insert_point.h"
#include "imap_commands.h"
#include "imap_main.h"
#include "imap_misc.h"
#include "imap_object_popup.h"

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -32,7 +32,7 @@
#include "libgimp/gimp.h"
#include "imap_cmd_edit_object.h"
#include "imap_commands.h"
#include "imap_grid.h"
#include "imap_main.h"
#include "imap_popup.h"
@ -286,7 +286,7 @@ render_preview(GtkWidget *preview, GimpPixelRgn *srcrgn)
}
}
static gint
static gboolean
arrow_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
{
if (event->button == 1)
@ -295,53 +295,46 @@ arrow_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
return FALSE;
}
static gint
static gboolean
preview_expose(GtkWidget *widget, GdkEventExpose *event)
{
Preview_t *data = preview_user_data(widget);
g_signal_handler_block(G_OBJECT(widget), data->exp_id);
gtk_widget_draw(widget, (event) ? &event->area : NULL);
g_signal_handler_unblock(G_OBJECT(widget), data->exp_id );
draw_grid(widget);
draw_shapes(widget);
return FALSE;
}
void
add_preview_motion_event(Preview_t *preview, GtkSignalFunc func)
add_preview_motion_event(Preview_t *preview, GCallback func)
{
gtk_signal_connect(GTK_OBJECT(preview->preview),
"motion_notify_event", func, NULL);
g_signal_connect(G_OBJECT(preview->preview), "motion_notify_event",
func, NULL);
}
void
add_enter_notify_event(Preview_t *preview, GtkSignalFunc func)
add_enter_notify_event(Preview_t *preview, GCallback func)
{
gtk_signal_connect(GTK_OBJECT(preview->preview),
"enter_notify_event", func, NULL);
g_signal_connect(G_OBJECT(preview->preview), "enter_notify_event",
func, NULL);
}
void
add_leave_notify_event(Preview_t *preview, GtkSignalFunc func)
add_leave_notify_event(Preview_t *preview, GCallback func)
{
gtk_signal_connect(GTK_OBJECT(preview->preview),
"leave_notify_event", func, NULL);
g_signal_connect(G_OBJECT(preview->preview), "leave_notify_event",
func, NULL);
}
void
add_preview_button_press_event(Preview_t *preview, GtkSignalFunc func)
add_preview_button_press_event(Preview_t *preview, GCallback func)
{
gtk_signal_connect(GTK_OBJECT(preview->preview),
"button_press_event", func, NULL);
g_signal_connect(G_OBJECT(preview->preview), "button_press_event",
func, NULL);
}
void
preview_redraw(Preview_t *preview)
{
preview_expose(preview->preview, NULL);
gtk_widget_queue_draw(preview->preview);
}
void
@ -411,15 +404,14 @@ make_preview(GimpDrawable *drawable)
gtk_object_set_user_data(GTK_OBJECT(preview), data);
gtk_widget_set_events(GTK_WIDGET(preview), PREVIEW_MASK);
data->exp_id = gtk_signal_connect_after(GTK_OBJECT(preview), "expose_event",
(GtkSignalFunc) preview_expose,
data);
g_signal_connect_after(G_OBJECT(preview), "expose_event",
G_CALLBACK(preview_expose), data);
/* Handle drop of links in preview widget */
gtk_drag_dest_set(preview, GTK_DEST_DEFAULT_ALL, target_table,
2, GDK_ACTION_COPY);
gtk_signal_connect(GTK_OBJECT(preview), "drag_data_received",
GTK_SIGNAL_FUNC(handle_drop), NULL);
g_signal_connect(G_OBJECT(preview), "drag_data_received",
G_CALLBACK(handle_drop), NULL);
data->width = gimp_drawable_width(drawable->drawable_id);
data->height = gimp_drawable_height(drawable->drawable_id);
@ -428,7 +420,7 @@ make_preview(GimpDrawable *drawable)
data->window = window = gtk_scrolled_window_new(NULL, NULL);
width = (data->width > 600) ? 600 : data->width;
height = (data->height > 400) ? 400 : data->height;
gtk_widget_set_usize(window, width, height);
gtk_widget_set_size_request(window, width, height);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_widget_show(window);
@ -449,9 +441,9 @@ make_preview(GimpDrawable *drawable)
gtk_table_attach(GTK_TABLE(table), button, 0, 1, 0, 1, GTK_FILL, GTK_FILL,
0, 0);
gtk_widget_set_events(button,
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
gtk_signal_connect(GTK_OBJECT(button), "button_press_event",
(GtkSignalFunc) arrow_cb, NULL);
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
g_signal_connect(G_OBJECT(button), "button_press_event",
G_CALLBACK(arrow_cb), NULL);
gtk_widget_show(button);
arrow = gtk_arrow_new(GTK_ARROW_RIGHT, GTK_SHADOW_OUT);
@ -461,9 +453,10 @@ make_preview(GimpDrawable *drawable)
/* Create horizontal ruler */
data->hruler = ruler = gtk_hruler_new();
gtk_ruler_set_range(GTK_RULER(ruler), 0, data->width, 0, PREVIEW_SIZE);
gtk_signal_connect_object(GTK_OBJECT(preview), "motion_notify_event",
(GtkSignalFunc) GTK_WIDGET_GET_CLASS(ruler)->motion_notify_event,
GTK_OBJECT(ruler));
g_signal_connect_swapped(G_OBJECT(preview), "motion_notify_event",
G_CALLBACK(GTK_WIDGET_GET_CLASS(ruler)->motion_notify_event),
G_OBJECT(ruler));
gtk_table_attach(GTK_TABLE(table), ruler, 1, 2, 0, 1, GTK_FILL, GTK_FILL,
0, 0);
gtk_widget_show(ruler);
@ -471,9 +464,9 @@ make_preview(GimpDrawable *drawable)
/* Create vertical ruler */
data->vruler = ruler = gtk_vruler_new();
gtk_ruler_set_range(GTK_RULER(ruler), 0, data->height, 0, PREVIEW_SIZE);
gtk_signal_connect_object(GTK_OBJECT(preview), "motion_notify_event",
(GtkSignalFunc) GTK_WIDGET_GET_CLASS (ruler)->motion_notify_event,
GTK_OBJECT(ruler));
g_signal_connect_swapped(G_OBJECT(preview), "motion_notify_event",
G_CALLBACK(GTK_WIDGET_GET_CLASS(ruler)->motion_notify_event),
G_OBJECT(ruler));
gtk_table_attach(GTK_TABLE(table), ruler, 0, 1, 1, 2, GTK_FILL, GTK_FILL,
0, 0);
gtk_widget_show(ruler);

View File

@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
*
* 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
@ -24,8 +24,10 @@
#ifndef _IMAP_PREVIEW_H
#define _IMAP_PREVIEW_H
#include <libgimp/gimp.h>
typedef struct {
GimpDrawable *drawable;
GimpDrawable *drawable;
GtkWidget *window;
GtkWidget *frame;
GtkWidget *preview;
@ -33,8 +35,7 @@ typedef struct {
GtkWidget *vruler;
gint width;
gint height;
gint exp_id;
GimpPixelRgn src_rgn;
GimpPixelRgn src_rgn;
GdkCursorType cursor;
} Preview_t;
@ -42,10 +43,10 @@ typedef struct {
Preview_t *make_preview(GimpDrawable *drawable);
void preview_redraw(Preview_t *preview);
void add_preview_motion_event(Preview_t *preview, GtkSignalFunc func);
void add_enter_notify_event(Preview_t *preview, GtkSignalFunc func);
void add_leave_notify_event(Preview_t *preview, GtkSignalFunc func);
void add_preview_button_press_event(Preview_t *preview, GtkSignalFunc func);
void add_preview_motion_event(Preview_t *preview, GCallback func);
void add_enter_notify_event(Preview_t *preview, GCallback func);
void add_leave_notify_event(Preview_t *preview, GCallback func);
void add_preview_button_press_event(Preview_t *preview, GCallback func);
gint preview_get_width(GtkWidget *preview);
gint preview_get_height(GtkWidget *preview);

View File

@ -32,10 +32,7 @@
#include <gtk/gtk.h>
#include "imap_cmd_edit_object.h"
#include "imap_cmd_select.h"
#include "imap_cmd_unselect.h"
#include "imap_cmd_unselect_all.h"
#include "imap_commands.h"
#include "imap_edit_area_info.h"
#include "imap_main.h"
#include "imap_misc.h"