lib/shoes/slot.rb in green_shoes-0.227.0 vs lib/shoes/slot.rb in green_shoes-0.233.0

- old
+ new

@@ -72,13 +72,12 @@ max end def fix_size; end - def clear &blk - @app.delete_mouse_events self - @contents.each &:clear + def clear all = false, &blk + all ? @contents.each(&:clear_all) : @contents.each(&:clear) @contents.each{|e| @app.mlcs.delete e; @app.mhcs.delete e} @contents = [] if blk args = {} initials.keys.each{|k| args[k] = instance_variable_get "@#{k}"} @@ -87,9 +86,14 @@ self.contents = tmp.contents contents.each{|e| e.parent = self if e.is_a? Basic} Shoes.call_back_procs @app Shoes.set_cursor_type @app end + end + + def clear_all &blk + @app.delete_mouse_events self + clear true, &blk end def append &blk prepend contents.length, &blk end \ No newline at end of file