Sha256: a205e936c66726d6beb7cb8a07a2a6ee2a86a250b3a7ce94e510815f30aac4ab

Contents?: true

Size: 841 Bytes

Versions: 7

Compression:

Stored size: 841 Bytes

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

# Device Context to paint on a window outside an on_paint handler. It is
# recommended that PaintDC is used in preference to this class.

class Wx::ClientDC
  # This class should not be instantiated directly in wxRuby; it should
  # always be used via Window#paint, which takes a block receiving the
  # DC. This ensures that the DC is cleaned up at the correct time,
  # avoiding errors and segfaults on exit.
  define_method(:initialize) do | *args |
    Kernel.raise RuntimeError,
                 "Do not instantiate ClientDC directly; use Window#paint",
                 caller[1..-1]
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wxruby3-0.9.7-x64-mingw-ucrt lib/wx/core/clientdc.rb
wxruby3-0.9.5-x64-mingw-ucrt lib/wx/core/clientdc.rb
wxruby3-0.9.4-x64-mingw-ucrt lib/wx/core/clientdc.rb
wxruby3-0.9.3-x64-mingw-ucrt lib/wx/core/clientdc.rb
wxruby3-0.9.2-x64-mingw-ucrt lib/wx/core/clientdc.rb
wxruby3-0.9.1-x64-mingw-ucrt lib/wx/core/clientdc.rb
wxruby3-0.9.0-x64-mingw-ucrt lib/wx/core/clientdc.rb