/[eiffelstudio]/branches/Eiffel_57_docking/Src/Eiffel/interface/new_graphical/commands/eb_delete_view_command.e
ViewVC logotype

Contents of /branches/Eiffel_57_docking/Src/Eiffel/interface/new_graphical/commands/eb_delete_view_command.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 62171 - (show annotations)
Tue Aug 1 01:27:17 2006 UTC (13 years, 4 months ago) by larryl
File size: 3368 byte(s)
First commit docking tabbed Eiffel Studio.
1 indexing
2 description : "Command to delete diagram views."
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_DELETE_VIEW_COMMAND
10
11 inherit
12 EB_CONTEXT_DIAGRAM_COMMAND
13 redefine
14 menu_name,
15 initialize
16 end
17
18 create
19 make
20
21 feature {NONE} -- Initialization
22
23 initialize is
24 -- Initialize default values.
25 do
26 create accelerator.make_with_key_combination (
27 create {EV_KEY}.make_with_code ({EV_KEY_CONSTANTS}.key_x),
28 True, False, False)
29 accelerator.actions.extend (agent execute)
30 end
31
32 feature -- Basic operations
33
34 execute is
35 -- Display `confirmation' and remove current view if OK pressed.
36 local
37 dial: EV_CONFIRMATION_DIALOG
38 do
39 if is_sensitive then
40 dial := confirmation
41 dial.disable_user_resize
42 dial.show_modal_to_window (tool.develop_window.window)
43 end
44 end
45
46 feature {NONE} -- Implementation
47
48 pixmap: EV_PIXMAP is
49 -- Pixmap representing the command.
50 do
51 Result := pixmaps.icon_pixmaps.general_delete_icon
52 end
53
54 pixel_buffer: EV_PIXEL_BUFFER is
55 -- Pixel buffer representing the command.
56 do
57 -- Currently there is no pixel buffer for this command.
58 end
59
60 tooltip: STRING is
61 -- Tooltip for the toolbar button.
62 do
63 Result := Interface_names.f_diagram_delete_view
64 end
65
66 menu_name: STRING is
67 -- Name for the menu entry.
68 do
69 Result := Interface_names.m_diagram_delete_view
70 end
71
72 name: STRING is "Delete_view"
73 -- Name of the command. Used to store the command in the
74 -- preferences.
75
76 confirmation: EV_CONFIRMATION_DIALOG is
77 -- Associated widget.
78 do
79 create Result.make_with_text_and_actions (
80 Interface_names.l_Diagram_delete_view_cmd,
81 <<agent ok_pressed>>)
82 end
83
84 feature {NONE} -- Events
85
86 ok_pressed is
87 -- The user really wants to delete current view.
88 local
89 ew: EIFFEL_WORLD
90 do
91 ew := tool.world
92 if not ew.current_view.has_substring ("DEFAULT") then
93 tool.remove_view (ew.current_view)
94 end
95 end
96
97 indexing
98 copyright: "Copyright (c) 1984-2006, Eiffel Software"
99 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
100 licensing_options: "http://www.eiffel.com/licensing"
101 copying: "[
102 This file is part of Eiffel Software's Eiffel Development Environment.
103
104 Eiffel Software's Eiffel Development Environment is free
105 software; you can redistribute it and/or modify it under
106 the terms of the GNU General Public License as published
107 by the Free Software Foundation, version 2 of the License
108 (available at the URL listed under "license" above).
109
110 Eiffel Software's Eiffel Development Environment is
111 distributed in the hope that it will be useful, but
112 WITHOUT ANY WARRANTY; without even the implied warranty
113 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
114 See the GNU General Public License for more details.
115
116 You should have received a copy of the GNU General Public
117 License along with Eiffel Software's Eiffel Development
118 Environment; if not, write to the Free Software Foundation,
119 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
120 ]"
121 source: "[
122 Eiffel Software
123 356 Storke Road, Goleta, CA 93117 USA
124 Telephone 805-685-1006, Fax 805-685-6869
125 Website http://www.eiffel.com
126 Customer support http://support.eiffel.com
127 ]"
128
129 end -- class EB_DELETE_VIEW_COMMAND

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23