> All members, including inherited
◆ applyGeometryToChildren()
void AWindowBase::applyGeometryToChildren |
( |
| ) |
|
|
overridevirtual |
◆ blockUserInput()
virtual void AWindowBase::blockUserInput |
( |
bool | blockUserInput = true | ) |
|
|
virtual |
- Parameters
-
blockUserInput | whether block user input or not. |
Visually nothing changes, but when the user tries to interact with the window, nothing happens with the window and on some platforms a system sound played notifying the user that the window is blocked.
It is userful when you open a modal window and you want the user to complete the action in the modal window first in order to continue interacting with the parent window.
- Note
- When displaying a modal dialog and has blocked the parent window, the application must unblock the parent window before the modal dialog destroyed, otherwise, another window will receive the keyboard focus and be activated.
Reimplemented in AWindow.
◆ createOverlappingSurface() [1/2]
_< AOverlappingSurface > AWindowBase::createOverlappingSurface |
( |
const glm::ivec2 & | position, |
|
|
const glm::ivec2 & | size, |
|
|
bool | closeOnClick = true ) |
|
inline |
Creates a surface used for context menus and combo boxes. Closure of the surface is controlled by closeOnClick
param but can be closed manually by calling closeOverlappingSurface.
- Parameters
-
position | position where does the surface should be created. It's not exact the top left corner of the surface but a hint (i.e. if the surface does not fit) |
size | size |
closeOnClick | when true, overlapped surface is automatically closed when mouse clicked. It's usable for dropdown and context menus. |
- Returns
- a new surface.
});
surfaceContainer->pack();
static void inflate(aui::no_escape< AViewContainer > root, const _< AView > &view)
Wraps view with root using Stacked layout and expanding.
_< AOverlappingSurface > createOverlappingSurface(const glm::ivec2 &position, const glm::ivec2 &size, bool closeOnClick=true)
Definition AWindowBase.h:236
static AWindowBase * current()
Button
Specifies button(s) to be displayed.
Definition AMessageBox.h:79
To create overlapping surface below some view
, use AView::getPositionInWindow:
◆ createOverlappingSurface() [2/2]
_< AOverlappingSurface > AWindowBase::createOverlappingSurface |
( |
const std::function< AOptional< glm::ivec2 >(unsigned)> & | positionFactory, |
|
|
const glm::ivec2 & | size, |
|
|
bool | closeOnClick = true ) |
|
inline |
Create a surface used for context menus and combo boxes. Closure of the surface is controlled by closeOnClick
param but can be closed manually by calling closeOverlappingSurface.
- Parameters
-
positionFactory | a function that return position where does the surface should be created. If the surface does not fit, the function is called again with previous arg+1. |
size | size |
closeOnClick | when true, overlapped surface is automatically closed when mouse clicked. It's usable for dropdown and context menus. |
- Returns
- a new surface.
◆ createOverlappingSurfaceImpl()
virtual _< AOverlappingSurface > AWindowBase::createOverlappingSurfaceImpl |
( |
const glm::ivec2 & | position, |
|
|
const glm::ivec2 & | size ) |
|
protectedpure virtual |
◆ forceUpdateCursor()
virtual void AWindowBase::forceUpdateCursor |
( |
| ) |
|
|
virtual |
◆ frameMillis()
virtual unsigned AWindowBase::frameMillis |
( |
| ) |
const |
|
nodiscardpure virtualnoexcept |
Returns previous frame's rendering duration in millis, including native rendering preparation and buffer swapping. The value does not include the elapsed time between frames.
The value is updated after native buffer swap.
Implemented in AWindow.
◆ getDpiRatio()
float AWindowBase::getDpiRatio |
( |
| ) |
|
|
inline |
- See also
- ScalingParams, scaling params affects dpi ratio
- Note
- dpi ratio value is rounded to 0.25
◆ getFps()
size_t AWindowBase::getFps |
( |
| ) |
|
|
inline |
- Note
- FPS is captured every second
- Returns
- Last captured FPS
◆ isPreventingClickOnPointerRelease()
bool AWindowBase::isPreventingClickOnPointerRelease |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ markMinContentSizeInvalid()
void AWindowBase::markMinContentSizeInvalid |
( |
| ) |
|
|
overridevirtual |
◆ markPixelDataInvalid()
void AWindowBase::markPixelDataInvalid |
( |
ARect< int > | invalidArea | ) |
|
|
overrideprotectedvirtual |
- Parameters
-
invalidArea | area to invalidate. Must be in this view's coordinate space. |
Reimplemented from AViewContainerBase.
◆ onDragEnter()
- Parameters
-
- Returns
- true, if the application accepts the contents of the event, false otherwise.
This event handler decides does the application accepts the supplied data. If true, the data supplied to the onDragDrop() method will be the same.
onDragLeave() method will be called even if the application rejects the event.
It's guaranteed that onDragDrop method will not be called when onDragEnter rejects the same data.
- Examples
- examples/ui/views/src/ExampleWindow.h.
◆ onFocusLost()
void AWindowBase::onFocusLost |
( |
| ) |
|
|
overridevirtual |
Reimplemented from AView.
◆ onGesture()
bool AWindowBase::onGesture |
( |
const glm::ivec2 & | origin, |
|
|
const AGestureEvent & | event ) |
|
overridevirtual |
Handles touch screen gesture event.
- Parameters
-
origin | position where the event(s) started to occur from. |
event | gesture 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 from AViewContainerBase.
◆ onKeyDown()
void AWindowBase::onKeyDown |
( |
AInput::Key | key | ) |
|
|
overridevirtual |
◆ onPointerMove()
- Parameters
-
pos | event position |
event | event description |
- 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 from AViewContainerBase.
◆ onPointerPressed()
◆ onPointerReleased()
- Parameters
-
- 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 from AViewContainerBase.
◆ onScroll()
◆ preventClickOnPointerRelease()
void AWindowBase::preventClickOnPointerRelease |
( |
| ) |
|
◆ render()
- 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 from AViewContainerBase.
◆ setScalingParams()
◆ shouldDisplayHoverAnimations()
bool AWindowBase::shouldDisplayHoverAnimations |
( |
| ) |
const |
- Returns
- false when any keyboard button is pressed
◆ mPreventClickOnPointerRelease
AOptional<bool> AWindowBase::mPreventClickOnPointerRelease |
|
protected |