-- Extended ebuild bulletin for eiffelbuil -- Not to be used for Generated code class EB_BULLETIN_EXT inherit EB_BULLETIN rename make_unmanaged as eb_bull_create, set_width as bull_set_width, set_height as bull_set_height, set_size as bull_set_size, add_pointer_motion_action as bull_add_pointer_motion_action, set_action as bull_set_action end; EB_BULLETIN rename make_unmanaged as eb_bull_create redefine set_width, set_height, set_size, add_pointer_motion_action, set_action select set_width, set_height, set_size, add_pointer_motion_action, set_action end creation make_unmanaged feature {NONE} seph1, seph2, sepv1, sepv2: SEPARATOR; make_unmanaged (a_name: STRING; a_parent: COMPOSITE) is do eb_bull_create (a_name, a_parent); !! seph1.make_unmanaged ("tmp1", Current); seph1.set_horizontal (True); !! seph2.make_unmanaged ("tmp2", Current); seph2.set_horizontal (True); !! sepv1.make_unmanaged ("tmp3", Current); sepv1.set_horizontal (False); !! sepv2.make_unmanaged ("tmp4", Current); sepv2.set_horizontal (False); seph1.set_height (separator_width); seph2.set_height (separator_width); sepv1.set_width (separator_width); sepv2.set_width (separator_width); seph1.set_x_y (separator_width, 0); seph2.set_x (separator_width); sepv1.set_x_y (0, separator_width); sepv2.set_y (separator_width); seph1.set_single_dashed_line; seph2.set_single_dashed_line; sepv1.set_single_dashed_line; sepv2.set_single_dashed_line; seph1.set_foreground_color (black_color); seph2.set_foreground_color (black_color); sepv1.set_foreground_color (black_color); sepv2.set_foreground_color (black_color); seph1.manage; seph2.manage; sepv1.manage; sepv2.manage; end; black_color: COLOR is once !! Result.make; Result.set_name ("black") end; separator_width: INTEGER is 2; -- Separator width separator_offset: INTEGER is -- Separator offset once Result := separator_width * 2 end; feature -- Setting sizes set_size (new_w, new_h: INTEGER) is do set_width (new_w); set_height (new_h); end; set_width (new_w: INTEGER) is local w: INTEGER do bull_set_width (new_w); seph1.unmanage; seph2.unmanage; sepv2.unmanage; w := new_w - separator_offset; if w > 0 then seph1.set_width (w); seph2.set_width (w); sepv2.set_x (new_w - separator_width); else seph1.set_width (1); seph2.set_width (1); sepv2.set_x (separator_width); end sepv2.manage; seph2.manage; seph1.manage; end; set_height (new_h: INTEGER) is local h: INTEGER do bull_set_height (new_h); sepv1.unmanage; sepv2.unmanage; seph2.unmanage; h := new_h - separator_offset; if h > 0 then sepv1.set_height (h); sepv2.set_height (h); seph2.set_y (new_h - separator_width); else sepv1.set_height (1); sepv2.set_height (1); seph2.set_y (separator_width); end seph2.manage; sepv2.manage; sepv1.manage; end; feature -- Redefinition of callbacks add_pointer_motion_action (a_command: COMMAND; argument: ANY) is do bull_add_pointer_motion_action (a_command, argument); if seph1 /= Void then seph1.add_pointer_motion_action (a_command, argument); seph2.add_pointer_motion_action (a_command, argument); sepv1.add_pointer_motion_action (a_command, argument); sepv2.add_pointer_motion_action (a_command, argument); end end set_action (action: STRING; a_command: COMMAND; argument: ANY) is do bull_set_action (action, a_command, argument); if seph1 /= Void then seph1.set_action (action, a_command, argument); seph2.set_action (action, a_command, argument); sepv1.set_action (action, a_command, argument); sepv2.set_action (action, a_command, argument); end end end