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

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23