note description: "EiffelVision item, gtk implementation" legal: "See notice at end of class."; status: "See notice at end of class." date: "$Date$"; revision: "$Revision$" deferred class EV_ITEM_IMP inherit EV_ITEM_I redefine interface end EV_PICK_AND_DROPABLE_IMP redefine interface, destroy end EV_PIXMAPABLE_IMP redefine interface end feature {NONE} -- Initialization call_button_event_actions ( a_type: INTEGER; a_x, a_y, a_button: INTEGER; a_x_tilt, a_y_tilt, a_pressure: DOUBLE; a_screen_x, a_screen_y: INTEGER) -- Call pointer_button_press_actions or pointer_double_press_actions -- depending on event type in first position of `event_data'. local t : TUPLE [INTEGER, INTEGER, INTEGER, DOUBLE, DOUBLE, DOUBLE, INTEGER, INTEGER] do t := [a_x, a_y, a_button, a_x_tilt, a_y_tilt, a_pressure, a_screen_x, a_screen_y] if a_type = {GTK}.gDK_BUTTON_PRESS_ENUM then if pointer_button_press_actions_internal /= Void then pointer_button_press_actions_internal.call (t) end else -- a_type = {EV_GTK_EXTERNALS}.gDK_2BUTTON_PRESS_ENUM if pointer_double_press_actions_internal /= Void then pointer_double_press_actions_internal.call (t) end end end feature -- Access parent_imp: detachable EV_ITEM_LIST_IMP [EV_ITEM] -- The parent of the Current widget -- May be void. do Result := item_parent_imp end feature {EV_ANY_I} -- Implementation destroy -- Destroy `Current' do if attached parent_imp as l_parent_imp and attached interface then l_parent_imp.prune (interface) end Precursor {EV_PICK_AND_DROPABLE_IMP} end item_parent_imp: detachable EV_ITEM_LIST_IMP [EV_ITEM] -- Used to store parent imp of items where parent stores -- items in a list widget instead of the c_object. set_item_parent_imp (a_parent: detachable EV_ITEM_LIST_IMP [EV_ITEM]) -- Set `item_parent_imp' to `a_parent'. do item_parent_imp := a_parent end feature {EV_ANY_I} -- Implementation update_for_pick_and_drop (starting: BOOLEAN) -- Pick and drop status has changed so update appearance of -- `Current' to reflect available targets. do -- Redefined by descendents. end feature {EV_ANY, EV_ANY_I} -- Implementation interface: detachable EV_ITEM note option: stable attribute end; note copyright: "Copyright (c) 1984-2014, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class EV_ITEM_IMP