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_menu.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-09-06  |  4.7 KB  |  145 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_MENU_H
  25. #define _IMAP_MENU_H
  26.  
  27. #include "imap_command.h"
  28. #include "imap_mru.h"
  29.  
  30. typedef struct {
  31.    GtkWidget *file_menu;
  32.    GtkWidget *edit_menu;
  33.    GtkWidget *undo;
  34.    GtkWidget *redo;
  35.    GtkWidget *cut;
  36.    GtkWidget *copy;
  37.    GtkWidget *clear;
  38.    GtkWidget *edit;
  39.    GtkWidget *arrow;
  40.    GtkWidget *rectangle;
  41.    GtkWidget *circle;
  42.    GtkWidget *polygon;
  43.    GtkWidget *grid;
  44.    GtkWidget *gray;
  45.    GtkWidget *color;
  46.    GtkWidget *zoom[8];
  47.    GtkWidget *zoom_in;
  48.    GtkWidget *zoom_out;
  49.  
  50.    gint          nr_off_mru_items;
  51.  
  52.    CommandFactory_t cmd_open;
  53.    CommandFactory_t cmd_save;
  54.    CommandFactory_t cmd_save_as;
  55.    CommandFactory_t cmd_preferences;
  56.    CommandFactory_t cmd_close;
  57.    CommandFactory_t cmd_quit;
  58.  
  59.    CommandFactory_t cmd_undo;
  60.    CommandFactory_t cmd_redo;
  61.    CommandFactory_t cmd_cut;
  62.    CommandFactory_t cmd_copy;
  63.    CommandFactory_t cmd_paste;
  64.    CommandFactory_t cmd_select_all;
  65.    CommandFactory_t cmd_clear;
  66.    CommandFactory_t cmd_edit_area_info;
  67.  
  68.    CommandFactory_t cmd_area_list;
  69.    CommandFactory_t cmd_source;
  70.    CommandFactory_t cmd_color;
  71.    CommandFactory_t cmd_gray;
  72.    CommandFactory_t cmd_zoom_in;
  73.    CommandFactory_t cmd_zoom_out;
  74.  
  75.    CommandFactory_t cmd_edit_map_info;
  76.  
  77.    CommandFactory_t cmd_grid_settings;
  78.    CommandFactory_t cmd_create_guides;
  79.  
  80.    CommandFactory_t cmd_about;
  81. } Menu_t;
  82.  
  83. #define menu_set_open_command(menu, command) \
  84.     ((menu)->cmd_open = (command))
  85. #define menu_set_save_command(menu, command) \
  86.     ((menu)->cmd_save = (command))
  87. #define menu_set_save_as_command(menu, command) \
  88.     ((menu)->cmd_save_as = (command))
  89. #define menu_set_preferences_command(menu, command) \
  90.     ((menu)->cmd_preferences = (command))
  91. #define menu_set_close_command(menu, command) \
  92.     ((menu)->cmd_close = (command))
  93. #define menu_set_quit_command(menu, command) \
  94.     ((menu)->cmd_quit = (command))
  95. #define menu_set_undo_command(menu, command) \
  96.     ((menu)->cmd_undo = (command))
  97. #define menu_set_redo_command(menu, command) \
  98.     ((menu)->cmd_redo = (command))
  99. #define menu_set_cut_command(menu, command) \
  100.     ((menu)->cmd_cut = (command))
  101. #define menu_set_copy_command(menu, command) \
  102.     ((menu)->cmd_copy = (command))
  103. #define menu_set_paste_command(menu, command) \
  104.     ((menu)->cmd_paste = (command))
  105. #define menu_set_select_all_command(menu, command) \
  106.     ((menu)->cmd_select_all = (command))
  107. #define menu_set_clear_command(menu, command) \
  108.     ((menu)->cmd_clear = (command))
  109. #define menu_set_edit_erea_info_command(menu, command) \
  110.     ((menu)->cmd_edit_area_info = (command))
  111. #define menu_set_area_list_command(menu, command) \
  112.     ((menu)->cmd_area_list = (command))
  113. #define menu_set_source_command(menu, command) \
  114.     ((menu)->cmd_source = (command))
  115. #define menu_set_color_command(menu, command) \
  116.     ((menu)->cmd_color = (command))
  117. #define menu_set_gray_command(menu, command) \
  118.     ((menu)->cmd_gray = (command))
  119. #define menu_set_zoom_in_command(menu, command) \
  120.     ((menu)->cmd_zoom_in = (command))
  121. #define menu_set_zoom_out_command(menu, command) \
  122.     ((menu)->cmd_zoom_out = (command))
  123. #define menu_set_edit_map_info_command(popup, command) \
  124.     ((menu)->cmd_edit_map_info = (command))
  125. #define menu_set_grid_settings_command(menu, command) \
  126.     ((menu)->cmd_grid_settings = (command))
  127. #define menu_set_create_guides_command(menu, command) \
  128.     ((menu)->cmd_create_guides = (command))
  129. #define menu_set_about_command(menu, command) \
  130.     ((menu)->cmd_about = (command))
  131.  
  132. Menu_t *make_menu(GtkWidget *main_vbox, GtkWidget *window);
  133. void menu_build_mru_items(MRU_t *mru);
  134. void menu_set_zoom_sensitivity(gint factor);
  135.  
  136. void menu_select_arrow(void);
  137. void menu_select_rectangle(void);
  138. void menu_select_circle(void);
  139. void menu_select_polygon(void);
  140. void menu_set_zoom(gint factor);
  141. void menu_check_grid(gboolean check);
  142. void menu_shapes_selected(gint count);
  143.  
  144. #endif /* _IMAP_MENU_H */
  145.