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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 61992 - (show annotations)
Sun Jul 30 06:09:58 2006 UTC (13 years, 4 months ago) by manus
File size: 3619 byte(s)
EiffelStudio docking branch. It only contains modified classes needed to get the docking version of EiffelStudio.
1 indexing
2 description : "Command that can be added in a menu and in a toolbar."
3 legal: "See notice at end of class."
4 status: "See notice at end of class."
5 date : "$Date$"
6 revision : "$Revision$"
7
8 deferred class
9 EB_TOOLBARABLE_AND_MENUABLE_COMMAND
10
11 inherit
12 EB_TOOLBARABLE_COMMAND
13 redefine
14 disable_sensitive,
15 enable_sensitive
16 end
17
18 EB_MENUABLE_COMMAND
19 redefine
20 disable_sensitive,
21 enable_sensitive,
22 initialize_menu_item
23 end
24
25 feature -- Status setting
26
27 enable_sensitive is
28 -- Set `is_sensitive' to True.
29 local
30 menu_items: like managed_menu_items
31 toolbar_items: like managed_toolbar_items
32 do
33 if not is_sensitive then
34 -- Enable menu items
35 menu_items := managed_menu_items
36 if menu_items /= Void then
37 from
38 menu_items.start
39 until
40 menu_items.after
41 loop
42 menu_items.item.enable_sensitive
43 menu_items.forth
44 end
45 end
46
47 -- Enable toolbar item
48 toolbar_items := managed_toolbar_items
49 if toolbar_items /= Void then
50 from
51 toolbar_items.start
52 until
53 toolbar_items.after
54 loop
55 toolbar_items.item.enable_sensitive
56 toolbar_items.forth
57 end
58 end
59
60 is_sensitive := True
61 end
62 end
63
64 disable_sensitive is
65 -- Set `is_sensitive' to True.
66 local
67 menu_items: like managed_menu_items
68 toolbar_items: like managed_toolbar_items
69 do
70 if is_sensitive then
71 -- Disable menu items
72 menu_items := managed_menu_items
73 if menu_items /= Void then
74 from
75 menu_items.start
76 until
77 menu_items.after
78 loop
79 menu_items.item.disable_sensitive
80 menu_items.forth
81 end
82 end
83
84 -- Disable toolbar item
85 toolbar_items := managed_toolbar_items
86 if toolbar_items /= Void then
87 from
88 toolbar_items.start
89 until
90 toolbar_items.after
91 loop
92 toolbar_items.item.disable_sensitive
93 toolbar_items.forth
94 end
95 end
96 is_sensitive := False
97 end
98 end
99
100 feature {NONE} -- Implementation
101
102 initialize_menu_item (a_menu_item: EB_COMMAND_MENU_ITEM) is
103 -- Create a new menu entry for this command.
104 do
105 Precursor {EB_MENUABLE_COMMAND} (a_menu_item)
106 if pixmap /= Void then
107 a_menu_item.set_pixmap (pixmap)
108 end
109 end
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_TOOLBARABLE_AND_MENUABLE_COMMAND

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23