Class: Fzeet::Container
- Inherits:
-
Object
- Object
- Fzeet::Container
- Defined in:
- lib/fzeet/windows/user/Window/Container.rb
Instance Method Summary collapse
-
#initialize(parent, opts = {}) ⇒ Container
constructor
A new instance of Container.
Constructor Details
#initialize(parent, opts = {}) ⇒ Container
Returns a new instance of Container.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/fzeet/windows/user/Window/Container.rb', line 7 def initialize(parent, opts = {}) opts[:parent] = parent (opts[:style] ||= []) << :visible << :child << :clipsiblings << :clipchildren super(opts) style >> :caption >> :thickframe on(:erasebkgnd) { |args| Handle.wrap(FFI::Pointer.new(args[:wParam]), DCMethods). fillRect( rect, case @parent when Dialog; FFI::Pointer.new(Windows::CTLCOLOR_DLG + 1) when BasicWindow; FFI::Pointer.new(Windows.DetonateLastError(-1, :GetClassLong, @parent.handle, Windows::GCL_HBRBACKGROUND)) end ) args[:result] = 1 } end |