indexing description: "[ Implements a small button. Use this class to create a small button. Note: To create one you can decide an image and the coordinates. Everything else is set in this class. Take a look at the mixer example, the "group" buttons are examples of this button. ]" date: "$Date$" revision: "$Revision$" class MIXER_BUTTON_SMALL inherit MIXER_CONSTANTS export {NONE} all end EM_BUTTON create make_with_image_positioned feature {NONE} -- Initialization make_with_image_positioned (an_image_filename: like image_filename; an_x: like x; a_y: like y) is -- Initialize new button. -- Make the button with an image from the image folder and coordinates from the current pannel. require coordinates_positive: an_x >= 0 and a_y >= 0 do image_filename := an_image_filename make_from_text (" ") set_position (an_x, a_y) set_dimension (13, 12) set_delegate (create {EM_BASIC_PANEL_DELEGATE}) set_border (create {EM_NO_BORDER}) set_transparent active := False ensure positon_set: x = an_x and y = a_y dimension_set: inner_height = 12 and inner_width = 13 text_set: text.is_equal (" ") not_active: active = False end feature -- Implementation toggle_active is -- Switch the active status. do if active then set_background (Void) set_transparent else set_background (create {EM_BITMAP_BACKGROUND}.make_from_file (image_directory + "/" + image_filename)) end active := not active end feature -- Access active: BOOLEAN -- Is current active-status "active"? image_filename: STRING -- Name of the image file identifier: INTEGER -- Id for the current button -- Its used here as the group id. end