Sha256: 2b5e6845615a5c3f7a6ddf930c660eb2d9323c22d2c4fd71a09ffd069ceae59f
Contents?: true
Size: 1.15 KB
Versions: 6
Compression:
Stored size: 1.15 KB
Contents
# Copyright (c) 2023 M.J.N. Corino, The Netherlands # # This software is released under the MIT license. # # Some parts are # Copyright 2004-2007, wxRuby development team # released under the MIT-like wxRuby2 license # Just a shortcut version for creating a vertical box sizer class Wx::VBoxSizer < Wx::BoxSizer def initialize(&block) super(Wx::VERTICAL, &nil) if block if block.arity == -1 or block.arity == 0 self.instance_eval(&block) elsif block.arity == 1 block.call(self) else Kernel.raise ArgumentError, "Block to initialize should accept a single argument or none" end end end end # Just a shortcut version for creating a vertical wrap sizer class Wx::VWrapSizer < Wx::WrapSizer def initialize(flags=Wx::WRAPSIZER_DEFAULT_FLAGS, &block) super(Wx::VERTICAL, &nil) if block if block.arity == -1 or block.arity == 0 self.instance_eval(&block) elsif block.arity == 1 block.call(self) else Kernel.raise ArgumentError, "Block to initialize should accept a single argument or none" end end end end
Version data entries
6 entries across 6 versions & 1 rubygems