C# Class Ext.Net.DragDrop

Mostra file Open project: pgodwin/Ext.net

Private Properties

Property Type Description
ToScript string

Public Methods

Method Description
AddInvalidHandleClass ( string cssClass ) : void

Lets you specify a css class of elements that will not initiate a drag

AddInvalidHandleId ( string id ) : void

Lets you to specify an element id for a child of a drag handle that should not initiate a drag

AddInvalidHandleType ( string tagName ) : void

Allows you to specify a tag name that should not start a drag operation when clicked. This is designed to facilitate embedding links within a drag handle that do something other than start the drag.

AddToGroup ( string sGroup ) : void

Add this instance to a group of related drag/drop objects. All instances belong to at least one group, and can belong to as many groups as needed.

ApplyConfig ( ) : void

Applies the configuration parameters that were passed into the constructor. This is supposed to happen at each level through the inheritance chain. So a DDProxy implentation will execute apply config on DDProxy, DD, and DragDrop in order to get all of the parameters that are available in each object.

ClearConstraints ( ) : void

Clears any constraints applied to this instance. Also clears ticks since they can't exist independent of a constraint at this time.

ClearTicks ( ) : void

Clears any tick interval defined for this instance

ConstrainTo ( string constrainTo ) : void

Initializes the drag drop object's constraints to restrict movement to a certain element.

ConstrainTo ( string constrainTo, Paddings pad, bool inContent ) : void

Initializes the drag drop object's constraints to restrict movement to a certain element.

Destroy ( ) : void

Lock ( ) : void

Lock this instance

RemoveFromGroup ( string sGroup ) : void

Remove's this instance from the supplied interaction group

RemoveInvalidHandleClass ( string cssClass ) : void

Unsets an invalid css class

RemoveInvalidHandleId ( string id ) : void

Unsets an invalid handle id

RemoveInvalidHandleType ( string tagName ) : void

Unsets an excluded tag name set by addInvalidHandleType

ResetConstraints ( bool maintainOffset ) : void

resetConstraints must be called if you manually reposition a dd element.

SetDragElId ( string id ) : void

Allows you to specify that an element other than the linked element will be moved with the cursor during a drag

SetHandleElId ( string id ) : void

Allows you to specify a child of the linked element that should be used to initiate the drag operation. An example of this would be if you have a content div with text and links. Clicking anywhere in the content area would normally start the drag operation. Use this method to specify that an element inside of the content div is the element that starts the drag operation.

SetInitPosition ( int diffX, int diffY ) : void

Stores the initial placement of the linked element.

SetOuterHandleElId ( string id ) : void

Allows you to set an element outside of the linked element as a drag handle

SetPadding ( int iTop, int iRight, int iBot, int iLeft ) : void

Configures the padding for the target zone in px. Effectively expands (or reduces) the virtual object size for targeting calculations. Supports css-style shorthand; if only one parameter is passed, all sides will have that padding, and if only two are passed, the top and bottom will have the first param, the left and right the second.

SetXConstraint ( int iLeft, int iRight, int iTickSize ) : void

By default, the element can be dragged any place on the screen. Use this method to limit the horizontal travel of the element. Pass in 0,0 for the parameters if you want to lock the drag to the y axis.

SetYConstraint ( int iUp, int iDown, int iTickSize ) : void

By default, the element can be dragged any place on the screen. Set this to limit the vertical travel of the element. Pass in 0,0 for the parameters if you want to lock the drag to the x axis.

Unlock ( ) : void

Unlock this instace

Unreg ( ) : void

Remove all drag and drop hooks for this element

Private Methods

Method Description
ToScript ( Control owner ) : string

Method Details

AddInvalidHandleClass() public method

Lets you specify a css class of elements that will not initiate a drag
public AddInvalidHandleClass ( string cssClass ) : void
cssClass string the class of the elements you wish to ignore
return void

AddInvalidHandleId() public method

Lets you to specify an element id for a child of a drag handle that should not initiate a drag
public AddInvalidHandleId ( string id ) : void
id string the element id of the element you wish to ignore
return void

AddInvalidHandleType() public method

Allows you to specify a tag name that should not start a drag operation when clicked. This is designed to facilitate embedding links within a drag handle that do something other than start the drag.
public AddInvalidHandleType ( string tagName ) : void
tagName string the type of element to exclude
return void

AddToGroup() public method

Add this instance to a group of related drag/drop objects. All instances belong to at least one group, and can belong to as many groups as needed.
public AddToGroup ( string sGroup ) : void
sGroup string the name of the group
return void

ApplyConfig() public method

Applies the configuration parameters that were passed into the constructor. This is supposed to happen at each level through the inheritance chain. So a DDProxy implentation will execute apply config on DDProxy, DD, and DragDrop in order to get all of the parameters that are available in each object.
public ApplyConfig ( ) : void
return void

ClearConstraints() public method

Clears any constraints applied to this instance. Also clears ticks since they can't exist independent of a constraint at this time.
public ClearConstraints ( ) : void
return void

ClearTicks() public method

Clears any tick interval defined for this instance
public ClearTicks ( ) : void
return void

ConstrainTo() public method

Initializes the drag drop object's constraints to restrict movement to a certain element.
public ConstrainTo ( string constrainTo ) : void
constrainTo string The element to constrain to.
return void

ConstrainTo() public method

Initializes the drag drop object's constraints to restrict movement to a certain element.
public ConstrainTo ( string constrainTo, Paddings pad, bool inContent ) : void
constrainTo string The element to constrain to.
pad Paddings Pad provides a way to specify "padding" of the constraints
inContent bool Constrain the draggable in the content box of the element (inside padding and borders)
return void

Destroy() public method

public Destroy ( ) : void
return void

Lock() public method

Lock this instance
public Lock ( ) : void
return void

RemoveFromGroup() public method

Remove's this instance from the supplied interaction group
public RemoveFromGroup ( string sGroup ) : void
sGroup string The group to drop
return void

RemoveInvalidHandleClass() public method

Unsets an invalid css class
public RemoveInvalidHandleClass ( string cssClass ) : void
cssClass string the class of the element(s) you wish to re-enable
return void

RemoveInvalidHandleId() public method

Unsets an invalid handle id
public RemoveInvalidHandleId ( string id ) : void
id string the id of the element to re-enable
return void

RemoveInvalidHandleType() public method

Unsets an excluded tag name set by addInvalidHandleType
public RemoveInvalidHandleType ( string tagName ) : void
tagName string the type of element to unexclude
return void

ResetConstraints() public method

resetConstraints must be called if you manually reposition a dd element.
public ResetConstraints ( bool maintainOffset ) : void
maintainOffset bool
return void

SetDragElId() public method

Allows you to specify that an element other than the linked element will be moved with the cursor during a drag
public SetDragElId ( string id ) : void
id string the id of the element that will be used to initiate the drag
return void

SetHandleElId() public method

Allows you to specify a child of the linked element that should be used to initiate the drag operation. An example of this would be if you have a content div with text and links. Clicking anywhere in the content area would normally start the drag operation. Use this method to specify that an element inside of the content div is the element that starts the drag operation.
public SetHandleElId ( string id ) : void
id string the id of the element that will be used to initiate the drag.
return void

SetInitPosition() public method

Stores the initial placement of the linked element.
public SetInitPosition ( int diffX, int diffY ) : void
diffX int the X offset, default 0
diffY int the Y offset, default 0
return void

SetOuterHandleElId() public method

Allows you to set an element outside of the linked element as a drag handle
public SetOuterHandleElId ( string id ) : void
id string id of the element that will be used to initiate the drag
return void

SetPadding() public method

Configures the padding for the target zone in px. Effectively expands (or reduces) the virtual object size for targeting calculations. Supports css-style shorthand; if only one parameter is passed, all sides will have that padding, and if only two are passed, the top and bottom will have the first param, the left and right the second.
public SetPadding ( int iTop, int iRight, int iBot, int iLeft ) : void
iTop int Top pad
iRight int Right pad
iBot int Bot pad
iLeft int Left pad
return void

SetXConstraint() public method

By default, the element can be dragged any place on the screen. Use this method to limit the horizontal travel of the element. Pass in 0,0 for the parameters if you want to lock the drag to the y axis.
public SetXConstraint ( int iLeft, int iRight, int iTickSize ) : void
iLeft int the number of pixels the element can move to the left
iRight int the number of pixels the element can move to the right
iTickSize int optional parameter for specifying that the element should move iTickSize pixels at a time.
return void

SetYConstraint() public method

By default, the element can be dragged any place on the screen. Set this to limit the vertical travel of the element. Pass in 0,0 for the parameters if you want to lock the drag to the x axis.
public SetYConstraint ( int iUp, int iDown, int iTickSize ) : void
iUp int the number of pixels the element can move up
iDown int the number of pixels the element can move down
iTickSize int optional parameter for specifying that the element should move iTickSize pixels at a time.
return void

Unlock() public method

Unlock this instace
public Unlock ( ) : void
return void

Unreg() public method

Remove all drag and drop hooks for this element
public Unreg ( ) : void
return void