21BEGIN_IGRAPHICS_NAMESPACE
32 , mInitialGraphicsBounds(graphicsBounds)
34 , mMouseOverColor(mouseOverColour)
35 , mDragColor(dragColor)
43 g.
FillTriangle(color, mRECT.L, mRECT.B, mRECT.R, mRECT.T, mRECT.R, mRECT.B);
48 GetUI()->StartDragResize();
53 GetUI()->
Resize(
static_cast<int>(mInitialGraphicsBounds.
W()),
static_cast<int>(mInitialGraphicsBounds.
H()), 1.f);
80 bool mMouseOver =
false;
81 ECursor mPrevCursorType = ECursor::ARROW;
82 IRECT mInitialGraphicsBounds;
83 IColor mColor, mMouseOverColor, mDragColor;
86END_IGRAPHICS_NAMESPACE
This file contains the base IControl implementation, along with some base classes for specific types ...
The lowest level base class of an IGraphics control.
bool GetMouseIsOver() const
This can be used in IControl::Draw() to check if the mouse is over the control, without implementing ...
virtual void OnMouseOut()
Implement this method to respond to a mouseout event on this control.
virtual void OnMouseOver(float x, float y, const IMouseMod &mod)
Implement this method to respond to a mouseover event on this control.
void SetTargetAndDrawRECTs(const IRECT &bounds)
Set BOTH the draw rect and the target area, within the graphics context for this control.
A control for resizing the plug-in window by clicking and dragging in the bottom right-hand corner Th...
void OnMouseOver(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouseover event on this control.
void OnMouseOut() override
Implement this method to respond to a mouseout event on this control.
void OnMouseDown(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse down event on this control.
void OnMouseDblClick(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse double click event on this control.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void OnRescale() override
Implement to do something when graphics is scaled globally (e.g.
The lowest level base class of an IGraphics context.
void Resize(int w, int h, float scale, bool needsPlatformResize=true)
virtual ECursor SetMouseCursor(ECursor cursorType=ECursor::ARROW)
Sets the mouse cursor to one of ECursor (implementations should return the result of the base impleme...
virtual void FillTriangle(const IColor &color, float x1, float y1, float x2, float y2, float x3, float y3, const IBlend *pBlend=0)
Fill a triangle with a color.
float GetDrawScale() const
Gets the graphics context scaling factor.
IRECT GetBounds() const
Returns an IRECT that represents the entire UI bounds This is useful for programatically arranging UI...
Used to manage color data, independent of draw class/platform.
Used to manage mouse modifiers i.e.
Used to manage a rectangular area, independent of draw class/platform.
IRECT GetFromBRHC(float w, float h) const
Get a subrect of this IRECT expanding from the bottom-right corner.
IRECT GetPadded(float padding) const
Get a copy of this IRECT with each value padded by padding N.B.