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

Contents of /branches/Eiffel_57_docking/Src/Eiffel/interface/new_graphical/commands/eb_command_feedback.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: 3381 byte(s)
First commit docking tabbed Eiffel Studio.
1 indexing
2 description: "Command that may be linked with a toolbar button and a menu item."
3 legal: "See notice at end of class."
4 status: "See notice at end of class."
5 author: "Christophe Bonnard"
6 date: "$Date$"
7 revision: "$Revision$"
8
9 deferred class
10 EB_COMMAND_FEEDBACK
11
12 inherit
13 EB_GRAPHICAL_COMMAND
14
15 feature -- Initialization
16
17 set_button (a_button: like button) is
18 -- Set `button' to `a_button'.
19 require
20 a_button_non_void: a_button /= Void
21 do
22 button := a_button
23 button.select_actions.extend (agent execute)
24 ensure
25 properly_set: button = a_button
26 end
27
28 set_sd_button (a_button: like sd_button) IS
29 -- Set `a_button' to `sd_button'.
30 require
31 not_void: a_button /= Void
32 do
33 sd_button := a_button
34 sd_button.select_actions.extend (agent execute)
35 ensure
36 set: sd_button = a_button
37 end
38
39 set_menu_item (a_menu_item: like menu_item) is
40 -- Set `menu_item' to `a_menu_item'.
41 require
42 a_menu_item_non_void: a_menu_item /= Void
43 do
44 menu_item := a_menu_item
45 menu_item.select_actions.extend (agent execute)
46 ensure
47 properly_set: menu_item = a_menu_item
48 end
49
50 feature -- Status setting
51
52 enable_sensitive is
53 -- Set both the `associated_button' and
54 -- `associated_menu_entry' to be sensitive.
55 do
56 if button /= Void then
57 button.enable_sensitive
58 end
59 if sd_button /= Void then
60 sd_button.enable_sensitive
61 end
62 if menu_item /= Void then
63 menu_item.enable_sensitive
64 end
65 is_sensitive := True
66 end
67
68 disable_sensitive is
69 -- Set both the `associated_button' and
70 -- `associated_menu_entry' to be insensitive.
71 do
72 if button /= Void then
73 button.disable_sensitive
74 end
75 if sd_button /= Void then
76 sd_button.disable_sensitive
77 end
78 if menu_item /= Void then
79 menu_item.disable_sensitive
80 end
81 is_sensitive := False
82 end
83
84 feature -- Access
85
86 button: EV_TOOL_BAR_BUTTON
87 -- Button on toolbar.
88
89 sd_button: SD_TOOL_BAR_BUTTON
90 -- Button on toolbar.
91
92 menu_item: EV_MENU_ITEM;
93 -- Menu entry in the menu.
94
95 indexing
96 copyright: "Copyright (c) 1984-2006, Eiffel Software"
97 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
98 licensing_options: "http://www.eiffel.com/licensing"
99 copying: "[
100 This file is part of Eiffel Software's Eiffel Development Environment.
101
102 Eiffel Software's Eiffel Development Environment is free
103 software; you can redistribute it and/or modify it under
104 the terms of the GNU General Public License as published
105 by the Free Software Foundation, version 2 of the License
106 (available at the URL listed under "license" above).
107
108 Eiffel Software's Eiffel Development Environment is
109 distributed in the hope that it will be useful, but
110 WITHOUT ANY WARRANTY; without even the implied warranty
111 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
112 See the GNU General Public License for more details.
113
114 You should have received a copy of the GNU General Public
115 License along with Eiffel Software's Eiffel Development
116 Environment; if not, write to the Free Software Foundation,
117 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
118 ]"
119 source: "[
120 Eiffel Software
121 356 Storke Road, Goleta, CA 93117 USA
122 Telephone 805-685-1006, Fax 805-685-6869
123 Website http://www.eiffel.com
124 Customer support http://support.eiffel.com
125 ]"
126
127 end -- class EB_COMMAND_FEEDBACK

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23