Sha256: 223ba5ac8d13637bbe7951c1d92e979da18dd6b4efafcff2903f0c2ab0ee8c96

Contents?: true

Size: 1.94 KB

Versions: 3

Compression:

Stored size: 1.94 KB

Contents

# :stopdoc:
# This file is automatically generated by the WXRuby3 documentation 
# generator. Do not alter this file.
# :startdoc:


module Wx

  # {Wx::ClientDC} is primarily useful for obtaining information about the window from outside EVT_PAINT() handler.
  # Typical use of this class is to obtain the extent of some text string in order to allocate enough size for a window, e.g. 
  # ```ruby
  #    # Create the initially empty label with the size big enough to show
  #    # the given string.
  #    text = Wx::ClientDC.draw_on(self) do |dc|
  #              Wx::StaticText.new(
  #                      self, Wx::ID_ANY, "",
  #                      Wx::Point.new,
  #                      dc.get_text_extent("String of max length"),
  #                      Wx::ST_NO_AUTORESIZE)
  #           end
  # ```
  # 
  # While {Wx::ClientDC} may also be used for drawing on the client area of a window from outside an EVT_PAINT() handler in some ports, this does not work on all platforms (neither wxOSX nor wxGTK with GTK 3 Wayland backend support this, so drawing using {Wx::ClientDC} simply doesn't have any effect there) and the only portable way of drawing is via {Wx::PaintDC}. To redraw a small part of the window, use {Wx::Window#refresh_rect} to invalidate just this part and check {Wx::Window#get_update_region} in the paint event handler to redraw this part only.
  # 
  # {Wx::ClientDC} objects should normally be constructed as temporary stack objects, i.e. don't store a {Wx::ClientDC} object.
  # A {Wx::ClientDC} object is initialized to use the same font and colours as the window it is associated with.
  # === 
  # 
  # Category:  Device Contexts
  # @see Wx::DC
  # @see  Wx::MemoryDC
  # @see  Wx::PaintDC
  # @see  Wx::WindowDC
  # @see  Wx::ScreenDC 
  # 
  # 
  # 
  # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
  class ClientDC < WindowDC
  
  end # ClientDC
  

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wxruby3-0.9.1-x64-mingw-ucrt lib/wx/doc/gen/client_dc.rb
wxruby3-0.9.0-x64-mingw-ucrt lib/wx/doc/gen/client_dc.rb
wxruby3-0.9.0.pre.rc.3-x64-mingw-ucrt lib/wx/doc/gen/client_dc.rb