27 #ifndef _CEGUIDragContainer_h_ 28 #define _CEGUIDragContainer_h_ 30 #include "../Window.h" 31 #include "../WindowFactory.h" 34 # pragma warning(push) 35 # pragma warning(disable : 4251) 45 class CEGUIEXPORT DragContainer :
public Window
51 static const String WidgetTypeName;
52 static const String EventNamespace;
58 static const String EventDragStarted;
64 static const String EventDragEnded;
70 static const String EventDragPositionChanged;
76 static const String EventDragEnabledChanged;
82 static const String EventDragAlphaChanged;
88 static const String EventDragMouseCursorChanged;
94 static const String EventDragThresholdChanged;
101 static const String EventDragDropTargetChanged;
110 DragContainer(
const String& type,
const String& name);
116 virtual ~DragContainer(
void);
129 bool isDraggingEnabled(
void)
const;
142 void setDraggingEnabled(
bool setting);
152 bool isBeingDragged(
void)
const;
165 float getPixelDragThreshold(
void)
const;
181 void setPixelDragThreshold(
float pixels);
191 float getDragAlpha(
void)
const;
208 void setDragAlpha(
float alpha);
218 const Image* getDragCursorImage(
void)
const;
234 void setDragCursorImage(
const Image* image);
252 void setDragCursorImage(
const String& name);
265 Window* getCurrentDropTarget(
void)
const;
275 bool isStickyModeEnabled()
const;
285 void setStickyModeEnabled(
bool setting);
303 bool pickUp(
const bool force_sticky =
false);
318 void setFixedDragOffset(
const UVector2& offset);
333 const UVector2& getFixedDragOffset()
const;
345 void setUsingFixedDragOffset(
const bool enable);
357 bool isUsingFixedDragOffset()
const;
360 void getRenderingContext_impl(RenderingContext& ctx)
const;
378 bool isDraggingThresholdExceeded(
const Vector2f& local_mouse);
387 void initialiseDragging(
void);
399 void doDragging(
const Vector2f& local_mouse);
405 void updateActiveMouseCursor(
void)
const;
414 virtual void onMouseButtonDown(MouseEventArgs& e);
415 virtual void onMouseButtonUp(MouseEventArgs& e);
416 virtual void onMouseMove(MouseEventArgs& e);
417 virtual void onCaptureLost(WindowEventArgs& e);
418 virtual void onAlphaChanged(WindowEventArgs& e);
419 virtual void onClippingChanged(WindowEventArgs& e);
420 virtual void onMoved(ElementEventArgs& e);
435 virtual void onDragStarted(WindowEventArgs& e);
447 virtual void onDragEnded(WindowEventArgs& e);
459 virtual void onDragPositionChanged(WindowEventArgs& e);
469 virtual void onDragEnabledChanged(WindowEventArgs& e);
479 virtual void onDragAlphaChanged(WindowEventArgs& e);
489 virtual void onDragMouseCursorChanged(WindowEventArgs& e);
499 virtual void onDragThresholdChanged(WindowEventArgs& e);
516 virtual void onDragDropTargetChanged(DragDropEventArgs& e);
521 bool d_draggingEnabled;
522 bool d_leftMouseDown;
524 UVector2 d_dragPoint;
525 UVector2 d_startPosition;
526 float d_dragThreshold;
529 bool d_storedClipState;
530 Window* d_dropTarget;
531 const Image* d_dragCursorImage;
538 bool d_usingFixedDragOffset;
540 UVector2 d_fixedDragOffset;
553 void addDragContainerProperties(
void);
559 #if defined(_MSC_VER) 560 # pragma warning(pop) 563 #endif // end of guard _CEGUIDragContainer_h_ Main namespace for Crazy Eddie's GUI Library.
Definition: cegui/include/CEGUI/Affector.h:42