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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 62171 - (show annotations)
Tue Aug 1 01:27:17 2006 UTC (13 years, 6 months ago) by larryl
File size: 3673 byte(s)
First commit docking tabbed Eiffel Studio.
1 indexing
2 description: "Objects that is a command to toggle between uml and bon view."
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_TOGGLE_UML_COMMAND
11
12 inherit
13 EB_CONTEXT_DIAGRAM_COMMAND
14 redefine
15 new_toolbar_item,
16 description,
17 initialize
18 end
19
20 EB_CONTEXT_DIAGRAM_TOGGLE_COMMAND
21
22 create
23 make
24
25 feature {NONE} -- Initialization
26
27 initialize is
28 -- Initialize default values.
29 do
30 create accelerator.make_with_key_combination (
31 create {EV_KEY}.make_with_code ({EV_KEY_CONSTANTS}.key_u),
32 True, False, False)
33 accelerator.actions.extend (agent execute)
34 end
35
36 feature -- Basic operations
37
38 execute is
39 -- Perform operation.
40 do
41 if is_sensitive then
42 tool.toggle_uml
43 if tool.world.is_uml then
44 enable_select
45 else
46 disable_select
47 end
48 end
49 end
50
51 new_toolbar_item (display_text: BOOLEAN): EB_COMMAND_TOGGLE_TOOL_BAR_BUTTON is
52 -- Create a new toolbar button for this command.
53 --
54 -- Call `recycle' on the result when you don't need it anymore otherwise
55 -- it will never be garbage collected.
56 do
57 create Result.make (Current)
58 current_button := Result
59 if tool.is_uml then
60 Result.toggle
61 end
62 initialize_toolbar_item (Result, display_text)
63 Result.select_actions.extend (agent execute)
64 end
65
66 feature -- Access
67
68 tooltip: STRING is
69 -- Tooltip for the toolbar button.
70 do
71 if current_button.is_selected then
72 Result := Interface_names.f_diagram_show_bon
73 else
74 Result := Interface_names.f_diagram_show_uml
75 end
76 end
77
78 feature {NONE} -- Implementation
79
80 pixmap: EV_PIXMAP is
81 -- Pixmap representing the command.
82 do
83 Result := pixmaps.icon_pixmaps.diagram_view_uml_icon
84 end
85
86 pixel_buffer: EV_PIXEL_BUFFER is
87 -- Pixel buffer representing the command.
88 do
89 -- Currently there is no pixel buffer for this command.
90 end
91
92 description: STRING is
93 -- Description for this command.
94 do
95 Result := Interface_names.l_diagram_uml_visibility
96 end
97
98 name: STRING is "UML_visibility"
99 -- Name of the command. Used to store the command in the
100 -- preferences.
101
102 feature {EB_CONTEXT_EDITOR} -- Implementation
103
104 current_button: EB_COMMAND_TOGGLE_TOOL_BAR_BUTTON;
105 -- Current toggle button.
106
107 indexing
108 copyright: "Copyright (c) 1984-2006, Eiffel Software"
109 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
110 licensing_options: "http://www.eiffel.com/licensing"
111 copying: "[
112 This file is part of Eiffel Software's Eiffel Development Environment.
113
114 Eiffel Software's Eiffel Development Environment is free
115 software; you can redistribute it and/or modify it under
116 the terms of the GNU General Public License as published
117 by the Free Software Foundation, version 2 of the License
118 (available at the URL listed under "license" above).
119
120 Eiffel Software's Eiffel Development Environment is
121 distributed in the hope that it will be useful, but
122 WITHOUT ANY WARRANTY; without even the implied warranty
123 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
124 See the GNU General Public License for more details.
125
126 You should have received a copy of the GNU General Public
127 License along with Eiffel Software's Eiffel Development
128 Environment; if not, write to the Free Software Foundation,
129 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
130 ]"
131 source: "[
132 Eiffel Software
133 356 Storke Road, Goleta, CA 93117 USA
134 Telephone 805-685-1006, Fax 805-685-6869
135 Website http://www.eiffel.com
136 Customer support http://support.eiffel.com
137 ]"
138
139 end -- class EB_TOGGLE_UML_COMMAND

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23