![]() |
Louvre
v1.0.1-1
C++ library for Wayland compositors
|
#include <LView.h>
Base class for LScene views. More...
Base class for LScene views.
The LView class provides a base interface for creating views that can be shown in an LScene.
This class should be used for creating custom views that are different from those shipped with the library.
Louvre provides a pre-made set of views for most common purposes:
Each view can have a parent and multiple children. This hierarchy and the order given by their children views list determine the stacking order in which they are rendered.
Children views are always stacked on top of its parent, and the last view in a children list is the one stacked on top the rest.
To create a custom view, you must implement several virtual methods. In summary, for an LScene or LSceneView to be able to render an LView, it must provide the following information:
The position of the view in surface coordinates must be returned by the nativePos() virtual method.
This method is used by the pos() method, which returns the position equal to nativePos(), or transformed if parent offset or parent scaling is enabled.
The size of the view in surface coordinates should be implemented in the nativeSize() virtual method. This size is then returned by the size() method if no transformation is applied, or may differ if scaling or parent scaling is enabled.
To tell a scene if the view is visible, the nativeMapped() bool method must be implemented. This is then returned by the mapped() method, which may differ from nativeMapped() if the visible() property is different, or if the view has no parent, or if its parent is mapped. In summary, a view can only be mapped if nativeMapped() is true
, the visible() property is true
, it has a parent, and the parent is also mapped.
If the view has content that can be rendered, for example, a texture, then the isRenderable() method must return true
. On the other hand, if the view is simply a container for other views and is not renderable on its own, then it should return false
.
The outputs() virtual method must return a list with the outputs where the view is currently visible. When the view changes, repaint() is called, and all those intersected outputs are scheduled for repainting. The scene informs which outputs a view is currently on based on its rect through the enteredOutput() and leftOutput() virtual methods. So, those methods must be used to update the intersected outputs list.
If the view is renderable, the paintRect() method must be implemented.
This method provides the src rect within the view and the dst rect within the destination framebuffer to render in surface coordinates, along with the scale that must be used and LPainter.
To inform the scene about which rects within the view must be re-rendered (due to changes), the damage() virtual method must return an LRegion containing the damaged rects. If nullptr
is returned, the entire view is considered damaged.
The scene automatically damages the entire view if its position, size, or stacking order changes from one frame to another, so it's not necessary to add damage in those cases. Usually, the damage should be cleared once the view has been rendered. To determine if a view was rendered on a specific output, the requestNextFrame() method is invoked by the scene. So within that method, the damage should be cleared.
To prevent the scene view from rendering views occluded by opaque regions, the translucentRegion() and opaqueRegion() must be implemented. They must return an LRegion with the translucent and opaque regions, respectively, in surface coordinates.
If translucentRegion() returns nullptr
, the entire view is considered translucent. On the other hand, if opaqueRegion is nullptr
, the opaque region is considered the inverse of the translucentRegion(). So normally, it's only needed to specify the translucent region. The opaque region must be specified if it has been calculated before so that the scene can use that information and prevent re-calculating the inverse translucent region.
To define which parts of the view can receive pointer or touch events, the inputRegion() must be implemented. If nullptr
is returned, the entire view is considered capable of receiving events.
Scenes can trigger specific input events on views through the pointerEnterEvent(), pointerMoveEvent(), keyEvent(), and other related methods. Implement these virtual methods to listen and respond to those events if needed.
Public Types | |
enum | Type : UInt32 |
Types of views included with Louvre. More... | |
Public Member Functions | |
LView (UInt32 type, LView *parent=nullptr) | |
Construct an LView object. More... | |
virtual | ~LView () |
Destructor for the LView class. More... | |
LScene * | scene () const |
Get the scene in which this view is currently embedded. More... | |
LSceneView * | parentSceneView () const |
Get the LSceneView in which this view is currently embedded. More... | |
UInt32 | type () const |
Get the identifier for the type of view. More... | |
void | repaint () |
Schedule a repaint for all outputs where this view is currently visible. More... | |
LView * | parent () const |
Get the parent of the view. More... | |
void | setParent (LView *view) |
Set the new parent for the view and insert it at the end of its children list. More... | |
void | insertAfter (LView *prev, bool switchParent=true) |
Insert the view after the 'prev' view. More... | |
std::list< LView * > & | children () const |
Get the list of child views. More... | |
bool | parentOffsetEnabled () const |
Check if the parent's offset is applied to the view position. More... | |
void | enableParentOffset (bool enabled) |
Enable or disable the parent's offset for the view position. More... | |
const LPoint & | pos () const |
Get the current position of the view with applied transformations. More... | |
const LSize & | size () const |
Get the current size of the view with applied transformations. More... | |
bool | clippingEnabled () const |
Check if the view is currently being clipped to the clippingRect() property. More... | |
void | enableClipping (bool enabled) |
Enable or disable clipping of the view to the clippingRect() property. More... | |
const LRect & | clippingRect () const |
Get the current clipping rectangle defined by the clippingRect() property. More... | |
void | setClippingRect (const LRect &rect) |
Set the clipping rectangle for the view using the clippingRect() property. More... | |
bool | parentClippingEnabled () const |
Check if the view is clipped to the current parent view rect. More... | |
void | enableParentClipping (bool enabled) |
Enable or disable clipping of the view to the current parent view rect. More... | |
bool | inputEnabled () const |
Check if the view receives pointer and touch events. More... | |
void | enableInput (bool enabled) |
Enable or disable pointer and touch events for the view. More... | |
bool | scalingEnabled () const |
Check if scaling is enabled for the view's size. More... | |
void | enableScaling (bool enabled) |
Enable or disable scaling for the view's size. More... | |
bool | parentScalingEnabled () const |
Check if the size and position are scaled by the parent scaling vector. More... | |
void | enableParentScaling (bool enabled) |
Enable or disable scaling of the size and position by the parent's scaling vector. More... | |
const LSizeF & | scalingVector (bool forceIgnoreParent=false) const |
Get the scaling vector for the view's size. More... | |
void | setScalingVector (const LSizeF &scalingVector) |
Set the scaling vector for the view's size. More... | |
bool | visible () const |
Check if the view is marked as visible. More... | |
void | setVisible (bool visible) |
Toggle the view visibility. More... | |
bool | mapped () const |
Check if the view should be rendered, taking into consideration several boolean conditions. More... | |
Float32 | opacity (bool forceIgnoreParent=false) const |
Get the current view opacity. More... | |
void | setOpacity (Float32 opacity) |
Set the view opacity. More... | |
bool | parentOpacityEnabled () const |
Check if the view's opacity is multiplied by its parent's opacity. More... | |
void | enableParentOpacity (bool enabled) |
Enable or disable the view's opacity being multiplied by its parent's opacity. More... | |
bool | forceRequestNextFrameEnabled () const |
Check if the requestNextFrame() is enabled. More... | |
void | enableForceRequestNextFrame (bool enabled) const |
Enable or disable the requestNextFrame() to be called always. More... | |
void | setBlendFunc (GLenum sFactor, GLenum dFactor) |
Set the alpha blending function for the view. More... | |
void | setColorFactor (Float32 r, Float32 g, Float32 b, Float32 a) |
Set the color factor. More... | |
const LRGBAF & | colorFactor () |
Get the color factor. More... | |
bool | pointerIsOver () const |
Checks if the pointer/cursor is inside the view's input region. More... | |
void | enableBlockPointer (bool enabled) |
Enable or disable blocking of pointer or touch events to views behind the view's input region. More... | |
bool | blockPointerEnabled () const |
Checks if blocking of pointer or touch events to views behind the view's input region is enabled. More... | |
LBox | boundingBox () const |
Get the bounding box of the view and all its mapped children. More... | |
virtual bool | nativeMapped () const =0 |
Tells whether the view should be rendered. More... | |
virtual const LPoint & | nativePos () const =0 |
Get the position of the view without any transformations applied. More... | |
virtual const LSize & | nativeSize () const =0 |
Get the size of the view without any transformations applied. More... | |
virtual Int32 | bufferScale () const =0 |
Get the scale of the view buffer content. More... | |
virtual void | enteredOutput (LOutput *output)=0 |
Indicate that the view is visible on the given output. More... | |
virtual void | leftOutput (LOutput *output)=0 |
Indicate that the view is no longer visible on the given output. More... | |
virtual const std::list< LOutput * > & | outputs () const =0 |
Get a list of outputs on which the view is currently visible. More... | |
virtual bool | isRenderable () const =0 |
Check if the view is itself renderable. More... | |
virtual void | requestNextFrame (LOutput *output)=0 |
Notify that the view has been rendered on the given output. More... | |
virtual const LRegion * | damage () const =0 |
Get the region within the view rect that needs to be repainted. More... | |
virtual const LRegion * | translucentRegion () const =0 |
Returns the translucent region within the view rectangle. More... | |
virtual const LRegion * | opaqueRegion () const =0 |
Returns the opaque region within the view rectangle. More... | |
virtual const LRegion * | inputRegion () const =0 |
Region within the view rect that can receive input events (when the inputEnabled() property is enabled). More... | |
virtual void | paintRect (LPainter *p, Int32 srcX, Int32 srcY, Int32 srcW, Int32 srcH, Int32 dstX, Int32 dstY, Int32 dstW, Int32 dstH, Float32 scale, Float32 alpha)=0 |
Request to paint a rectangle of the view to the current framebuffer. More... | |
virtual void | pointerEnterEvent (const LPoint &localPos) |
Handle the pointer enter event within the view. More... | |
virtual void | pointerMoveEvent (const LPoint &localPos) |
Handle the pointer move event within the view. More... | |
virtual void | pointerLeaveEvent () |
Handle the pointer leave event within the view. More... | |
virtual void | pointerButtonEvent (LPointer::Button button, LPointer::ButtonState state) |
Handle the pointer button event within the view. More... | |
virtual void | pointerAxisEvent (Float64 axisX, Float64 axisY, Int32 discreteX, Int32 discreteY, UInt32 source) |
Handle the pointer axis event within the view. More... | |
virtual void | keyModifiersEvent (UInt32 depressed, UInt32 latched, UInt32 locked, UInt32 group) |
Handle the key modifiers event within the view. More... | |
virtual void | keyEvent (UInt32 keyCode, UInt32 keyState) |
Handle the key event within the view. More... | |
![]() | |
LObject () | |
Constructor of the LObject class. More... | |
Additional Inherited Members | |
![]() | |
static LCompositor * | compositor () |
Quick access to the global compositor instance. More... | |
static LSeat * | seat () |
Quick access to the global seat instance. More... | |
static LCursor * | cursor () |
Quick access to the global cursor instance. More... | |
Types of views included with Louvre.
Enumerator | |
---|---|
Layer | |
Surface | |
Texture | |
SolidColor | |
Scene |
Construct an LView object.
type | Type ID of the view, such as those listed in LView::Type. |
parent | Parent view. |
LScene * scene | ( | ) | const |
Get the scene in which this view is currently embedded.
nullptr
if the view is not part of any scene. LSceneView * parentSceneView | ( | ) | const |
Get the LSceneView in which this view is currently embedded.
nullptr
if the view is not part of any LSceneView. UInt32 type | ( | ) | const |
Get the identifier for the type of view.
This method returns a number used to identify the type of view that was passed in the LView constructor.
For additional information about view types, refer to the LView::Type enumeration.
void repaint | ( | ) |
Schedule a repaint for all outputs where this view is currently visible.
This method triggers a repaint for all outputs where this view is currently visible.
Outputs are those returned by the LView::outputs() method.
LView * parent | ( | ) | const |
Get the parent of the view.
nullptr
if no parent is assigned to the view. void setParent | ( | LView * | view | ) |
Set the new parent for the view and insert it at the end of its children list.
This method sets the new parent for the view and inserts it at the end of its parent's children list. If 'view' is set to nullptr
, the parent is unset, and the view is unmapped.
view | The new parent view to be set. |
void insertAfter | ( | LView * | prev, |
bool | switchParent = true |
||
) |
Insert the view after the 'prev' view.
This method inserts the view after the 'prev' view in the parent's children list. If 'switchParent' is true
, the view will be assigned the same parent as the 'prev' view. If 'switchParent' is false
, the view will only be reinserted if it shares the same parent with the 'prev' view. If 'prev' is set to nullptr
, the view will be inserted at the beginning of its current parent's children list, regardless of the value of 'switchParent'.
prev | The view after which this view will be inserted. |
switchParent | If true , the view will be assigned the same parent as the 'prev' view. |
std::list< Louvre::LView * > & children | ( | ) | const |
Get the list of child views.
This method returns a reference to the list of child views of the current view.
bool parentOffsetEnabled | ( | ) | const |
void enableParentOffset | ( | bool | enabled | ) |
const LPoint & pos | ( | ) | const |
Get the current position of the view with applied transformations.
This method returns the current position of the view with any applied transformations.
const LSize & size | ( | ) | const |
Get the current size of the view with applied transformations.
This method returns the current size of the view with any applied transformations.
bool clippingEnabled | ( | ) | const |
Check if the view is currently being clipped to the clippingRect() property.
This method returns true
if the view is currently being clipped to the specified clipping rectangle, which is defined by the clippingRect() property. If the view is not clipped to the clipping rectangle, the method returns false
.
The default value is false
.
true
if the view is being clipped to the clipping rectangle, false
otherwise. void enableClipping | ( | bool | enabled | ) |
Enable or disable clipping of the view to the clippingRect() property.
If enabled, the view will be clipped to the current clipping rectangle defined by the clippingRect() property. If disabled, the view will not be clipped, allowing its entire content to be visible.
The default value is false
.
enabled | If true , the view will be clipped to the clippingRect() property. If false , clipping will be disabled, and the full view will be visible. |
const LRect & clippingRect | ( | ) | const |
Get the current clipping rectangle defined by the clippingRect() property.
This method returns a constant reference to the current clipping rectangle that is being used to clip the view. The clipping rectangle is defined by the clippingRect() property.
void setClippingRect | ( | const LRect & | rect | ) |
Set the clipping rectangle for the view using the clippingRect() property.
This method sets the clipping rectangle for the view using the clippingRect() property. When clipping is enabled, the view's content outside this rectangle will be clipped (not visible).
rect | The clipping rectangle to set for the view using the clippingRect() property. |
bool parentClippingEnabled | ( | ) | const |
Check if the view is clipped to the current parent view rect.
This method returns true
if the view is clipped to the current parent view rect, false
otherwise.
The default value is false
.
true
if the view is clipped to the current parent view rect, false
otherwise. void enableParentClipping | ( | bool | enabled | ) |
Enable or disable clipping of the view to the current parent view rect.
If enabled, the view will be clipped to the current parent view rect.
The default value is false
.
enabled | If true , the view will be clipped to the current parent view rect. |
bool inputEnabled | ( | ) | const |
Check if the view receives pointer and touch events.
This method returns true
if the view receives pointer and touch events. However, keyboard events are always received regardless of this setting.
true
if the view receives pointer and touch events, false
otherwise. void enableInput | ( | bool | enabled | ) |
Enable or disable pointer and touch events for the view.
If enabled, the view will receive pointer and touch events. However, keyboard events are always received regardless of this setting.
enabled | If true , the view will receive pointer and touch events. |
bool scalingEnabled | ( | ) | const |
Check if scaling is enabled for the view's size.
This method returns true
if the view's size is scaled using the scaling vector, false
otherwise.
true
if the view's size is scaled, false
otherwise. void enableScaling | ( | bool | enabled | ) |
Enable or disable scaling for the view's size.
If enabled, the view's size will be scaled using the scaling vector.
enabled | If true , the view's size will be scaled. |
bool parentScalingEnabled | ( | ) | const |
Check if the size and position are scaled by the parent scaling vector.
This method returns true
if the view's size and position are scaled by the parent's scaling vector, false
otherwise.
The default value is false
.
true
if the size and position are scaled by the parent's scaling vector, false
otherwise. void enableParentScaling | ( | bool | enabled | ) |
Enable or disable scaling of the size and position by the parent's scaling vector.
If enabled, the view's size and position will be scaled by the parent's scaling vector.
The default value is false
.
enabled | If true , the view's size and position will be scaled by the parent's scaling vector. |
const LSizeF & scalingVector | ( | bool | forceIgnoreParent = false | ) | const |
Get the scaling vector for the view's size.
This method returns the scaling vector for the view's size.
forceIgnoreParent | If set to false , the vector is multiplied by the parent scaling vector. |
void setScalingVector | ( | const LSizeF & | scalingVector | ) |
Set the scaling vector for the view's size.
If scalingEnabled() returns true
, the view's size will be scaled using the provided scaling vector (nativeSize() * scalingVector()). Setting a value to 1 disables scaling for that axis.
scalingVector | The (width, height) scaling vector for the view's size. |
bool visible | ( | ) | const |
Check if the view is marked as visible.
This method indicates whether the view is marked as visible. However, it does not directly indicate if the view will be rendered. To check if the view will be rendered, use the mapped() property instead.
true
if the view is marked as visible, false
otherwise. void setVisible | ( | bool | visible | ) |
Toggle the view visibility.
Enabling visibility does not guarantee that the view will be rendered. On the other hand, disabling it directly indicates that it is not mapped and will not be rendered.
visible | If true , the view will be marked as visible; if false , it will be marked as not visible. |
bool mapped | ( | ) | const |
Check if the view should be rendered, taking into consideration several boolean conditions.
This method indicates whether the view should be rendered, considering the nativeMapped() && visible() && parent() && parent()->mapped() boolean operation.
true
if the view should be rendered, false
otherwise. Float32 opacity | ( | bool | forceIgnoreParent = false | ) | const |
Get the current view opacity.
This method returns the current view opacity.
forceIgnoreParent | If set to false , the opacity is multiplied by the parent's opacity. |
void setOpacity | ( | Float32 | opacity | ) |
Set the view opacity.
This method sets the view's opacity. Setting the value to 1.0 disables opacity.
opacity | The opacity value in the range [0.0, 1.0]. |
bool parentOpacityEnabled | ( | ) | const |
Check if the view's opacity is multiplied by its parent's opacity.
This method returns true
if the view's opacity is multiplied by its parent's opacity, false
otherwise.
The default value is true
.
true
if the view's opacity is multiplied by its parent's opacity, false
otherwise. void enableParentOpacity | ( | bool | enabled | ) |
Enable or disable the view's opacity being multiplied by its parent's opacity.
If enabled, the view's opacity will be multiplied by its parent's opacity.
The default value is true
.
enabled | If true , the view's opacity will be multiplied by its parent's opacity; if false , it will not be affected by the parent's opacity. |
bool forceRequestNextFrameEnabled | ( | ) | const |
Check if the requestNextFrame() is enabled.
If this method returns true
, requestNextFrame() will be called even if the view is not mapped or occluded.
true
if requestNextFrame() is forced to be called; otherwise, false
. void enableForceRequestNextFrame | ( | bool | enabled | ) | const |
Enable or disable the requestNextFrame() to be called always.
When enabled, requestNextFrame() will be called even if the view is not mapped or occluded.
enabled | true to enable requestNextFrame(); false to disable. |
Set the alpha blending function for the view.
This method sets the OpenGL blend function for the view. Refer to the documentation of glBlendFunc() for more information.
sFactor | Source factor for blending. |
dFactor | Destination factor for blending. |
Set the color factor.
This method allows you to set a color factor that influences the resulting color of every painting operation. By default, the color factor is (1.0, 1.0, 1.0, 1.0), which has no effect on the colors.
r | Value of the red component (range [0.0, 1.0]). |
g | Value of the green component (range [0.0, 1.0]). |
b | Value of the blue component (range [0.0, 1.0]). |
a | Value of the alpha component (range [0.0, 1.0]). |
const LRGBAF & colorFactor | ( | ) |
Get the color factor.
This method returns the current color factor of the view set with setColorFactor().
bool pointerIsOver | ( | ) | const |
Checks if the pointer/cursor is inside the view's input region.
false
if another view with block pointer enabled is in front.true
if the pointer/cursor is inside the input region; otherwise, false
. void enableBlockPointer | ( | bool | enabled | ) |
Enable or disable blocking of pointer or touch events to views behind the view's input region.
If set to true
, pointer or touch events will not be sent to views behind the view's input region.
enabled | true to enable blocking; false to disable. |
bool blockPointerEnabled | ( | ) | const |
Checks if blocking of pointer or touch events to views behind the view's input region is enabled.
true
if blocking is enabled; otherwise, false
. LBox boundingBox | ( | ) | const |
Get the bounding box of the view and all its mapped children.
This method returns a box containing the view and all its mapped children, even if the children are outside or clipped by the view's rect.
|
pure virtual |
Tells whether the view should be rendered.
true
if the view should be rendered without considering visible(), otherwise false
. Implemented in LTextureView, LSurfaceView, LSolidColorView, LSceneView, and LLayerView.
|
pure virtual |
Get the position of the view without any transformations applied.
Must return the position of the view in surface coordinates.
Implemented in LTextureView, LSurfaceView, LSolidColorView, LSceneView, and LLayerView.
|
pure virtual |
Get the size of the view without any transformations applied.
Must return the size of the view in surface coordinates.
Implemented in LTextureView, LSurfaceView, LSolidColorView, LSceneView, and LLayerView.
|
pure virtual |
Get the scale of the view buffer content.
This property is primarily used by views that contain a buffer like for example the LSceneView, LSurfaceView and LTextureView types.
Implemented in LTextureView, LSurfaceView, LSolidColorView, LSceneView, and LLayerView.
|
pure virtual |
Indicate that the view is visible on the given output.
This method is invoked by a LScene when the view's rect intersects an output.
output | The LOutput where the view is visible. |
Implemented in LTextureView, LSurfaceView, LSolidColorView, LSceneView, and LLayerView.
|
pure virtual |
Indicate that the view is no longer visible on the given output.
This method is invoked by a LScene when the view's rect no longer intersects an output.
output | The LOutput from which the view is no longer visible. |
Implemented in LTextureView, LSurfaceView, LSolidColorView, LSceneView, and LLayerView.
|
pure virtual |
Get a list of outputs on which the view is currently visible.
Must return a list of outputs where the view is currently visible. Use the enteredOutput() and leftOutput() methods to update the list.
Implemented in LTextureView, LSurfaceView, LSolidColorView, LSceneView, and LLayerView.
|
pure virtual |
Check if the view is itself renderable.
This property indicates whether the view is capable of rendering its content (check paintRect()). For example, all view types included in Louvre are renderable, except for LLayerView, which serves as a container for other views but does not produce any output by itself.
true
if the view is renderable; otherwise, false
. Implemented in LTextureView, LSurfaceView, LSolidColorView, LSceneView, and LLayerView.
|
pure virtual |
Notify that the view has been rendered on the given output.
This method is called by LScene and should be used to clear the previous view damage or update its content. If forceRequestNextFrameEnabled() is true
, this method is always called.
output | The LOutput on which the view is rendered. |
Implemented in LTextureView, LSurfaceView, LSolidColorView, LSceneView, and LLayerView.
|
pure virtual |
Get the region within the view rect that needs to be repainted.
The region rects are specified in surface coordinates within the view, without any scaling, clipping, or offset transformations applied. The damage may be cleared after requestNextFrame() is called. If nullptr
is returned, the entire view rect will be considered damaged. If the view has no damage, simply pass an empty LRegion (not nullptr
).
nullptr
if the entire view rect is damaged. Implemented in LTextureView, LSurfaceView, LSolidColorView, LSceneView, and LLayerView.
|
pure virtual |
Returns the translucent region within the view rectangle.
The region rects are specified in surface coordinates within the view, without any scaling, clipping, or offset transformations.
If nullptr
is returned, the entire view rect will be considered translucent.
Implemented in LTextureView, LSurfaceView, LSolidColorView, LSceneView, and LLayerView.
|
pure virtual |
Returns the opaque region within the view rectangle.
The region rects are specified in surface coordinates within the view, without any scaling, clipping, or offset transformations.
If nullptr
is returned, the inverse of the translucent region will be considered opaque.
Implemented in LTextureView, LSurfaceView, LSolidColorView, LSceneView, and LLayerView.
|
pure virtual |
Region within the view rect that can receive input events (when the inputEnabled() property is enabled).
The region rects are specified in surface coordinates within the view, without any scaling, clipping, or offset transformations.
If nullptr
is returned, the entire view rect will receive input.
Implemented in LTextureView, LSurfaceView, LSolidColorView, LSceneView, and LLayerView.
|
pure virtual |
Request to paint a rectangle of the view to the current framebuffer.
This method is used by LSceneView to request the view to paint a specified rectangular area on the current framebuffer. The painting is performed using the provided LPainter object with the specified source and destination surface coordinates, size, scaling, and alpha value.
p | The LPainter object to perform the painting. |
srcX | The source x-coordinate within the view to copy from. |
srcY | The source y-coordinate within the view to copy from. |
srcW | The width of the source area to copy from. |
srcH | The height of the source area to copy from. |
dstX | The destination x-coordinate within the output to paint on. |
dstY | The destination y-coordinate within the output to paint on. |
dstW | The width of the destination area to paint on. |
dstH | The height of the destination area to paint on. |
scale | The scaling factor to be applied during painting. |
alpha | The alpha (transparency) value to be applied during painting. |
Implemented in LTextureView, LSurfaceView, LSolidColorView, LSceneView, and LLayerView.
|
virtual |
Handle the pointer enter event within the view.
localPos | The local position of the pointer within the view. |
|
virtual |
Handle the pointer move event within the view.
This event is only called if pointerEnterEvent() was called before, and therefore when pointerIsOver() returns true
.
localPos | The local position of the pointer within the view. |
|
virtual |
Handle the pointer leave event within the view.
|
virtual |
Handle the pointer button event within the view.
This event is only called if pointerEnterEvent() was called before, and therefore when pointerIsOver() returns true
.
button | The button that triggered the event (e.g., left button, right button, etc.). |
state | The state of the button (e.g., pressed, released, etc.). |
|
virtual |
Handle the pointer axis event within the view.
This event is only called if pointerEnterEvent() was called before, and therefore when pointerIsOver() returns true
.
axisX | The x-coordinate of the axis movement. |
axisY | The y-coordinate of the axis movement. |
discreteX | The discrete x-coordinate of the axis movement. |
discreteY | The discrete y-coordinate of the axis movement. |
source | The source of the axis event (e.g., mouse wheel, touchpad, etc.). |
Handle the key modifiers event within the view.
Keyboard events are allways called, even if inputEnabled() is set to false
.
depressed | The state of the depressed key modifiers. |
latched | The state of the latched key modifiers. |
locked | The state of the locked key modifiers. |
group | The key group state. |
Handle the key event within the view.
Keyboard events are allways called, even if inputEnabled() is set to false
.
keyCode | The code of the key that triggered the event. |
keyState | The state of the key (e.g., pressed, released, etc.). |