Sha256: f2cd3374257b4cde3891613e470fbf16207f8710e1125e7a9a8efceb8e0a5b11

Contents?: true

Size: 1.3 KB

Versions: 15

Compression:

Stored size: 1.3 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
//            Portions ©2008-2011 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

sc_require('system/drag') ;

/**
  @namespace

  This mixin can be used to implement a dynamic data source for a drag 
  operation.  You can return a set of allowed data types and then the 
  method will be used to actually get data in that format when requested.
*/
SC.DragDataSource = {

  /**
    Implement this property as an array of data types you want to support
    for drag operations.

    @type Array
    @default []
  */
  dragDataTypes: [],

  /**
    Implement this method to return the data in the format passed.  Return
    null if the requested data type cannot be generated.
    
    @param {SC.Drag} drag The Drag instance managing this drag.
    @param {Object} dataType The proposed dataType to return.  This will 
      always be one of the data types declared in dragDataTypes.
    
    @returns The data object for the specified type
  */
  dragDataForType: function(drag, dataType) {
    return null;
  }

};

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sproutcore-1.6.0.rc.2-x86-mingw32 lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js
sproutcore-1.6.0.rc.2 lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js
sproutcore-1.6.0.rc.2-java lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js
sproutcore-1.6.0.rc.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js
sproutcore-1.6.0.rc.1 lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js
sproutcore-1.6.0.rc.1-java lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js
sproutcore-1.6.0.beta.3-x86-mingw32 lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js
sproutcore-1.6.0.beta.3-java lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js
sproutcore-1.6.0.beta.3 lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js
sproutcore-1.6.0.beta.2-x86-mingw32 lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js
sproutcore-1.6.0.beta.2-java lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js
sproutcore-1.6.0.beta.2 lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js
sproutcore-1.6.0.beta.1 lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js
sproutcore-1.5.0-java lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js
sproutcore-1.5.0 lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js