AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
AView Class Reference

Base class of all UI objects. More...

Detailed Description

Base class of all UI objects.

A class that describes the minimum unit that can be placed in a container (including a window) that takes up some space on the screen, responds to changes in size, position, moving the cursor, pressing / releasing keys and buttons, mouse wheel, etc...

Analogue to Qt's QWidget, Android's View.

Examples
/github/workspace/aui.views/src/AUI/View/AView.h.

Public Member Functions

void redraw ()
 Request window manager to redraw this AView.
 
AWindowBasegetWindow () const
 Determines window which this AView belongs to. More...
 
virtual void drawStencilMask (ARenderContext ctx)
 
virtual void render (ARenderContext ctx)
 Draws this AView. Noone should call this function except rendering routine. More...
 
virtual void postRender (ARenderContext ctx)
 Performs post-draw routines of this AView. Noone should call this function except rendering routine. More...
 
void popStencilIfNeeded (ARenderContext ctx)
 
const AVector< AString > & getAssNames () const noexcept
 
glm::ivec2 getPosition () const noexcept
 Top left corner's position relative to top left corner's position of the parent AView.
 
glm::ivec2 getCenterPointInWindow () const noexcept
 The center point position of the view relatively to top left corner of the window. More...
 
glm::ivec2 getSize () const noexcept
 Size, including content area, border and padding.
 
glm::ivec2 getMinSize () const noexcept
 
void setMinSize (glm::ivec2 minSize) noexcept
 
virtual void markMinContentSizeInvalid ()
 
void setExtraStylesheet (_< AStylesheet > extraStylesheet)
 
void setExtraStylesheet (AStylesheet &&extraStylesheet)
 
const _< AStylesheet > & extraStylesheet () const noexcept
 
AOverflow getOverflow () const
 Determines whether display graphics that go out of the bounds of this AView or not.
 
void setOverflow (AOverflow overflow)
 
AOverflowMask getOverflowMask () const
 Controls how does the overflow (stencil) mask is produced.
 
void setOverflowMask (AOverflowMask overflow)
 
float getBorderRadius () const
 border-radius, specified in ASS.
 
void setBorderRadius (float radius)
 
int getWidth () const
 
int getHeight () const
 
int getTotalOccupiedWidth () const
 
int getTotalOccupiedHeight () const
 
glm::ivec2 getMinimumSizePlusMargin ()
 
const ABoxFieldsgetMargin ()
 Returns the margin. More...
 
void setMargin (const ABoxFields &margin)
 Sets the margin. More...
 
virtual bool consumesClick (const glm::ivec2 &pos)
 Determines whether this AView processes this click or passes it thru. More...
 
const ABoxFieldsgetPadding ()
 Returns the padding. More...
 
void setPadding (const ABoxFields &padding)
 Sets the padding. More...
 
virtual AString debugString () const
 String which helps to identify this object in debug string output (i.e., for logging)
 
int getTotalFieldHorizontal () const
 
int getTotalFieldVertical () const
 
glm::ivec2 getTotalFieldSize () const
 
AViewContainerBasegetParent () const
 Parent AView.
 
const AOptional< ACursor > & getCursor () const
 Determines shape which should pointer take when it's above this AView.
 
void setCursor (AOptional< ACursor > cursor)
 
virtual int getContentMinimumWidth ()
 
virtual int getContentMinimumHeight ()
 
glm::ivec2 getContentMinimumSize () noexcept
 
bool isContentMinimumSizeInvalidated () noexcept
 
bool hasFocus () const
 
virtual int getMinimumWidth ()
 
virtual int getMinimumHeight ()
 
glm::ivec2 getMinimumSize ()
 
void setMaxSize (const glm::ivec2 &maxSize)
 
const glm::ivec2 & getMaxSize () const
 
int getContentWidth () const
 
int getContentHeight () const
 
const glm::ivec2 & getExpanding () const
 
void setExpanding (glm::ivec2 expanding)
 Changes the expanding of view. More...
 
void setExpanding (int expanding)
 Changes the expanding of view. More...
 
void setExpanding ()
 
const _< AAnimator > & getAnimator () const
 
void setAnimator (const _< AAnimator > &animator)
 
void getTransform (glm::mat4 &transform) const
 
int getExpandingHorizontal () const
 
int getExpandingVertical () const
 
aui::float_within_0_1 getOpacity () const
 
void setOpacity (aui::float_within_0_1 opacity)
 
virtual void setPosition (glm::ivec2 position)
 
void setSizeForced (glm::ivec2 size)
 
virtual void setSize (glm::ivec2 size)
 
virtual void setGeometry (int x, int y, int width, int height)
 
void setGeometry (const glm::ivec2 &position, const glm::ivec2 &size)
 
bool isBlockClicksWhenPressed () const noexcept
 
void setBlockClicksWhenPressed (bool value) noexcept
 
const glm::ivec2 & getFixedSize ()
 Fixed size. More...
 
void setFixedSize (glm::ivec2 size)
 
bool isMouseHover () const noexcept
 
bool isPressed () const noexcept
 
bool isPressed (APointerIndex index) const noexcept
 
bool isEnabled () const noexcept
 
bool isFocused () const
 
bool isMouseEntered () const
 
Visibility getVisibility () const
 
Visibility getVisibilityRecursive () const
 
void setVisibility (Visibility visibility) noexcept
 
void setVisible (bool visible) noexcept
 
MouseCollisionPolicy getMouseCollisionPolicy () const
 
void setMouseCollisionPolicy (MouseCollisionPolicy mouseCollisionPolicy)
 
void click ()
 
void pack ()
 Sets minimal size.
 
void focus (bool needFocusChainUpdate=true)
 Requests focus for this AView. More...
 
virtual bool capturesFocus ()
 
bool hasIndirectParent (const _< AView > &v)
 Checks if the specified view is an indirect parent of this view.
 
glm::ivec2 getPositionInWindow () const
 
void addAssName (const AString &assName)
 Adds an ASS class to this AView. More...
 
void removeAssName (const AString &assName)
 Removes an ASS class to this AView. More...
 
AViewoperator<< (const AString &assName)
 
const _< AAssHelper > & getAssHelper () const
 
const ass::PropertyListRecursivegetCustomAss () const
 
void setCustomStyle (ass::PropertyListRecursive rule)
 
void ensureAssUpdated ()
 
_< AViewsharedPtr ()
 
_weak< AViewweakPtr ()
 
virtual bool onGesture (const glm::ivec2 &origin, const AGestureEvent &event)
 
virtual void onMouseEnter ()
 
virtual void onPointerMove (glm::vec2 pos, const APointerMoveEvent &event)
 Handles pointer hover events. More...
 
virtual void onMouseLeave ()
 
virtual void onDpiChanged ()
 
virtual void onPointerPressed (const APointerPressedEvent &event)
 Called on pointer (mouse) released event. More...
 
virtual void onPointerReleased (const APointerReleasedEvent &event)
 Called on pointer (mouse) released event. More...
 
virtual void onPointerDoubleClicked (const APointerPressedEvent &event)
 
virtual void onScroll (const AScrollEvent &event)
 
virtual void onKeyDown (AInput::Key key)
 
virtual void onKeyRepeat (AInput::Key key)
 
virtual void onKeyUp (AInput::Key key)
 
virtual void onFocusAcquired ()
 
virtual void onFocusLost ()
 
virtual void onCharEntered (char16_t c)
 
virtual bool handlesNonMouseNavigation ()
 
virtual void forceUpdateLayoutRecursively ()
 
virtual void setEnabled (bool enabled=true)
 
void setDisabled (bool disabled=true)
 
void updateEnableState ()
 
void enable ()
 
void disable ()
 
void operator+ (ass::PropertyListRecursive rule)
 Helper function for kAUI.h:with_style.
 
virtual void onClickPrevented ()
 Called on AWindowBase::preventClickOnPointerRelease. More...
 
virtual void invalidateAllStyles ()
 Invalidates all styles, causing to iterate over all rules in global and parent stylesheets. More...
 
void invalidateStateStyles ()
 Updates state selectors for ASS. More...
 
virtual void invalidateAssHelper ()
 Resets mAssHelper. More...
 
virtual bool wantsTouchscreenKeyboard ()
 Returns true if view is textfield-like view which requires touchscreen keyboard when clicked.
 
void setSkipUntilLayoutUpdate (bool skipUntilLayoutUpdate)
 
void setFloating (AFloat f) noexcept
 Set floating value for AText.
 
AFloat getFloating () const noexcept
 Floating value for AText.
 
- Public Member Functions inherited from AObject
_< AObjectsharedPtr ()
 
_weak< AObjectweakPtr ()
 
void clearSignals () noexcept
 
template<AAnySignal Signal, ACompatibleSlotFor< Signal > Function>
void connect (Signal &signal, Function &&function)
 
void setSignalsEnabled (bool enabled)
 
bool isSignalsEnabled () const noexcept
 
template<ASignalInvokable T>
void operator^ (T &&t)
 
_< AAbstractThreadgetThread () const
 
bool isSlotsCallsOnlyOnMyThread () const noexcept
 
void setSlotsCallsOnlyOnMyThread (bool slotsCallsOnlyOnMyThread)
 
- Public Member Functions inherited from aui::noncopyable
 noncopyable (const noncopyable &)=delete
 
noncopyableoperator= (const noncopyable &)=delete
 

Signals and public fields

emits viewGraphSubtreeChanged
 
emits< bool > hoveredState
 
emits mouseEnter
 
emits mouseLeave
 
emits< bool, APointerIndexpressedState
 
emits< APointerIndexpressed
 
emits< APointerIndexreleased
 
emits< bool > enabledState
 
emits enabled
 
emits disabled
 
emits< APointerIndexclickedButton
 Some mouse button clicked.
 
emits clicked
 Left mouse button clicked.
 
emits< glm::ivec2 > positionChanged
 Position changed.
 
emits< glm::ivec2 > sizeChanged
 Size changed.
 
emits< glm::ivec2, glm::ivec2 > geometryChanged
 Geometry (position and size) changed.
 
emits< glm::ivec2 > expandingChanged
 Expanding changed.
 
emits< Visibility > visibilityChanged
 Visibility changed.
 
emits< glm::ivec2 > scrolled
 Scroll event.
 
emits< AInput::Key > keyPressed
 Keyboard key pressed.
 
emits< AInput::Key > keyReleased
 Keyboard key released.
 
emits clickedRight
 Right mouse button clicked.
 
emits clickedRightOrLongPressed
 Right mouse button clicked or long press gesture applied.
 
emits< APointerIndexdoubleClicked
 
emits customCssPropertyChanged
 
emits< bool > focusState
 Focus state changed. More...
 
emits focusAcquired
 
emits focusLost
 
emits< _< AView > > childFocused
 

Protected Member Functions

bool transformGestureEventsToDesktop (const glm::ivec2 &origin, const AGestureEvent &event)
 Converts touch screen events to desktop. More...
 
void applyAssRule (const ass::PropertyList &propertyList)
 
void applyAssRule (const ass::PropertyListRecursive &propertyList)
 
virtual AMenuModel composeContextMenu ()
 Produce context (right click) menu. More...
 
virtual void onViewGraphSubtreeChanged ()
 Called when direct or indirect parent has changed. More...
 
virtual void markPixelDataInvalid (ARect< int > invalidArea)
 A view requests to redraw it and passes it's coords relative to this. More...
 
virtual void commitStyle ()
 
- Protected Member Functions inherited from AObject
void setThread (_< AAbstractThread > thread)
 Set thread of the object.
 

Protected Attributes

AViewContainerBasemParent = nullptr
 Parent AView.
 
std::array< ass::prop::IPropertyBase *, int(ass::prop::PropertySlot::COUNT)> mAss
 Drawing list, or baking drawing commands so that you don't have to parse the ASS every time.
 
ass::PropertyListRecursive mCustomStyleRule
 Custom ASS Rules.
 
AOptional< ACursormCursor = ACursor::DEFAULT
 Determines shape which should pointer take when it's above this AView.
 
glm::ivec2 mPosition = { 0, 0 }
 Top left corner's position relative to top left corner's position of the parent AView.
 
glm::ivec2 mSize = { 20, 20 }
 Size, including content area, border and padding.
 
glm::ivec2 mExpanding = {0, 0}
 Expansion coefficient. Hints layout manager how much this AView should be extended relative to other AViews in the same container. More...
 
AOptional< glm::ivec2 > mCachedMinContentSize
 
bool mMarkedMinContentSizeInvalid = false
 
bool mRedrawRequested = false
 Redraw requested flag for this particular view/. More...
 
glm::ivec2 mMinSize = {0, 0}
 Minimal size.
 
glm::ivec2 mMaxSize = {0x7fffffff, 0x7fffffff}
 Maximal size.
 
glm::ivec2 mFixedSize = {0, 0}
 Fixed size.
 
ABoxFields mMargin
 Margin, which defines the spacing around this AView. Processed by the layout manager.
 
ABoxFields mPadding
 Padding, which defines the spacing around content area inside the view. Processed by AView implementation.
 
AVector< AStringmAssNames
 ASS class names. More...
 
bool mSkipUntilLayoutUpdate = true
 If set to true, AViewContainer is obligated ignore this view. This value is set to false by AView::setGeometry. More...
 

Friends

class AViewContainerBase
 
class AViewContainer
 
class IRenderViewToTexture
 

Additional Inherited Members

- Static Public Member Functions inherited from AObject
static void disconnect ()
 
template<AAnySignal Signal, aui::derived_from< AObject > Object, ACompatibleSlotFor< Signal > Function>
static void connect (Signal &signal, Object *object, Function &&function)
 
template<AAnySignal Signal, aui::derived_from< AObject > Object, ACompatibleSlotFor< Signal > Function>
static void connect (Signal &signal, Object &object, Function &&function)
 
template<AAnySignal Signal, aui::derived_from< AObject > Object, ACompatibleSlotFor< Signal > Function>
static void connect (Signal &signal, _< Object > object, Function &&function)
 
static void moveToThread (aui::no_escape< AObject > object, _< AAbstractThread > thread)
 

Member Function Documentation

◆ addAssName()

void AView::addAssName ( const AString assName)

Adds an ASS class to this AView.

Parameters
assNamenew ASS name

◆ capturesFocus()

bool AView::capturesFocus ( )
virtual
Returns
Can this view capture focus.

For containers, capturing focus is redundant.

Reimplemented in ASlider, and AViewContainerBase.

◆ click()

void AView::click ( )
inline

Simulates click on the view. Useful then you want to call clicked() slots of this view.

◆ composeContextMenu()

AMenuModel AView::composeContextMenu ( )
protectedvirtual

Produce context (right click) menu.

Returns
menu model

◆ consumesClick()

bool AView::consumesClick ( const glm::ivec2 &  pos)
virtual

Determines whether this AView processes this click or passes it thru.

Parameters
posmouse position
Returns
true if AView processes this click

Used in AViewContainer::getViewAt method subset, thus affecting click event handling.

Reimplemented in AWindow, A2FingerTransformArea, AAbstractLabel, AButton, ACheckBox, ADividerView, AGridSplitter, ASpacerExpanding, ASpacerFixed, and AViewContainerBase.

◆ extraStylesheet()

const _< AStylesheet > & AView::extraStylesheet ( ) const
inlinenoexcept
See also
mExtraStylesheet

◆ focus()

void AView::focus ( bool  needFocusChainUpdate = true)

Requests focus for this AView.

Parameters
needFocusChainUpdateif true, focus chain for new focused view will be updated
Note
if needFocusChainUpdate is false you need to control focus chain targets outside the focus function

◆ getCenterPointInWindow()

glm::ivec2 AView::getCenterPointInWindow ( ) const
inlinenoexcept

The center point position of the view relatively to top left corner of the window.

Useful in UI tests:

mWindow->onPointerMove(mView->getCenterPointInWindow()); // triggers on pointer move over the view through window

◆ getContentMinimumHeight()

int AView::getContentMinimumHeight ( )
virtual

◆ getContentMinimumSize()

glm::ivec2 AView::getContentMinimumSize ( )
inlinenoexcept
Returns
minimal content-area size.

◆ getContentMinimumWidth()

int AView::getContentMinimumWidth ( )
virtual

◆ getFixedSize()

const glm::ivec2 & AView::getFixedSize ( )
inline

Fixed size.

Returns
Fixed size. {0, 0} if unspecified.

◆ getMargin()

const ABoxFields & AView::getMargin ( )
inline

Returns the margin.

Returns
margin

◆ getMaxSize()

const glm::ivec2 & AView::getMaxSize ( ) const
inline
Returns
maxSize (ignoring fixedSize)

◆ getMinimumSizePlusMargin()

glm::ivec2 AView::getMinimumSizePlusMargin ( )
inline
Returns
minimum content size plus margin.

This value is bare minimum space required for this view. It includes minimal content size + padding + margin which is exact space the view requires.

◆ getMinSize()

glm::ivec2 AView::getMinSize ( ) const
inlinenoexcept
Returns
minSize (ignoring fixedSize)

◆ getPadding()

const ABoxFields & AView::getPadding ( )
inline

Returns the padding.

Returns
padding

◆ getPositionInWindow()

glm::ivec2 AView::getPositionInWindow ( ) const
Returns
Coords of this AView relative to window

◆ getTotalFieldHorizontal()

int AView::getTotalFieldHorizontal ( ) const
inline
Returns
pixel count which this AView's margin and padding acquired by width.

◆ getTotalFieldSize()

glm::ivec2 AView::getTotalFieldSize ( ) const
inline
Returns
pixel count which this AView's margin and padding acquired.

◆ getTotalFieldVertical()

int AView::getTotalFieldVertical ( ) const
inline
Returns
pixel count which this AView's margin and padding acquired by height.

◆ getTotalOccupiedHeight()

int AView::getTotalOccupiedHeight ( ) const
inline
Returns
pixel count which this AView acquired by height including content area, padding, border and margin.

◆ getTotalOccupiedWidth()

int AView::getTotalOccupiedWidth ( ) const
inline
Returns
pixel count which this AView acquired by width including content area, padding, border and margin.

◆ getWindow()

AWindowBase * AView::getWindow ( ) const

Determines window which this AView belongs to.

Returns
window which this AView belongs to. Could be nullptr

◆ handlesNonMouseNavigation()

bool AView::handlesNonMouseNavigation ( )
virtual
Returns
true if this AView accepts tab focus

◆ invalidateAllStyles()

void AView::invalidateAllStyles ( )
virtual

Invalidates all styles, causing to iterate over all rules in global and parent stylesheets.

Unlike invalidateStateStyles(), completely resets styles for this view, causing it to iterate over all rules in global and parent stylesheets. This operation is much more expensive than invalidateStateStyles because invalidateStateStyles iterates over a small set of rules and performs fewer checks.

Prefer invalidateAllStyles over invalidateStateStyles when:

  • Added/removed rules to applicable stylesheets
  • The view is reinflated to other layout
  • Added/removed/changed ass names of this or parent views

Reimplemented in AAbstractLabel, ATextBase< WordWrappingEngine >, ATextBase< AWordWrappingEngine<> >, and AViewContainerBase.

◆ invalidateAssHelper()

void AView::invalidateAssHelper ( )
virtual

Resets mAssHelper.

Reimplemented in AViewContainerBase.

◆ invalidateStateStyles()

void AView::invalidateStateStyles ( )
inline

Updates state selectors for ASS.

Unlike invalidateAllStyles, iterates on an already calculated small set of rules which is much more cheap that invalidateAllStyles.

Prefer invalidateStateStyles over invalidateAllStyles when:

  • Changed state (hover, active, focus) of this view

◆ markPixelDataInvalid()

void AView::markPixelDataInvalid ( ARect< int >  invalidArea)
protectedvirtual

A view requests to redraw it and passes it's coords relative to this.

Parameters
invalidAreaarea to invalidate. Must be in this view's coordinate space.
Returns
A window that manages this invalidation event.

Reimplemented in AWindowBase, and AViewContainerBase.

◆ onClickPrevented()

void AView::onClickPrevented ( )
virtual

◆ onGesture()

bool AView::onGesture ( const glm::ivec2 &  origin,
const AGestureEvent &  event 
)
virtual

Handles touch screen gesture event.

Parameters
originposition where the event(s) started to occur from.
eventgesture event.
Note
The standard implementation AView::onGesture emulates desktop events such as right click and scroll.
See also
transformGestureEventsToDesktop
Returns
true, if consumed (handled). True value prevents click.

Reimplemented in AWindowBase, AScrollArea, and AViewContainerBase.

◆ onPointerMove()

void AView::onPointerMove ( glm::vec2  pos,
const APointerMoveEvent event 
)
virtual

Handles pointer hover events.

Parameters
posevent position
Note
If the view is pressed, it would still received move events. Use AView::isMouseHover to check is the pointer actually over view or not. See AView::onPointerReleased for more info.

Reimplemented in AWindow, AWindowBase, A2FingerTransformArea, ADragNDropView, AGridSplitter, ARulerArea, AScrollbarHandle, ASlider, ASplitter, ATreeView::ItemView, and AViewContainerBase.

◆ onPointerPressed()

void AView::onPointerPressed ( const APointerPressedEvent event)
virtual

◆ onPointerReleased()

void AView::onPointerReleased ( const APointerReleasedEvent event)
virtual

Called on pointer (mouse) released event.

Parameters
eventevent
Note
To handle clicks, you should use AView::clicked signal instead. View still receives pointer move and released events even if cursor goes outside the view boundaries, or other exclusive event appeared (i.e. scrollarea scroll). AView::clicked emitted only if release event occurred inside view and no other event has prevented click gesture. See APointerReleasedEvent::triggerClick.

Reimplemented in ACustomWindow, AWindowBase, A2FingerTransformArea, ADragArea::ADraggableHandle, ADropdownList, AGridSplitter, ARadioButton, AScrollArea, AScrollbarHandle, ASlider, ASplitter, and AViewContainerBase.

◆ onScroll()

void AView::onScroll ( const AScrollEvent event)
virtual

Handles mouse wheel events.

Parameters
posmouse cursor position.
deltathe distance mouse wheel scrolled.

By default, 120 is single mouse wheel click. 120 = mouse scroll down, -120 = mouse scroll up.

Reimplemented in AWindowBase, AScrollArea, AScrollbar, ATreeView, and AViewContainerBase.

◆ onViewGraphSubtreeChanged()

void AView::onViewGraphSubtreeChanged ( )
protectedvirtual

Called when direct or indirect parent has changed.

The method is mostly intended to invalidate styles in order to respond to stylesheet rules (mExtraStylesheet) of the new (in)direct parent.

Emits viewGraphSubtreeChanged signal.

Reimplemented in AViewContainerBase.

◆ postRender()

void AView::postRender ( ARenderContext  ctx)
virtual

Performs post-draw routines of this AView. Noone should call this function except rendering routine.

See also
AView::drawView

◆ removeAssName()

void AView::removeAssName ( const AString assName)

Removes an ASS class to this AView.

Parameters
assNameASS name to remove

◆ render()

void AView::render ( ARenderContext  ctx)
virtual

Draws this AView. Noone should call this function except rendering routine.

See also
AView::drawView

AView::render is not guaranteed to be called on per-frame basis. Moreover, this method can be called multiple times if render-to-texture caching decides to do so.

Reimplemented in AWindowBase, AAbstractLabel, ACircleProgressBar, ADrawableView, ADropdownList, AProgressBar, ATextBase< WordWrappingEngine >, ATextBase< AWordWrappingEngine<> >, AViewContainerBase, ARulerArea, ARulerView, and ASpinner.

◆ setExpanding() [1/2]

void AView::setExpanding ( glm::ivec2  expanding)
inline

Changes the expanding of view.

See also
Layout Managers
mExpanding
ass::Expanding

◆ setExpanding() [2/2]

void AView::setExpanding ( int  expanding)
inline

Changes the expanding of view.

See also
Layout Managers
mExpanding
ass::Expanding

◆ setExtraStylesheet() [1/2]

void AView::setExtraStylesheet ( _< AStylesheet extraStylesheet)
inline
See also
mExtraStylesheet

◆ setExtraStylesheet() [2/2]

void AView::setExtraStylesheet ( AStylesheet &&  extraStylesheet)
See also
mExtraStylesheet

◆ setMargin()

void AView::setMargin ( const ABoxFields margin)
inline

Sets the margin.

Parameters
marginmargin

◆ setPadding()

void AView::setPadding ( const ABoxFields padding)
inline

Sets the padding.

Parameters
paddingpadding

◆ setSizeForced()

void AView::setSizeForced ( glm::ivec2  size)
inline

Set size ignoring all restrictions (i.e. min size, max size, fixed size, etc...). Used by AAnimator.

Parameters
size

◆ setSkipUntilLayoutUpdate()

void AView::setSkipUntilLayoutUpdate ( bool  skipUntilLayoutUpdate)
inline

◆ transformGestureEventsToDesktop()

bool AView::transformGestureEventsToDesktop ( const glm::ivec2 &  origin,
const AGestureEvent &  event 
)
protected

Converts touch screen events to desktop.

Parameters
originposition where the event(s) started to occur from.
eventgesture event.
Returns
true if consumed (handled).
AFingerDragEvent
Emulates mouse wheel scroll
ALongPressEvent
Shows context menu (if exists) or AView::clickedRightOrLongPressed

Member Data Documentation

◆ focusState

emits<bool> AView::focusState

Focus state changed.

Parameters
firstwhether focused or not.

◆ mAssNames

AVector<AString> AView::mAssNames
protected

ASS class names.

Needs keeping order.

◆ mExpanding

glm::ivec2 AView::mExpanding = {0, 0}
protected

Expansion coefficient. Hints layout manager how much this AView should be extended relative to other AViews in the same container.

It does affect expanding environment inside the container. See expanding layout managers for more info.

It does not affect parent's size or parent's expanding property. Use AView::setExpanding() on parent, or ::Expanding variant of declarative container notation (Vertical::Expanding, Horizontal::Expanding, Stacked::Expanding) for such case.

◆ mRedrawRequested

bool AView::mRedrawRequested = false
protected

Redraw requested flag for this particular view/.

This flag is set in redraw() method and reset in AView::render(ARenderContext context). redraw() method does not actually requests redraw of window if mRedrawRequested. This approach ignores sequential redraw() calls if the view is not even drawn.

◆ mSkipUntilLayoutUpdate

bool AView::mSkipUntilLayoutUpdate = true
protected

If set to true, AViewContainer is obligated ignore this view. This value is set to false by AView::setGeometry.

This flag addresses the issue when some container is filled with views by addView during several frames, causing to draw them in wrong place (then their layout is not processed yet).

◆ viewGraphSubtreeChanged

emits AView::viewGraphSubtreeChanged

#include <AUI/View/AView.h>


The documentation for this class was generated from the following files:
Inheritance diagram for AView:
Collaboration diagram for AView: