Crazy Eddie's GUI System
0.8.7
|
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)
252 void setDragCursorImage(
const String& name);
303 bool pickUp(
const bool force_sticky =
false);
553 void addDragContainerProperties(
void);
559 #if defined(_MSC_VER)
560 # pragma warning(pop)
563 #endif // end of guard _CEGUIDragContainer_h_
bool d_pickedUp
true after been picked-up / dragged via sticky mode
Definition: DragContainer.h:536
UVector2 d_dragPoint
point we are being dragged at.
Definition: DragContainer.h:524
static const String EventDragPositionChanged
Definition: DragContainer.h:70
static const String EventDragAlphaChanged
Definition: DragContainer.h:82
bool d_dragging
true when being dragged.
Definition: DragContainer.h:523
bool d_dropflag
Definition: DragContainer.h:532
Generic drag & drop enabled window class.
Definition: DragContainer.h:46
const Image * getDragCursorImage(void) const
Return the Image currently set to be used for the mouse cursor when a drag operation is in progress.
void setDragCursorImage(const Image *image)
Set the Image to be used for the mouse cursor when a drag operation is in progress.
void setUsingFixedDragOffset(const bool enable)
Set whether the fixed dragging offset - as set with the setFixedDragOffset - function will be used,...
void getRenderingContext_impl(RenderingContext &ctx) const
implementation of the default getRenderingContext logic.
void updateActiveMouseCursor(void) const
Method to update mouse cursor image.
void setFixedDragOffset(const UVector2 &offset)
Set the fixed mouse cursor dragging offset to be used for this DragContainer.
virtual void onDragMouseCursorChanged(WindowEventArgs &e)
Method called when the mouse cursor to use when dragging is changed.
bool d_usingFixedDragOffset
true if fixed mouse offset is used for dragging position.
Definition: DragContainer.h:538
float d_storedAlpha
Alpha value to re-set when dragging ends.
Definition: DragContainer.h:528
virtual void onAlphaChanged(WindowEventArgs &e)
Handler called when the window's alpha blend value is changed.
void doDragging(const Vector2f &local_mouse)
Update state for window dragging.
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: Element.h:211
struct that holds some context relating to a RenderingSurface object.
Definition: RenderingContext.h:41
void initialiseDragging(void)
virtual void onDragStarted(WindowEventArgs &e)
Method called when dragging commences.
static const String EventNamespace
Namespace for global events.
Definition: DragContainer.h:52
virtual void onClippingChanged(WindowEventArgs &e)
Handler called when the window's setting for being clipped by it's parent is changed.
DragContainer(const String &type, const String &name)
Constructor for DragContainer objects.
static const String EventDragEnabledChanged
Definition: DragContainer.h:76
void setDraggingEnabled(bool setting)
Set whether dragging is currently enabled for this DragContainer.
EventArgs based class used for certain drag/drop notifications.
Definition: InputEvent.h:342
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
virtual void onDragThresholdChanged(WindowEventArgs &e)
Method called when the movement threshold required to trigger dragging is changed.
EventArgs based class that is used for objects passed to input event handlers concerning mouse input.
Definition: InputEvent.h:281
bool isUsingFixedDragOffset() const
Return whether the fixed dragging offset - as set with the setFixedDragOffset function - will be used...
bool d_leftMouseDown
True when left mouse button is down.
Definition: DragContainer.h:522
bool isDraggingThresholdExceeded(const Vector2f &local_mouse)
Return whether the required minimum movement threshold before initiating dragging has been exceeded.
const UVector2 & getFixedDragOffset() const
Return the fixed mouse cursor dragging offset to be used for this DragContainer.
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: InputEvent.h:252
bool d_storedClipState
Parent clip state to re-set.
Definition: DragContainer.h:529
static const String EventDragStarted
Definition: DragContainer.h:58
virtual void onCaptureLost(WindowEventArgs &e)
Handler called when this window loses capture of mouse inputs.
void setPixelDragThreshold(float pixels)
Set the current drag threshold in pixels.
static const String WidgetTypeName
Type name for DragContainer.
Definition: DragContainer.h:51
virtual void onDragDropTargetChanged(DragDropEventArgs &e)
Method called when the current drop target of this DragContainer changes.
static const String EventDragThresholdChanged
Definition: DragContainer.h:94
bool pickUp(const bool force_sticky=false)
Immediately pick up the DragContainer and optionally set the sticky mode in order to allow this to ha...
float d_dragThreshold
Pixels mouse must move before dragging commences.
Definition: DragContainer.h:526
virtual void onMouseMove(MouseEventArgs &e)
Handler called when the mouse cursor has been moved within this window's area.
float getDragAlpha(void) const
Return the alpha value that will be set on the DragContainer while a drag operation is in progress.
const Image * d_dragCursorImage
Image to use for mouse cursor when dragging.
Definition: DragContainer.h:531
bool isBeingDragged(void) const
Return whether the DragContainer is currently being dragged.
void setStickyModeEnabled(bool setting)
Enable or disable sticky mode.
UVector2 d_startPosition
position prior to dragging.
Definition: DragContainer.h:525
virtual void onDragEnded(WindowEventArgs &e)
Method called when dragging ends.
Window * getCurrentDropTarget(void) const
Return the Window object that is the current drop target for the DragContainer.
float getPixelDragThreshold(void) const
Return the current drag threshold in pixels.
virtual void onMoved(ElementEventArgs &e)
Handler called when the window's position changes.
float d_dragAlpha
Alpha value to set when dragging.
Definition: DragContainer.h:527
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: Window.h:151
virtual void onDragAlphaChanged(WindowEventArgs &e)
Method called when the alpha value to use when dragging is changed.
static const String EventDragDropTargetChanged
Definition: DragContainer.h:101
virtual void onMouseButtonUp(MouseEventArgs &e)
Handler called when a mouse button has been released within this window's area.
virtual void onMouseButtonDown(MouseEventArgs &e)
Handler called when a mouse button has been depressed within this window's area.
bool d_draggingEnabled
True when dragging is enabled.
Definition: DragContainer.h:521
String class used within the GUI system.
Definition: String.h:64
bool isStickyModeEnabled() const
Return whether sticky mode is enable or disabled.
void setDragAlpha(float alpha)
Set the alpha value to be set on the DragContainer when a drag operation is in progress.
static const String EventDragEnded
Definition: DragContainer.h:64
Interface for Image.
Definition: Image.h:161
static const String EventDragMouseCursorChanged
Definition: DragContainer.h:88
Window * d_dropTarget
Target window for possible drop operation.
Definition: DragContainer.h:530
UVector2 d_fixedDragOffset
current fixed mouse offset value.
Definition: DragContainer.h:540
virtual void onDragPositionChanged(WindowEventArgs &e)
Method called when the dragged object position is changed.
virtual ~DragContainer(void)
Destructor for DragContainer objects.
bool isDraggingEnabled(void) const
Return whether dragging is currently enabled for this DragContainer.
virtual void onDragEnabledChanged(WindowEventArgs &e)
Method called when the dragging state is enabled or disabled.