indexing description: "[ Implements a volume slider. Use this class to create a volume slider. Note: To create one you can set the coordinates. Everything else is defined in this class. Take a look at the mixer example, the "volume" slider is an implementation of it. ]" date: "$Date$" revision: "$Revision$" class MIXER_SLIDER_VOLUME inherit EM_SLIDER EM_AUDIO_CONSTANTS export {NONE} all end MIXER_CONSTANTS export {NONE} all end create make_positioned feature {NONE} -- Initialization make_positioned (an_x: like x; a_y: like y) is -- Initialize volume slider. require position_valid: an_x >= 0 and a_y >= 0 do make_vertical set_position (an_x, a_y) set_dimension (73, 224) set_range (0, Em_max_volume) set_border (create {EM_NO_BORDER}) set_delegate (create {MIXER_SLIDER_DELEGATE}) set_transparent set_current_value (Em_max_volume) ensure position_set: x = an_x and y = a_y dimension_set: inner_height = 224 and inner_width = 73 range_set: left_value = 0 and right_value = Em_max_volume current_value_set: current_value = Em_max_volume end feature -- Access current_volume: INTEGER is -- Current volume do Result := right_value - current_value end feature -- Implementation update_lights is -- Update the lights for the volume slider. local v: DOUBLE do v := ((current_volume / right_value) * 11).rounded set_background (create {EM_BITMAP_BACKGROUND}.make_from_file (image_directory + "/volume_" + v.out + ".png")) end end