ResizeEdges struct
#include <Jazz2/UI/Windows/Widgets.h>
Edges a window is resized by, for the windows that can be.
An edge is grabbed outside of the window too, as the edges of the windows of the system are, and the corners reach along the edges, so they're easy to hit. The corner at the bottom right, which has the dots, reaches further. A corner is two edges.
Public types
-
enum (anonymous) : std::
uint8_t { Left = 0x01, Top = 0x02, Right = 0x04, Bottom = 0x08 }
Public static variables
- static float GripWidth constexpr
- Width of an edge in units, the unit the corner with the dots is measured in.
- static float GripOutside constexpr
- How far outside of the window an edge is grabbed, in units.
- static float GripInside constexpr
- How far inside of the window an edge is grabbed, in units, all of it in a window of its own.
- static float CornerReach constexpr
- How far a corner reaches along the edges, in units.
Public static functions
- static auto GetHitBounds(const Rectf& bounds, float scale) -> Rectf
- Returns the area a window takes the pointer in with its edges, a little larger than it.
-
static auto GetAt(const Rectf& bounds,
float scale,
Vector2f pos,
float cornerSize) -> std::
uint8_t - Returns the edges of a window at a position,
cornerSizeis how far the corner reaches, in widths of an edge. -
static void Draw(Painter& painter,
const Rectf& bounds,
std::
uint8_t edges) - Draws the edges being pointed at or dragged lit up, and the dots in the corner.
-
static void ShowCursor(Surface& surface,
std::
uint8_t edges) - Shows the arrows of resizing by the pointer for the edges being pointed at or dragged, nothing for none.
Enum documentation
enum Jazz2:: UI:: Windows:: ResizeEdges:: (anonymous) : std:: uint8_t
| Enumerators | |
|---|---|
| Left |
Left edge |
| Top |
Top edge |
| Right |
Right edge |
| Bottom |
Bottom edge |