Sha256: 3caaee71a6fd5dbd9a431a75183129a242dfde2f11ce3ca566ae2b6ba068ab76

Contents?: true

Size: 1.2 KB

Versions: 7

Compression:

Stored size: 1.2 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

# Make this easier to use for multi-typed data objects. Comparison
# doesn't work correctly in the SWIG binding

class Wx::DataFormat
  def ==(other)
    if self.get_type > Wx::DataFormatId::DF_INVALID
      self.get_type == other.get_type
    else
      self.id == other.id
    end
  end
end

# Provide pre-cooked data formats for the standard types
module Wx
  DF_TEXT        = DataFormat.new( Wx::DataFormatId::DF_TEXT )
  DF_BITMAP      = DataFormat.new( Wx::DataFormatId::DF_BITMAP )
  if Wx::PLATFORM != 'WXGTK'
    DF_METAFILE    = DataFormat.new( Wx::DataFormatId::DF_METAFILE )
  end
  if Wx::PLATFORM == 'WXMSW'
    DF_DIB         = DataFormat.new( Wx::DataFormatId::DF_DIB )
  end
  DF_FILENAME    = DataFormat.new( Wx::DataFormatId::DF_FILENAME )
  DF_UNICODETEXT = DataFormat.new( Wx::DataFormatId::DF_UNICODETEXT )
  if Wx.has_feature?(:USE_HTML) && Wx::WXWIDGETS_VERSION >= '3.3'
    DF_HTML        = DataFormat.new( Wx::DataFormatId::DF_HTML )
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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