Sha256: 348713e93c2c591822a1e947ef2bcd9ed8576a8c605b14a374ac5cb97b0f7a43

Contents?: true

Size: 1.65 KB

Versions: 19

Compression:

Stored size: 1.65 KB

Contents

---
:wxDataObjectComposite:
  :detail:
    :pre:
      :programlisting:
        - :pattern: !ruby/regexp /.*/
          :replace: |
            
            ```ruby
              class MyDropTarget < Wx::DropTarget
            
                def initialize
                  dataobj = Wx::DataObjectComposite.new
                  dataobj.add(Wx::BitmapDataObject.new, true)
                  dataobj.add(Wx::FileDataObject.new)
                  set_data_object(dataobj)
                end
              
                def on_data(x, y, defaultDragResult)
                  return Wx::DragNone unless get_data
              
                  dataobj_comp = get_data_object
              
                  format = dataobj_comp.get_received_format
                  dataobj = dataobj_comp.get_object(format)
                  case format.get_type
                  when Wx::DataFormatId::DF_BITMAP
                    # dataobj is Wx::BitmapDataObject
      
                    ... use dataobj.get_bitmap ...
            
                  when Wx::DataFormatId::DF_FILENAME
                    # dataobj is Wx::FileDataObject
      
                     ... use dataobj->GetFilenames() ...
            
                  else
                    Wx.log_error("unexpected data object format")
                  end
              
                  defaultDragResult
                end
            
              end
            ```
:wxURLDataObject:
  :detail:
    :pre:
      :programlisting:
        - :pattern: !ruby/regexp /.*/
          :replace: |
            
            ```ruby
              Wx::Clipboard.open { |clip| clip.place(Wx::URLDataObject.new(url))
            ```

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
wxruby3-1.3.1 rakelib/lib/generate/doc/data_object.yaml
wxruby3-1.3.0 rakelib/lib/generate/doc/data_object.yaml
wxruby3-1.2.1 rakelib/lib/generate/doc/data_object.yaml
wxruby3-1.2.0 rakelib/lib/generate/doc/data_object.yaml
wxruby3-1.1.2 rakelib/lib/generate/doc/data_object.yaml
wxruby3-1.1.1 rakelib/lib/generate/doc/data_object.yaml
wxruby3-1.1.0 rakelib/lib/generate/doc/data_object.yaml
wxruby3-1.0.1 rakelib/lib/generate/doc/data_object.yaml
wxruby3-0.9.8 rakelib/lib/generate/doc/data_object.yaml
wxruby3-0.9.7 rakelib/lib/generate/doc/data_object.yaml
wxruby3-0.9.5 rakelib/lib/generate/doc/data_object.yaml
wxruby3-0.9.4 rakelib/lib/generate/doc/data_object.yaml
wxruby3-0.9.3 rakelib/lib/generate/doc/data_object.yaml
wxruby3-0.9.2 rakelib/lib/generate/doc/data_object.yaml
wxruby3-0.9.1 rakelib/lib/generate/doc/data_object.yaml
wxruby3-0.9.0 rakelib/lib/generate/doc/data_object.yaml
wxruby3-0.9.0.pre.rc.3 rakelib/lib/generate/doc/data_object.yaml
wxruby3-0.9.0.pre.rc.2 rakelib/lib/generate/doc/data_object.yaml
wxruby3-0.9.0.pre.rc.1 rakelib/lib/generate/doc/data_object.yaml