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_toolbar.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-09-06  |  3.3 KB  |  94 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_TOOLBAR_H
  25. #define _IMAP_TOOLBAR_H
  26.  
  27. #include "gtk/gtk.h"
  28.  
  29. #include "imap_command.h"
  30.  
  31. typedef struct {
  32.    GtkWidget *toolbar;
  33.    GtkWidget *undo;
  34.    GtkWidget *redo;
  35.    GtkWidget *cut;
  36.    GtkWidget *copy;
  37.    GtkWidget *to_front;
  38.    GtkWidget *to_back;
  39.    GtkWidget *zoom_in;
  40.    GtkWidget *zoom_out;
  41.    GtkWidget *grid;
  42.  
  43.    CommandFactory_t cmd_open;
  44.    CommandFactory_t cmd_save;
  45.    CommandFactory_t cmd_preferences;
  46.    CommandFactory_t cmd_redo;
  47.    CommandFactory_t cmd_undo;
  48.    CommandFactory_t cmd_cut;
  49.    CommandFactory_t cmd_copy;
  50.    CommandFactory_t cmd_paste;
  51.    CommandFactory_t cmd_zoom_in;
  52.    CommandFactory_t cmd_zoom_out;
  53.    CommandFactory_t cmd_edit_map_info;
  54.    CommandFactory_t cmd_move_to_front;
  55.    CommandFactory_t cmd_send_to_back;
  56.    CommandFactory_t cmd_grid;
  57. } ToolBar_t;
  58.  
  59. ToolBar_t *make_toolbar(GtkWidget *main_vbox, GtkWidget *window);
  60. void toolbar_set_zoom_sensitivity(ToolBar_t *toolbar, gint factor);
  61. void toolbar_set_grid(ToolBar_t *toolbar, gboolean active);
  62. void toolbar_shapes_selected(ToolBar_t *toolbar, gint count);
  63.  
  64. #define toolbar_set_open_command(toolbar, command) \
  65.     ((toolbar)->cmd_open = (command))
  66. #define toolbar_set_save_command(toolbar, command) \
  67.     ((toolbar)->cmd_save = (command))
  68. #define toolbar_set_preferences_command(toolbar, command) \
  69.     ((toolbar)->cmd_preferences = (command))
  70. #define toolbar_set_redo_command(toolbar, command) \
  71.     ((toolbar)->cmd_redo = (command))
  72. #define toolbar_set_undo_command(toolbar, command) \
  73.     ((toolbar)->cmd_undo = (command))
  74. #define toolbar_set_cut_command(toolbar, command) \
  75.     ((toolbar)->cmd_cut = (command))
  76. #define toolbar_set_copy_command(toolbar, command) \
  77.     ((toolbar)->cmd_copy= (command))
  78. #define toolbar_set_paste_command(toolbar, command) \
  79.     ((toolbar)->cmd_paste = (command))
  80. #define toolbar_set_zoom_in_command(toolbar, command) \
  81.     ((toolbar)->cmd_zoom_in = (command))
  82. #define toolbar_set_zoom_out_command(toolbar, command) \
  83.     ((toolbar)->cmd_zoom_out = (command))
  84. #define toolbar_set_edit_map_info_command(toolbar, command) \
  85.     ((toolbar)->cmd_edit_map_info = (command))
  86. #define toolbar_set_move_to_front_command(toolbar, command) \
  87.     ((toolbar)->cmd_move_to_front = (command))
  88. #define toolbar_set_send_to_back_command(toolbar, command) \
  89.     ((toolbar)->cmd_send_to_back = (command))
  90. #define toolbar_set_grid_command(toolbar, command) \
  91.     ((toolbar)->cmd_grid = (command))
  92.  
  93. #endif /* _IMAP_TOOLBAR_H */
  94.