File: imap_menu.h

package info (click to toggle)
gimp 2.2.13-1etch4
  • links: PTS
  • area: main
  • in suites: etch
  • size: 94,832 kB
  • ctags: 47,113
  • sloc: ansic: 524,858; xml: 36,798; lisp: 9,870; sh: 9,409; makefile: 7,923; python: 2,674; perl: 2,589; yacc: 520; lex: 334
file content (157 lines) | stat: -rw-r--r-- 5,115 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/*
 * 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_MENU_H
#define _IMAP_MENU_H

#include "imap_command.h"
#include "imap_mru.h"

typedef struct {
  GtkWidget *file_menu;
  GtkWidget *edit_menu;
  GtkWidget *open_recent;
  GtkWidget *undo;
  GtkWidget *redo;
  GtkWidget *cut;
  GtkWidget *copy;
  GtkWidget *clear;
  GtkWidget *edit;
  GtkWidget *deselect_all;
  GtkWidget *arrow;
  GtkWidget *fuzzy_select;
  GtkWidget *rectangle;
  GtkWidget *circle;
  GtkWidget *polygon;
  GtkWidget *grid;
  GtkWidget *gray;
  GtkWidget *color;
  GtkWidget *zoom[8];
  GtkWidget *zoom_in;
  GtkWidget *zoom_out;

  gint	      nr_off_mru_items;

  CommandFactory_t cmd_open;
  CommandFactory_t cmd_save;
  CommandFactory_t cmd_save_as;
  CommandFactory_t cmd_preferences;
  CommandFactory_t cmd_close;
  CommandFactory_t cmd_quit;

  CommandFactory_t cmd_undo;
  CommandFactory_t cmd_redo;
  CommandFactory_t cmd_cut;
  CommandFactory_t cmd_copy;
  CommandFactory_t cmd_paste;
  CommandFactory_t cmd_select_all;
  CommandFactory_t cmd_deselect_all;
  CommandFactory_t cmd_clear;
  CommandFactory_t cmd_edit_area_info;

  CommandFactory_t cmd_area_list;
  CommandFactory_t cmd_source;
  CommandFactory_t cmd_color;
  CommandFactory_t cmd_gray;
  CommandFactory_t cmd_zoom_in;
  CommandFactory_t cmd_zoom_out;

  CommandFactory_t cmd_edit_map_info;

  CommandFactory_t cmd_grid_settings;
  CommandFactory_t cmd_create_guides;
  CommandFactory_t cmd_use_gimp_guides;

  CommandFactory_t cmd_help;
  CommandFactory_t cmd_about;
} Menu_t;

#define menu_set_open_command(menu, command) \
	((menu)->cmd_open = (command))
#define menu_set_save_command(menu, command) \
	((menu)->cmd_save = (command))
#define menu_set_save_as_command(menu, command) \
	((menu)->cmd_save_as = (command))
#define menu_set_preferences_command(menu, command) \
	((menu)->cmd_preferences = (command))
#define menu_set_close_command(menu, command) \
	((menu)->cmd_close = (command))
#define menu_set_quit_command(menu, command) \
	((menu)->cmd_quit = (command))
#define menu_set_undo_command(menu, command) \
	((menu)->cmd_undo = (command))
#define menu_set_redo_command(menu, command) \
	((menu)->cmd_redo = (command))
#define menu_set_cut_command(menu, command) \
	((menu)->cmd_cut = (command))
#define menu_set_copy_command(menu, command) \
	((menu)->cmd_copy = (command))
#define menu_set_paste_command(menu, command) \
	((menu)->cmd_paste = (command))
#define menu_set_select_all_command(menu, command) \
	((menu)->cmd_select_all = (command))
#define menu_set_deselect_all_command(menu, command) \
	((menu)->cmd_deselect_all = (command))
#define menu_set_clear_command(menu, command) \
	((menu)->cmd_clear = (command))
#define menu_set_edit_erea_info_command(menu, command) \
	((menu)->cmd_edit_area_info = (command))
#define menu_set_area_list_command(menu, command) \
	((menu)->cmd_area_list = (command))
#define menu_set_source_command(menu, command) \
	((menu)->cmd_source = (command))
#define menu_set_color_command(menu, command) \
	((menu)->cmd_color = (command))
#define menu_set_gray_command(menu, command) \
	((menu)->cmd_gray = (command))
#define menu_set_zoom_in_command(menu, command) \
	((menu)->cmd_zoom_in = (command))
#define menu_set_zoom_out_command(menu, command) \
	((menu)->cmd_zoom_out = (command))
#define menu_set_edit_map_info_command(popup, command) \
	((menu)->cmd_edit_map_info = (command))
#define menu_set_grid_settings_command(menu, command) \
	((menu)->cmd_grid_settings = (command))
#define menu_set_create_guides_command(menu, command) \
	((menu)->cmd_create_guides = (command))
#define menu_set_use_gimp_guides_command(menu, command) \
	((menu)->cmd_use_gimp_guides = (command))
#define menu_set_help_command(menu, command) \
	((menu)->cmd_help = (command))
#define menu_set_about_command(menu, command) \
	((menu)->cmd_about = (command))

Menu_t *make_menu(GtkWidget *main_vbox, GtkWidget *window);
void menu_build_mru_items(MRU_t *mru);
void menu_set_zoom_sensitivity(gint factor);

void menu_select_arrow(void);
void menu_select_fuzzy_select(void);
void menu_select_rectangle(void);
void menu_select_circle(void);
void menu_select_polygon(void);
void menu_set_zoom(gint factor);
void menu_check_grid(gboolean check);
void menu_shapes_selected(gint count);

#endif /* _IMAP_MENU_H */