indexing description : "Command using toggle button." legal: "See notice at end of class." status: "See notice at end of class." date : "$Date$" revision : "$Revision$" deferred class EB_TOOLBARABLE_TOGGLE_COMMAND inherit EB_TOOLBARABLE_COMMAND redefine new_mini_toolbar_item end feature -- Change set_select (b: BOOLEAN) is local lst: like internal_managed_toolbar_items but: EB_COMMAND_TOGGLE_TOOL_BAR_BUTTON do lst := internal_managed_toolbar_items if lst /= Void and then not lst.is_empty then from lst.start until lst.after loop but ?= lst.item if but /= Void then but.select_actions.block if b then but.enable_select else but.disable_select end but.select_actions.resume end lst.forth end end end update_tooltip (toggle: EB_COMMAND_TOGGLE_TOOL_BAR_BUTTON) is -- Update tooltip of `toggle'. do toggle.set_tooltip (tooltip) end feature -- Basic operations is_selected: BOOLEAN is deferred end new_mini_toolbar_item: EB_COMMAND_TOGGLE_TOOL_BAR_BUTTON is -- Create a new mini toolbar button for this command. do create Result.make (Current) Result.set_pixmap (mini_pixmap) if is_sensitive then Result.enable_sensitive else Result.disable_sensitive end Result.set_tooltip (tooltip) if is_selected then Result.enable_select end Result.select_actions.extend (agent execute) Result.select_actions.extend (agent update_tooltip (Result)) end indexing copyright: "Copyright (c) 1984-2006, Eiffel Software" license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)" licensing_options: "http://www.eiffel.com/licensing" copying: "[ This file is part of Eiffel Software's Eiffel Development Environment. Eiffel Software's Eiffel Development Environment is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 of the License (available at the URL listed under "license" above). Eiffel Software's Eiffel Development Environment is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Eiffel Software's Eiffel Development Environment; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ]" source: "[ Eiffel Software 356 Storke Road, Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end