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

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23