2
* This is a plug-in for the GIMP.
4
* Generates clickable image maps.
6
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program; if not, write to the Free Software
20
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28
#include "imap_commands.h"
30
#include "libgimp/stdplugins-intl.h"
32
static void object_up_command_destruct(Command_t *parent);
33
static CmdExecuteValue_t object_up_command_execute(Command_t *parent);
34
static void object_up_command_undo(Command_t *parent);
36
CommandClass_t object_up_command_class = {
37
object_up_command_destruct,
38
object_up_command_execute,
39
object_up_command_undo,
40
NULL /* object_up_command_redo */
50
object_up_command_new(ObjectList_t *list, Object_t *obj)
52
ObjectUpCommand_t *command = g_new(ObjectUpCommand_t, 1);
54
command->obj = object_ref(obj);
55
return command_init(&command->parent, _("Move Up"),
56
&object_up_command_class);
60
object_up_command_destruct(Command_t *parent)
62
ObjectUpCommand_t *command = (ObjectUpCommand_t*) parent;
63
object_unref(command->obj);
66
static CmdExecuteValue_t
67
object_up_command_execute(Command_t *parent)
69
ObjectUpCommand_t *command = (ObjectUpCommand_t*) parent;
70
object_list_move_up(command->list, command->obj);
75
object_up_command_undo(Command_t *parent)
77
ObjectUpCommand_t *command = (ObjectUpCommand_t*) parent;
78
object_list_move_down(command->list, command->obj);