1 |
indexing |
2 |
description : "Command to perform an undo operation" |
3 |
legal: "See notice at end of class." |
4 |
status: "See notice at end of class." |
5 |
date : "$Date$" |
6 |
revision : "$Revision $" |
7 |
|
8 |
class |
9 |
EB_UNDO_COMMAND |
10 |
|
11 |
inherit |
12 |
EB_UNDO_REDO_COMMAND |
13 |
redefine |
14 |
executable, |
15 |
tooltext, |
16 |
pixel_buffer |
17 |
end |
18 |
|
19 |
|
20 |
create |
21 |
make |
22 |
|
23 |
feature -- Status report |
24 |
|
25 |
executable: BOOLEAN is |
26 |
-- Is the operation possible? |
27 |
do |
28 |
if editor /= Void then |
29 |
Result := editor.undo_is_possible |
30 |
end |
31 |
end |
32 |
|
33 |
feature -- Execution |
34 |
|
35 |
execute is |
36 |
-- Execute the undo/redo operation |
37 |
do |
38 |
if editor /= Void then |
39 |
editor.undo |
40 |
end |
41 |
end |
42 |
|
43 |
feature {NONE} -- Implementation |
44 |
|
45 |
menu_name: STRING is |
46 |
-- Name as it appears in the menu (with & symbol). |
47 |
do |
48 |
Result := Interface_names.m_Undo |
49 |
end |
50 |
|
51 |
pixmap: EV_PIXMAP is |
52 |
-- Pixmaps representing the command. |
53 |
do |
54 |
Result := pixmaps.icon_pixmaps.general_undo_icon |
55 |
end |
56 |
|
57 |
pixel_buffer: EV_PIXEL_BUFFER is |
58 |
-- Pixel buffer representing the command. |
59 |
do |
60 |
Result := pixmaps.icon_pixmaps.general_undo_icon_buffer |
61 |
end |
62 |
|
63 |
tooltip: STRING is |
64 |
-- Tooltip for the toolbar button. |
65 |
do |
66 |
Result := Interface_names.f_Undo |
67 |
end |
68 |
|
69 |
tooltext: STRING is |
70 |
-- Text for the toolbar button. |
71 |
do |
72 |
Result := Interface_names.b_Undo |
73 |
end |
74 |
|
75 |
description: STRING is |
76 |
-- Description for this command. |
77 |
do |
78 |
Result := Interface_names.e_Undo |
79 |
end |
80 |
|
81 |
name: STRING is "Undo"; |
82 |
-- Name of the command. Used to store the command in the |
83 |
-- preferences. |
84 |
|
85 |
indexing |
86 |
copyright: "Copyright (c) 1984-2006, Eiffel Software" |
87 |
license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)" |
88 |
licensing_options: "http://www.eiffel.com/licensing" |
89 |
copying: "[ |
90 |
This file is part of Eiffel Software's Eiffel Development Environment. |
91 |
|
92 |
Eiffel Software's Eiffel Development Environment is free |
93 |
software; you can redistribute it and/or modify it under |
94 |
the terms of the GNU General Public License as published |
95 |
by the Free Software Foundation, version 2 of the License |
96 |
(available at the URL listed under "license" above). |
97 |
|
98 |
Eiffel Software's Eiffel Development Environment is |
99 |
distributed in the hope that it will be useful, but |
100 |
WITHOUT ANY WARRANTY; without even the implied warranty |
101 |
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
102 |
See the GNU General Public License for more details. |
103 |
|
104 |
You should have received a copy of the GNU General Public |
105 |
License along with Eiffel Software's Eiffel Development |
106 |
Environment; if not, write to the Free Software Foundation, |
107 |
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
108 |
]" |
109 |
source: "[ |
110 |
Eiffel Software |
111 |
356 Storke Road, Goleta, CA 93117 USA |
112 |
Telephone 805-685-1006, Fax 805-685-6869 |
113 |
Website http://www.eiffel.com |
114 |
Customer support http://support.eiffel.com |
115 |
]" |
116 |
|
117 |
end -- class EB_UNDO_COMMAND |