Window non-rectangular shape support.
More...
#include <CWindowShape.h>
|
int | mouseZone (int mouseX, int mouseY) const |
| Computes mouse zone from window coordinates. More...
|
|
void | changeSize (int mouseX, int mouseY) |
| Resizes the window based on mouse zone and mouse screen coordinates. More...
|
|
virtual int | shapeCursorHandle (int event) |
| Changes the window cursor based on the mouse position in the window. More...
|
|
void | initShapeExtension () |
| Initializes shape extension. More...
|
|
bool | borderCleared () const |
| Returns true if border was cleared for the shape.
|
|
void | shapeApply () |
| Sets the shape to the window during window->draw()
|
|
void | resizingShape (int w, int h) |
| Calls resizeShape() from inside CWindow::resize()
|
|
virtual void | shapeResize (int w, int h) |
| Shape resize. More...
|
|
Window non-rectangular shape support.
Window shape is defined with the array of points that should be modified at every resize of the window. The derived window should modify the shape points array by ovewriting shapeResize() method. The window resize support is activated only if window resizable() is true.
◆ CWindowShape()
◆ changeSize()
void sptk::CWindowShape::changeSize |
( |
int |
mouseX, |
|
|
int |
mouseY |
|
) |
| |
|
protected |
Resizes the window based on mouse zone and mouse screen coordinates.
- Parameters
-
mouseX | int, mouse x-coordinate in the screen |
mouseY | int, mouse y-coordinate in the screen |
◆ initShapeExtension()
void sptk::CWindowShape::initShapeExtension |
( |
| ) |
|
|
protected |
Initializes shape extension.
Allows window to use shape extension. Should be called before the window is first shown.
◆ mouseZone()
int sptk::CWindowShape::mouseZone |
( |
int |
mouseX, |
|
|
int |
mouseY |
|
) |
| const |
|
protected |
Computes mouse zone from window coordinates.
- Parameters
-
mouseX | int, mouse x-coordinate in the window |
mouseY | int, mouse y-coordinate in the window |
◆ shapeCursorHandle()
virtual int sptk::CWindowShape::shapeCursorHandle |
( |
int |
event | ) |
|
|
protectedvirtual |
Changes the window cursor based on the mouse position in the window.
Designed to emulate cursor changes on the window border for shaped windows. Should be uncoditionally called inside handle() for the window.
◆ shapeResize()
virtual void sptk::CWindowShape::shapeResize |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
|
inlineprotectedvirtual |
Shape resize.
This method should be overwritten in the derived class to adapt m_shapePoints[] to the window size.
◆ shapeResizing()
bool sptk::CWindowShape::shapeResizing |
( |
| ) |
|
|
inline |
Returns true if the window is resizing as a result of border drag.
Can be used to simplified drawing during the resize
◆ m_borderCleared
bool sptk::CWindowShape::m_borderCleared {false} |
|
protected |
Is no border flag set for the window?
◆ m_borderWidth
int sptk::CWindowShape::m_borderWidth {6} |
|
protected |
Shape border width, the default is 6
◆ m_pushedX
int sptk::CWindowShape::m_pushedX {0} |
|
protected |
X coordinate of the last FL_PUSH event
◆ m_pushedY
int sptk::CWindowShape::m_pushedY {0} |
|
protected |
Y coordinate of the last FL_PUSH event
◆ m_resizingZone
int sptk::CWindowShape::m_resizingZone {0} |
|
protected |
Resizing mouse zone where mouse was pushed
◆ m_shapeChanged
bool sptk::CWindowShape::m_shapeChanged {true} |
|
protected |
Is the shape size changed?
◆ m_shapeExtension
bool sptk::CWindowShape::m_shapeExtension {false} |
|
protected |
Is the shape extension activated?
◆ m_shapePoints
std::vector<CShapePoint> sptk::CWindowShape::m_shapePoints |
|
protected |
Vector of points defining window shape
The documentation for this class was generated from the following file: