home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / plug-ins / imagemap / imap_selection.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-09-06  |  2.2 KB  |  70 lines

  1. /*
  2.  * This is a plug-in for the GIMP.
  3.  *
  4.  * Generates clickable image maps.
  5.  *
  6.  * Copyright (C) 1998-1999 Maurits Rijk  lpeek.mrijk@consunet.nl
  7.  *
  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.
  12.  *
  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.
  17.  *
  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.
  21.  *
  22.  */
  23.  
  24. #ifndef _IMAP_SELECTION_H
  25. #define _IMAP_SELECTION_H
  26.  
  27. #include "imap_command.h"
  28. #include "imap_object.h"
  29.  
  30. typedef struct {
  31.    GtkWidget    *container;
  32.    GtkWidget    *list;
  33.    GtkWidget    *selected_child;
  34.    GtkWidget    *arrow_up;
  35.    GtkWidget    *arrow_down;
  36.    GtkWidget    *remove;
  37.    GtkWidget    *edit;
  38.    ObjectList_t *object_list;
  39.    gint        selected_row;
  40.    gint        is_visible;
  41.    gint        nr_rows;
  42.    gint     select_lock;
  43.    gint     unselect_lock;
  44.  
  45.    CommandFactory_t cmd_move_up;
  46.    CommandFactory_t cmd_move_down;
  47.    CommandFactory_t cmd_delete;
  48.    CommandFactory_t cmd_edit;
  49. } Selection_t;
  50.  
  51. Selection_t *make_selection(GtkWidget *window, ObjectList_t *list);
  52. void selection_toggle_visibility(Selection_t *selection);
  53.  
  54. #define selection_freeze(selection) \
  55.     gtk_clist_freeze(GTK_CLIST((selection)->list))
  56. #define selection_thaw(selection) \
  57.     gtk_clist_thaw(GTK_CLIST((selection)->list))
  58.  
  59. #define selection_set_move_up_command(selection, command) \
  60.     ((selection)->cmd_move_up = (command))
  61. #define selection_set_move_down_command(selection, command) \
  62.     ((selection)->cmd_move_down = (command))
  63. #define selection_set_delete_command(selection, command) \
  64.     ((selection)->cmd_delete = (command))
  65. #define selection_set_edit_command(selection, command) \
  66.     ((selection)->cmd_edit = (command))
  67.  
  68. #endif /* _IMAP_SELECTION_H */
  69.  
  70.