Rhino C++ API
8.14
|
#include <RhinoSdkDropTargetManager.h>
Public Member Functions | |
CRhinoDropTarget () | |
virtual | ~CRhinoDropTarget () |
bool | AllowDropOnObject () const |
bool | AllowDropOnRhinoLayerListControl () const |
bool | AllowDropOnRhinoView () const |
bool | AllowDropOnSubObject () const |
bool | AllowDropWhileInRhinoCommand () const |
bool | AllowOnDropEx () const |
bool | CtrlKeyDownWhenDragStarted () const |
virtual bool | CustomGeometryFilter (const CRhinoObject *object, const ON_Geometry *geometry, ON_COMPONENT_INDEX component_index) const |
DROPEFFECT | DefaultOnEventReturnCode () const |
void | DeselectAllObjects () const |
bool | DeselectAllOnDrag () const |
bool | DragStartedWhileInCommand () const |
bool | EnableAllowDropOnObject (bool b=true) |
bool | EnableAllowDropOnRhinoLayerListControl (bool b=true) |
bool | EnableAllowDropOnRhinoView (bool b=true) |
bool | EnableAllowDropOnSubObject (bool b=true) |
bool | EnableAllowDropWhileInRhinoCommand (bool b=true) |
bool | EnableAllowOnDropEx (bool b=true) |
bool | EnableDeselectAllOnDrag (bool b=true) |
bool | EnableGroupSelect (bool b=true) |
bool | EnableReferenceObjectSelect (bool b=true) |
void | EnableRhinoDropTarget (bool bEnable) |
unsigned int | GeometryAttributeFilter () const |
unsigned int | GeometryFilter () const |
bool | GroupSelect () const |
bool | IsRhinoDropTargetEnabled () const |
virtual DROPEFFECT | OnDragEnter (CWnd *pWnd, COleDataObject *pDataObject, DWORD dwKeyState, const ON_2iPoint &point) |
virtual void | OnDragLeave (CWnd *pWnd) |
virtual DROPEFFECT | OnDragOver (CWnd *pWnd, COleDataObject *pDataObject, DWORD dwKeyState, const ON_2iPoint &point) |
virtual BOOL32 | OnDrop (CWnd *pWnd, COleDataObject *pDataObject, DROPEFFECT dropEffect, const ON_2iPoint &point) |
virtual void | OnDropDone (CWnd *pWnd, COleDataObject *pDataObject, DROPEFFECT dropEffect, const ON_2iPoint &point) |
virtual DROPEFFECT | OnDropEx (CWnd *pWnd, COleDataObject *pDataObject, DROPEFFECT dropDefault, DROPEFFECT dropList, const ON_2iPoint &point) |
bool | OnDropExWasCalled () const |
virtual bool | OnDropOnLayerListCtrl (HWND pLayerListCtrl, int nLayerIndex, COleDataObject *pDataObject, DROPEFFECT dropEffect, const ON_2iPoint &point) |
virtual bool | OnDropOnObject (CRhinoObjRef obj_ref, CRhinoView *pRhinoView, COleDataObject *pDataObject, DROPEFFECT dropEffect, const ON_2iPoint &point) |
virtual bool | OnDropOnRhinoView (CRhinoView *pRhinoView, COleDataObject *pDataObject, DROPEFFECT dropEffect, const ON_2iPoint &point) |
bool | OnDropWasCalled () const |
bool | OverObject () const |
bool | PassesGeometryAttributeFilter (const CRhinoObject *object, const ON_Geometry *geometry, ON_COMPONENT_INDEX component_index) const |
bool | ReferenceObjectSelect () const |
virtual void | ResetDropFlags () |
CRhinoObjRef | RhinoObject () const |
CRhinoView * | RhinoView () const |
CRhinoView * | RhinoViewFromDragPoint (CWnd *pWnd, const ON_2iPoint &point, ON_2iPoint *ptView) const |
bool | RightMouseDrag () const |
DROPEFFECT | SetDefaultOnEventReturnCode (DROPEFFECT rc=DROPEFFECT_COPY) |
void | SetGeometryAttributeFilter (unsigned int geometry_attribute_filter) |
void | SetGeometryFilter (unsigned int geometry_type_filter) |
bool | ShiftKeyDownWhenDragStarted () const |
virtual bool | SupportDataObject (COleDataObject *pDataObject)=0 |
Protected Attributes | |
bool | m_bEnabled |
ON_2iPoint | m_drag_image_hot_spot |
int | m_drag_image_index |
class CImageList * | m_drag_image_list |
bool | m_end_drag_image |
class CRhinoDropTarget__helper * | m_helper |
class CRhDropTargetManager * | m_pRhDropTargetManager |
Friends | |
class | CRhDropTargetManager |
Copyright (c) 1993-2017 Robert McNeel & Associates. All rights reserved. Rhinoceros is a registered trademark of Robert McNeel & Associates.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
For complete Rhino SDK copyright information see http://www.rhino3d.com/developer.
CRhinoDropTarget::CRhinoDropTarget | ( | ) |
|
virtual |
bool CRhinoDropTarget::AllowDropOnObject | ( | ) | const |
Description: Allow drag over to select objects. If this is enabled and something is dropped on a valid Rhino object then the object is selected and CRhinoDropTarget::OnDropOnObject is called. Returns: true then objects will be selected when dragged over. See Also: CRhinoDropTarget::EnableAllowDropOnObject CRhinoDropTarget::SetGeometryFilter CRhinoDropTarget::SetGeometryAttributeFilter
bool CRhinoDropTarget::AllowDropOnRhinoLayerListControl | ( | ) | const |
Description: Allow drop action to happen on the layer list control. If this is set to true and the drop event is terminated over the layer list control then CRhinoDropTarget::OnDropOnLayerListCtrl will be called. Returns: true to allow dropping on layer list control. See Also: CRhinoDropTarget::OnDropOnLayerListCtrl CRhinoDropTarget::EnableAllowDropOnRhinoLayerListControl
bool CRhinoDropTarget::AllowDropOnRhinoView | ( | ) | const |
Description: Allow drop action to happen on a valid CRhinoView without landing on an object. Returns: true means the drop event can terminate on a CRhinoView See Also: CRhinoDropTarget::EnableAllowDropOnRhinoView
bool CRhinoDropTarget::AllowDropOnSubObject | ( | ) | const |
Description: By default, CRhinoDropTarget::OnDragOver will permit a user to select only top level objects. To select sub-objects (like a curve in a b-rep or a curve in a group) call EnableSubObjectSelect( true). Returns: true if selection of sub-objects is permitted. See Also: CRhinoDropTarget::EnableDropOnObject CRhinoDropTarget::DropOnObject CRhinoDropTarget::EnableSubObjectSelect
bool CRhinoDropTarget::AllowDropWhileInRhinoCommand | ( | ) | const |
Description: Call this method to find out if droppging while a Rhino command is running is allowed. Returns: Returns true if dropping on objects is allowed while a command is running otherwise false. See Also: CRhinoDropTarget::EnableAllowDropWhileInRhinoCommand
bool CRhinoDropTarget::AllowOnDropEx | ( | ) | const |
Description: Call this method to find out if CRhinoDropTarget::OnDropEx() should get called. Returns: Returns true if CRhinoDropTarget::OnDropEx() shold be called otherwise returns false See Also: CRhinoDropTarget::EnableAllowOnDropEx()
bool CRhinoDropTarget::CtrlKeyDownWhenDragStarted | ( | ) | const |
Description: Call this method to find out if the control key was pressed when the drag event started. Returns: Returns true if the control key was pressed when the drag event started.
|
virtual |
Description: Checks geometry to see if it passes the basic GeometryAttributeFilter. This is only valid if EnableDropOnObject() is set to true. Parameters: object - [in] parent object being considered. geometry - [in] geometry being considered. component_index - [in] if >= 0, geometry is a proper sub-part of object->Geometry() with component_index. Remarks: The default simply checks that the geometry passes the filter returned by GeometryAttributeFilter(). See Also: CRhinoDropTarget::EnableDropOnObject CRhinoDropTarget::DropOnObject CRhinoDropTarget::EnablePostSelect CRhinoDropTarget::PassesGeometryTypeFilter
DROPEFFECT CRhinoDropTarget::DefaultOnEventReturnCode | ( | ) | const |
Description: Default value returned by CRhinoDropTarget::OnDrop... methods. Returns: Default value returned by CRhinoDropTarget::OnDrop... methods. See Also: CRhinoDropTarget::DefaultOnEventReturnCode
void CRhinoDropTarget::DeselectAllObjects | ( | ) | const |
Description: Call this method to unselect any currently selected objects.
bool CRhinoDropTarget::DeselectAllOnDrag | ( | ) | const |
Description: Controls the deselection of preselected input when drag event starts. Returns: True if pre-selected input will be deselected when drop event starts. Remarks: The default is false. See Also: CRhinoDropTarget::EnableDeselectAllOnDrag
bool CRhinoDropTarget::DragStartedWhileInCommand | ( | ) | const |
Description: Call this method to find out if a command was running when the drag event started. Returns: Returns true if a command was running when the drag event started.
bool CRhinoDropTarget::EnableAllowDropOnObject | ( | bool | b = true | ) |
Description: Allow drag over to select objects. If this is enabled and something is dropped on a valid Rhino object then the object is selected and CRhinoDropTarget::OnDropOnObject is called. Parameters: b - [in] If true then objects will be selected when dragged over. Returns: Previous value. See Also: CRhinoDropTarget::AllowDropOnObject CRhinoDropTarget::SetGeometryFilter CRhinoDropTarget::SetGeometryAttributeFilter
bool CRhinoDropTarget::EnableAllowDropOnRhinoLayerListControl | ( | bool | b = true | ) |
Description: Allow drop action to happen on the layer list control. If this is set to true and the drop event is terminated over the layer list control then CRhinoDropTarget::OnDropOnLayerListCtrl will be called. Parameters: b - [in] true to enable. false to disable. Returns: Previous state. See Also: CRhinoDropTarget::OnDropOnLayerListCtrl CRhinoDropTarget::AllowDropOnRhinoLayerListControl
bool CRhinoDropTarget::EnableAllowDropOnRhinoView | ( | bool | b = true | ) |
Description: Allow drop action to happen on a valid CRhinoView without landing on an object. Parameters: b - [in] true to enable. false to disable. Returns: Previous state. See Also: CRhinoDropTarget::AllowDropOnRhinoView
bool CRhinoDropTarget::EnableAllowDropOnSubObject | ( | bool | b = true | ) |
Description: By default, CRhinoDropTarget::OnDragOver will permit a user to select only top level objects. To select sub-objects (like a curve in a b-rep or a curve in a group) call EnableSubObjectSelect( true). Parameters: b - [in] true to enable sub-object selection false to disable sub-object selection. See Also: CRhinoDropTarget::EnableDropOnObject CRhinoDropTarget::DropOnObject CRhinoDropTarget::SubObjectSelect
bool CRhinoDropTarget::EnableAllowDropWhileInRhinoCommand | ( | bool | b = true | ) |
Description: Call this method to enable or disable dropping while a command is running. The default behavior is to not allow dropping while a command is running. Parameters: b [in] If true then droppgin will be allowed while commands are running otherwise it will not. Returns: Returns previous value for this setting. See Also: CRhinoDropTarget::AllowDropWhileInRhinoCommand
bool CRhinoDropTarget::EnableAllowOnDropEx | ( | bool | b = true | ) |
Description: Call this method to enable/disable calling of CRhinoDropTarget::OnDropEx() Parameters: b [in] If true then OnDropEx() will be called otherwise it will not Returns: Returns previous state See Also: CRhinoDropTarget::AllowOnDropEx()
bool CRhinoDropTarget::EnableDeselectAllOnDrag | ( | bool | b = true | ) |
Description: Controls the deselection of preselected input when drag event starts. Parameters: b - [in] If true then any objects currently selected will be deselected at beginig of drop event. See Also: CRhinoDropTarget::DeselectAllOnDrag
bool CRhinoDropTarget::EnableGroupSelect | ( | bool | b = true | ) |
Description: By default, groups are ignored in OnDragOver. If you want the drag event to select every object in a group then enable group selection. Parameters: b - [in] true to enable selecting all objects in a group with a single drop event false to only select the object dropped on ignoring the other objects in the group it belongs to. Returns: Returns previous value. See Also: CRhinoDropTarget::GroupSelect CRhinoDropTarget::DropOnObject CRhinoDropTarget::GroupSelect
bool CRhinoDropTarget::EnableReferenceObjectSelect | ( | bool | b = true | ) |
Description: By default, reference objects can not be selected. If you do not want to be able to select reference objects, then call EnableReferenceObjectSelect( true). Parameters: b - [in] true to enable selection of referenced objects false reference objects will not be selected Returns: Returns previous value. See Also: CRhinoDropTarget::EnableDropOnObject CRhinoDropTarget::DropOnObject CRhinoDropTarget::ReferenceObjectSelect
void CRhinoDropTarget::EnableRhinoDropTarget | ( | bool | bEnable | ) |
Description: Call this method to enable or disable the drop target. If the drop target is disabled then it will not get called by the frame work during drop events. Parameters: bEnable [in] If true then the drop target will be notified of drop events otherwise it will not. See Also: CRhinoDropTarget::IsRhinoDropTargetEnabled
unsigned int CRhinoDropTarget::GeometryAttributeFilter | ( | ) | const |
Description: The geometry attribute filter provides a secondary filter can be used to restrict which objects can be selected.
Control of the type of geometry (points, curves, surfaces, meshes, etc.) is provided by CRhinoDropTarget::SetGeometryFilter. The geometry attribute filter is used to require the selected geometry to have certain attributes (open, closed, etc.). The default attribute filter permits selection of all types of geometry. This is only valid if EnableDropOnObject() is set to true.
Returns: An unsigned int "object_attribute_filter". If the bit from an CRhinoGetObject::GEOMETRY_ATTRIBUTE_FILTER enum value is set in the geometry_attribute_filter, then OnDragOver() will permit selection of object's that have that geometric attribute. If geometry_attribute_filter is 0xFFFFFFFF, then OnDragOver() can select all types of geometry.
Example: If (GeometryAttributeFilter() | closed_curve) != 0, then any curve selected by OnDragOver() will be closed.
See Also: CRhinoDropTarget::EnableDropOnObject CRhinoDropTarget::DropOnObject CRhinoDropTarget::SetGeometryAttributeFilter. CRhinoDropTarget::SetGeometryFilter. CRhinoDropTarget::GeometryFilter.
unsigned int CRhinoDropTarget::GeometryFilter | ( | ) | const |
Description: The geometry type filter controls which types of geometry (points, curves, surfaces, meshes, etc.) can be selected.
The default geometry type filter permits selection of all types of geometry. This is only valid if EnableDropOnObject() is set to true.
Returns: An unsigned int "object_filter". If the bit from an CRhinoGetObject::GEOMETRY_TYPE_FILTER enum value is set in the geometry_filter, then OnDragOver() will permit selection of object's that have that type of geometry. If geometry_filter is 0xFFFFFFFF, then OnDragOver() can select all types of geometry.
Example: If (GeometryFilter() | curve_object) != 0, then GetObjects() will permit curves to be selected.
See Also: CRhinoGetObject::GEOMETRY_TYPE_FILTER CRhinoGetObject::GeometryFilter() CRhinoDropTarget::EnableDropOnObject CRhinoDropTarget::DropOnObject CRhinoDropTarget::SetGeometryFilter CRhinoDropTarget::SetGeometryAttributeFilter CRhinoDropTarget::GeometryAttributeFilter
bool CRhinoDropTarget::GroupSelect | ( | ) | const |
Description: By default, groups are ignored in OnDragOver. If you want the drag event to select every object in a group then enable group selection. Returns: true, When dropping on an object in a group the entire group will be selected. true, When dropping on an object in a group only the object dropped on gets selected. See Also: CRhinoDropTarget::EnableDropOnObject CRhinoDropTarget::DropOnObject CRhinoDropTarget::GroupSelect
bool CRhinoDropTarget::IsRhinoDropTargetEnabled | ( | ) | const |
Description: Call this method to find out if this drop target is enabled or not. Returns: Returns true if the drop target will be notified of drop events otherwise it returns false. See Also: CRhinoDropTarget::EnableRhinoDropTarget
|
virtual |
Optional, sometimes overridden
See MFC help for class COleDropTarget for description of these methods Description: Called by the framework when the cursor is first dragged into the window Parameters: pWnd [in] Points to the window the cursor is entering. pDataObject [in] Points to the data object containing the data that can be dropped. dwKeyState [in] Contains the state of the modifier keys. This is a combination of any number of the following: MK_CONTROL, MK_SHIFT, MK_ALT, MK_LBUTTON, MK_MBUTTON, and MK_RBUTTON. point [in] Contains the current location of the cursor in client coordinates. Returns: The effect that would result if a drop were attempted at the location specified by point. It can be one or more of the following: DROPEFFECT_NONE A drop would not be allowed. DROPEFFECT_COPY A copy operation would be performed. DROPEFFECT_MOVE A move operation would be performed. DROPEFFECT_LINK A link from the dropped data to the original data would be established. DROPEFFECT_SCROLL A drag scroll operation is about to occur or is occurring in the target. See Also: See MFC help for class COleDropTarget for description
|
virtual |
Description: Called by the framework when a drop operation is to occur. Parameters: pWnd [in] Points to the window the cursor is currently over. pDataObject [in] Points to the data object that contains the data to be dropped. dropDefault [in] The effect that the user chose for the default drop operation based on the current key state. It can be DROPEFFECT_NONE. Drop effects are discussed in the Comments section. dropList [in] A list of the drop effects that the drop source supports. Drop effect values can be combined using the bitwise OR (|) operation. Drop effects are discussed in the Comments section. point [in] Contains the location of the cursor, in pixels, relative to the screen. Returns: The drop effect that resulted from the drop attempt at the location specified by point. Drop effects are discussed in the Comments section. Comments: The framework first calls this function. If it does not handle the drop, the framework then calls OnDrop. Typically, you will override OnDropEx in the view class to support right mouse-button drag and drop. Typically, the view class OnDrop is used to handle the case of support for simple drag and drop.
The default implementation of COleDropTarget::OnDropEx calls CView::OnDropEx. By default, CView::OnDropEx simply returns a dummy value to indicate the OnDrop member function should be called.
Drop effects describe the action associated with a drop operation. See the following list of drop effects: DROPEFFECT_NONE A drop would not be allowed. DROPEFFECT_COPY A copy operation would be performed. DROPEFFECT_MOVE A move operation would be performed. DROPEFFECT_LINK A link from the dropped data to the original data would be established. DROPEFFECT_SCROLL Indicates that a drag scroll operation is about to occur or is occurring in the target.
For more information, see IDropTarget::Drop in the Platform SDK. See Also: See MFC help for class COleDropTarget for description
|
virtual |
Description: Called by the framework when the cursor is dragged over the window. Parameters: pWnd [in] Points to the window that the cursor is over. pDataObject [in] Points to the data object that contains the data to be dropped. dwKeyState [in] Contains the state of the modifier keys. This is a combination of any number of the following: MK_CONTROL, MK_SHIFT, MK_ALT, MK_LBUTTON, MK_MBUTTON, and MK_RBUTTON. point [in] Contains the current location of the cursor in client coordinates. Returns: The effect that would result if a drop were attempted at the location specified by point. It can be one or more of the following: DROPEFFECT_NONE A drop would not be allowed. DROPEFFECT_COPY A copy operation would be performed. DROPEFFECT_MOVE A move operation would be performed. DROPEFFECT_LINK A link from the dropped data to the original data would be established. DROPEFFECT_SCROLL Indicates that a drag scroll operation is about to occur or is occurring in the target. See Also: See MFC help for class COleDropTarget for description
|
virtual |
Description: Called by the framework when the cursor is dragged over the window. Parameters: pWnd [in] Points to the window that the cursor is over. pDataObject [in] Points to the data object that contains the data to be dropped. dwKeyState [in] Contains the state of the modifier keys. This is a combination of any number of the following: MK_CONTROL, MK_SHIFT, MK_ALT, MK_LBUTTON, MK_MBUTTON, and MK_RBUTTON. point [in] Contains the current location of the cursor in client coordinates. Returns: The effect that would result if a drop were attempted at the location specified by point. It can be one or more of the following: DROPEFFECT_NONE A drop would not be allowed. DROPEFFECT_COPY A copy operation would be performed. DROPEFFECT_MOVE A move operation would be performed. DROPEFFECT_LINK A link from the dropped data to the original data would be established. DROPEFFECT_SCROLL A drag scroll operation is about to occur or is occurring in the target. See Also: See MFC help for class COleDropTarget for description
|
virtual |
Description: Called at the end of the drop event. Parameters: pWnd [in] Points to the window the cursor is entering. pDataObject [in] Points to the data object containing the data that can be dropped. dropEffect [in] The effect that the user chose for the drop operation. It can be one or more of the following: DROPEFFECT_COPY A copy operation would be performed. DROPEFFECT_MOVE A move operation would be performed. DROPEFFECT_LINK A link from the dropped data to the original data would be established. point [in] Contains the current location of the cursor in client coordinates.
|
virtual |
Description: Called by the framework when a drop operation is to occur. Parameters: pWnd [in] Points to the window the cursor is currently over. pDataObject [in] Points to the data object that contains the data to be dropped. dropEffect [in] The effect that the user chose for the drop operation. It can be one or more of the following: DROPEFFECT_COPY A copy operation would be performed. DROPEFFECT_MOVE A move operation would be performed. DROPEFFECT_LINK A link from the dropped data to the original data would be established. point [in] Contains the location of the cursor, in pixels, relative to the screen. Returns: Nonzero if the drop is successful; otherwise 0. See Also: See MFC help for class COleDropTarget for description
bool CRhinoDropTarget::OnDropExWasCalled | ( | ) | const |
Description: Call this method to find out if the user pressed the Escape key to cancel the drop event. Returns: Returns true if the drop event was canceled otherwise returns false See Also: CRhinoDropTarget::OnDropWasCalled()
|
virtual |
Description: Called by frame work when data object is dropped on the layer list control Parameters: pLayerListCtrl [in] The layer list control window the object was dropped on. nLayerIndex [in] The zero base layer table index the data object was dropped on or -1 if it was dropped on the control but not on a layer. pDataObject [in] Points to the data object that contains the data to be dropped. dropEffect [in] The desired drop affect, can be one or more of the following: DROPEFFECT_NONE A drop would not be allowed. DROPEFFECT_COPY A copy operation would be performed. DROPEFFECT_MOVE A move operation would be performed. DROPEFFECT_LINK A link from the dropped data to the original data would be established. DROPEFFECT_SCROLL A drag scroll operation is about to occur or is occurring in the target. point [in] Contains the current location of the cursor in client coordinates. Returns: Returns true if data object was successfully dropped. See Also: CRhinoDropTarget::OnDropOnObject CRhinoDropTarget::OnDropOnRhinoView CRhinoDropTarget::OnDrop
|
virtual |
Description: Called by frame work when data object is dropped on an object. Parameters: obj_ref [in] Object data was dropped on (note that component index(m_component_index) and group membership (Flags()&64) are supported from Rhino 6 onwards) pRhinoView [in] View the drop action occurred in pDataObject [in] Points to the data object that contains the data to be dropped. dropEffect [in] The desired drop affect, can be one or more of the following: DROPEFFECT_NONE A drop would not be allowed. DROPEFFECT_COPY A copy operation would be performed. DROPEFFECT_MOVE A move operation would be performed. DROPEFFECT_LINK A link from the dropped data to the original data would be established. DROPEFFECT_SCROLL A drag scroll operation is about to occur or is occurring in the target. point [in] Contains the current location of the cursor in client coordinates. Returns: Returns true if data object was successfully dropped on the specified object
See Also: CRhinoDropTarget::OnDropOnLayerListCtrl CRhinoDropTarget::OnDropOnRhinoView CRhinoDropTarget::OnDrop
|
virtual |
Description: Called by frame work when data object is dropped on a Rhino view and does not land on a selectable object. Parameters: pRhinoView [in] View the drop action occurred in pDataObject [in] Points to the data object that contains the data to be dropped. dropEffect [in] The desired drop affect, can be one or more of the following: DROPEFFECT_NONE A drop would not be allowed. DROPEFFECT_COPY A copy operation would be performed. DROPEFFECT_MOVE A move operation would be performed. DROPEFFECT_LINK A link from the dropped data to the original data would be established. DROPEFFECT_SCROLL A drag scroll operation is about to occur or is occurring in the target. point [in] Contains the current location of the cursor in client coordinates. Returns: Returns true if data object was successfully dropped. See Also: CRhinoDropTarget::OnDropOnObject CRhinoDropTarget::OnDropOnLayerListCtrl CRhinoDropTarget::OnDrop
bool CRhinoDropTarget::OnDropWasCalled | ( | ) | const |
Description: Call this method to find out if the user pressed the Escape key to cancel the drop event. Returns: Returns true if the drop event was canceled otherwise returns false See Also: CRhinoDropTarget::OnDropExWasCalled()
bool CRhinoDropTarget::OverObject | ( | ) | const |
Description: Check to see if mouse is currently over an object. This is only valid if CRhinoDropTarget::DropOnObject() is true. Returns: true when the mouse is over object that is selected and it passes all selection filter tests. false when nothing is selected. See Also: CRhinoDropTarget::EnableDropOnObject CRhinoDropTarget::DropOnObject
bool CRhinoDropTarget::PassesGeometryAttributeFilter | ( | const CRhinoObject * | object, |
const ON_Geometry * | geometry, | ||
ON_COMPONENT_INDEX | component_index | ||
) | const |
Description: Checks geometry to see if it passes the basic GeometryAttributeFilter. Parameters: object - [in] parent object being considered. geometry - [in] geometry being considered. component_index - [in] if >= 0, geometry is a proper sub-part of object->Geometry() with component_index. Remarks: The default simply checks that the geometry passes the filter returned by GeometryAttributeFilter(). See Also: CRhinoDropTarget::EnableDropOnObject CRhinoDropTarget::DropOnObject CRhinoDropTarget::EnablePostSelect CRhinoDropTarget::PassesGeometryTypeFilter
bool CRhinoDropTarget::ReferenceObjectSelect | ( | ) | const |
Description: By default, reference objects can not be selected. If you do not want to be able to select reference objects, then call EnableReferenceObjectSelect( true). Returns: true, then reference objects may be selected by drag and drop. false, then reference objects are ignored by drag and drop. See Also: CRhinoDropTarget::EnableDropOnObject CRhinoDropTarget::DropOnObject CRhinoDropTarget::EnableReferenceObjectSelect
|
virtual |
Description: Called by the frame work at the very beginning and end of a drag event.
CRhinoObjRef CRhinoDropTarget::RhinoObject | ( | ) | const |
Description: Check to see if mouse is currently over an object. This is only valid if CRhinoDropTarget::DropOnObject() is true. Returns: Object the mouse is currently over. If CRhinoObjRef.Object() returns NULL then the mouse is not over a valid object. See Also: CRhinoDropTarget::EnableDropOnObject CRhinoDropTarget::DropOnObject
CRhinoView* CRhinoDropTarget::RhinoView | ( | ) | const |
CRhinoView* CRhinoDropTarget::RhinoViewFromDragPoint | ( | CWnd * | pWnd, |
const ON_2iPoint & | point, | ||
ON_2iPoint * | ptView | ||
) | const |
Description: CRhinoView that the drag cursor is currently over. Returns: Valid point if over a view otherwise NULL.
bool CRhinoDropTarget::RightMouseDrag | ( | ) | const |
Description: Parameters: Returns: See Also:
DROPEFFECT CRhinoDropTarget::SetDefaultOnEventReturnCode | ( | DROPEFFECT | rc = DROPEFFECT_COPY | ) |
Description: Default value returned by CRhinoDropTarget::OnDrop... methods. Parameters: rc - [in] Value to be returned. Returns: Previous value. See Also: CRhinoDropTarget::DefaultOnEventReturnCode
void CRhinoDropTarget::SetGeometryAttributeFilter | ( | unsigned int | geometry_attribute_filter | ) |
Description: The geometry attribute filter provides a secondary filter can be used to restrict which objects can be selected.
Control of the type of geometry (points, curves, surfaces, meshes, etc.) is provided by CRhinoGetObject::SetGeometryFilter. The geometry attribute filter is used to require the selected geometry to have certain attributes (open, closed, etc.). The default attribute filter permits selection of all types of geometry. This is only valid if EnableDropOnObject() is set to true.
Parameters: geometry_attribute_filter - [in] an unsigned int made by bitwise or-ing ( | ) values from the CRhinoGetObject::GEOMETRY_ATTRIBUTE_FILTER enum. If you pass 0, then all geometry attributes will be acceptable.
Example: If you want to be able to select open curves or solids, then you would make a call like
unsigned int geometry_type_filter = 0; unsigned int geometry_attribute_filter = 0; geometry_type_filter |= CRhinoGetObject::curve; geometry_type_filter |= CRhinoGetObject::surface_object; geometry_type_filter |= CRhinoGetObject::polysurface_object; geometry_attribute_filter |= CRhinoGetObject::closed_curve; geometry_attribute_filter |= CRhinoGetObject::solid_object; SetSetGeometryFilter( geometry_type_filter ); SetGeometryAttributeFilter( geometry_attribute_filter );
See Also: CRhinoDropTarget::EnableDropOnObject CRhinoDropTarget::DropOnObject CRhinoDropTarget::GeometryAttributeFilter. CRhinoDropTarget::SetGeometryFilter. CRhinoDropTarget::GeometryFilter.
void CRhinoDropTarget::SetGeometryFilter | ( | unsigned int | geometry_type_filter | ) |
Description: The geometry type filter controls which types of geometry (points, curves, surfaces, meshes, etc.) can be selected.
The default geometry type filter permits selection of all types of geometry. This is only valid if EnableDropOnObject() is set to true.
Parameters: geometry_type_filter - [in] an unsigned int made by or-ing ( | ) values from the CRhinoGetObject::GEOMETRY_TYPE_FILTER enum. If you pass 0, then all geometry will be acceptable.
Example: If you want to be able to select curves and meshes, then you would make a call like
unsigned int geometry_type_filter = 0; geometry_filter |= CRhinoGetObject::curve_object; geometry_filter |= CRhinoGetObject::mesh_object; SetGeometryFilter( geometry_type_filter );
See Also: CRhinoDropTarget::GeometryFilter CRhinoDropTarget::SetGeometryAttributeFilter CRhinoDropTarget::GeometryAttributeFilter
bool CRhinoDropTarget::ShiftKeyDownWhenDragStarted | ( | ) | const |
Description: Call this method to find out if the shift key was pressed when the drag event started. Returns: Returns true if the shift key was pressed when the drag event started.
|
pure virtual |
Required overrides Description: This method is called by Rhino to determine if this drop data object is associated with this drop target. Rhino will forward messages to the first enabled drop target whos SupportDataObject() returns true. Parameters: pDataObject [in] Points to the data object containing the data that can be dropped. Returns: Return true if this drop target supports the specified data object.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |