C# Class Ext.Net.DragDrop

Afficher le fichier Open project: pgodwin/Ext.net

Private Properties

Свойство Type Description
ToScript string

Méthodes publiques

Méthode 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

Méthode Description
ToScript ( Control owner ) : string

Method Details

AddInvalidHandleClass() public méthode

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
Résultat void

AddInvalidHandleId() public méthode

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
Résultat void

AddInvalidHandleType() public méthode

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
Résultat void

AddToGroup() public méthode

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
Résultat void

ApplyConfig() public méthode

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
Résultat void

ClearConstraints() public méthode

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
Résultat void

ClearTicks() public méthode

Clears any tick interval defined for this instance
public ClearTicks ( ) : void
Résultat void

ConstrainTo() public méthode

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.
Résultat void

ConstrainTo() public méthode

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)
Résultat void

Destroy() public méthode

public Destroy ( ) : void
Résultat void

Lock() public méthode

Lock this instance
public Lock ( ) : void
Résultat void

RemoveFromGroup() public méthode

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

RemoveInvalidHandleClass() public méthode

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

RemoveInvalidHandleId() public méthode

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

RemoveInvalidHandleType() public méthode

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

ResetConstraints() public méthode

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

SetDragElId() public méthode

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
Résultat void

SetHandleElId() public méthode

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.
Résultat void

SetInitPosition() public méthode

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
Résultat void

SetOuterHandleElId() public méthode

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
Résultat void

SetPadding() public méthode

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
Résultat void

SetXConstraint() public méthode

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.
Résultat void

SetYConstraint() public méthode

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.
Résultat void

Unlock() public méthode

Unlock this instace
public Unlock ( ) : void
Résultat void

Unreg() public méthode

Remove all drag and drop hooks for this element
public Unreg ( ) : void
Résultat void