AView#
Base class of all UI objects.
| Header: | #include <AUI/View/AView.h> |
| CMake: | aui_link(my_target PUBLIC aui::views) |
Detailed Description#
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.
Every view has a position and size. Also, almost every view has parent, in exception to toplevel view, AWindow. Parent view is AViewContainerBase which is responsible for layout of all views inside.
Examples#
examples/7guis/cells/src/main.cpp
7GUIs Cells — Spreadsheet processor (Excel).
Spreadsheet spreadsheet{glm::uvec2 { 'Z' - 'A' + 1, 100 }};
AProperty<AString> currentExpression;
};
static _<AView> labelTitle(AString s) {
return _new<ALabel>(std::move(s)) AUI_OVERRIDE_STYLE {
Opacity { 0.5f },
ATextAlign::CENTER,
};
}
examples/app/minesweeper/src/Style.cpp
Minesweeper Game — Minesweeper game implementation driven by ass.
examples/app/fractal/src/FractalView.cpp
Fractal Example — Fractal viewer application demonstrating usage of custom shaders.
mTexture->tex2D(*AImage::fromUrl(":img/color_scheme_wikipedia.png"));
}
void FractalView::render(ARenderContext context) {
AView::render(context);
mShader.use();
mTexture->bind();
context.render.rectangle(ACustomShaderBrush {}, { 0, 0 }, getSize());
}
examples/app/notes/src/main.cpp
Notes App — Note taking app that demonstrates usage of AListModel, AProperty, user data saving and loading.
examples/ui/contacts/src/main.cpp
AUI Contacts — Usage of AUI_DECLARATIVE_FOR to make a contacts-like application.
mContacts.writeScope()->removeFirst(mSelectedContact);
mSelectedContact = nullptr;
}
_<AView> indexedList() {
return AUI_DECLARATIVE_FOR(group, *mContacts | ranges::views::chunk_by([](const _<Contact>& lhs, const _<Contact>& rhs) {
return groupLetter(lhs->displayName) == groupLetter(rhs->displayName);
}), AVerticalLayout) {
auto firstContact = *ranges::begin(group);
auto firstLetter = groupLetter(firstContact->displayName);
examples/ui/backdrop/src/main.cpp
Backdrop — Backdrop effects demo.
using namespace declarative;
using namespace ass;
static auto headerWithContents(_<AView> content) {
auto result = Stacked {
AScrollArea::Builder().withContents(content).build() AUI_OVERRIDE_STYLE {
Expanding(),
Padding { 80_dp, 0, 0 },
} AUI_LET { it->setExtraStylesheet(
examples/ui/views/src/ExampleWindow.cpp
Views Example — All-in-one views building example.
}
};
/// [label_coloring]
static _<AView> link(const AString& url) {
return Label { url } AUI_OVERRIDE_STYLE {
TextColor { AColor::BLUE },
BorderBottom { 1_px, AColor::BLUE },
ACursor::POINTER,
} AUI_LET { AObject::connect(it->clicked, AObject::GENERIC_OBSERVER, [url] { APlatform::openUrl(url); }); };
examples/ui/infinite_lazy_list/src/main.cpp
Infinite Lazy List — Usage of AUI_DECLARATIVE_FOR to make an infinite lazy list.
AProperty<bool> needMore = false;
AAsyncHolder asyncTasks;
};
_<AView> myLazyList(_<State> state) {
// note that we observe for transition to true here, not the current state of property
// see PropertyTest_Observing_changes for more info
AObject::connect(state->needMore.changed, AObject::GENERIC_OBSERVER, [state](bool newState){
if (!newState) { // we're interested in transitions to true state only.
return;
examples/7guis/crud/src/main.cpp
7GUIs CRUD — Create/Read/Update/Delete example.
/// [crud_form]
},
} AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } },
Horizontal {
Button { Label { "Create" }, {me::createClicked} } & mCreateEnabled > &AView::setEnabled,
Button { Label { "Update" }, {me::updateClicked} } & mUpdateEnabled > &AView::setEnabled,
Button { Label { "Delete" }, {me::deleteClicked} } & mDeleteEnabled > &AView::setEnabled,
} AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } },
} AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } });
}
examples/app/minesweeper/src/CellView.cpp
Minesweeper Game — Minesweeper game implementation driven by ass.
void CellView::render(ARenderContext context) {
if (mCell != mCellValueCopy) {
mCellValueCopy = mCell;
}
AView::render(context);
if (bool(mCell & FieldCell::OPEN)) {
int count = field_cell::getBombCountAround(mCell);
if (count) {
AFontStyle fs;
examples/app/minesweeper/src/CellView.h
Minesweeper Game — Minesweeper game implementation driven by ass.
#pragma once
#include "FieldCell.h"
#include "AUI/View/AView.h"
class CellView : public AView {
public:
CellView(FieldCell& cell);
void render(ARenderContext context) override;
examples/app/fractal/src/FractalView.h
Fractal Example — Fractal viewer application demonstrating usage of custom shaders.
examples/ui/minimal_ui_assets_xmake/src/MainWindow.cpp
Minimal UI Template XMake with Assets — Minimal UI boilerplate template XMake with AUI Assets.
Centered{
Vertical{
Centered { Icon { ":img/logo.svg" } AUI_OVERRIDE_STYLE { FixedSize(64_dp) } },
Centered { Label { "Hello world from AUI!" } },
_new<AButton>("Visit GitHub repo").connect(&AView::clicked, this, [] {
APlatform::openUrl("https://github.com/aui-framework/aui");
}),
_new<AButton>("Visit docs").connect(&AView::clicked, this, [] {
APlatform::openUrl("https://aui-framework.github.io/");
}),
examples/ui/minimal_ui_xmake/src/MainWindow.cpp
Minimal UI Template XMake — Minimal UI boilerplate template XMake.
setContents(
Centered{
Vertical{
Centered { Label { "Hello world from AUI!" } },
_new<AButton>("Visit GitHub repo").connect(&AView::clicked, this, [] {
APlatform::openUrl("https://github.com/aui-framework/aui");
}),
_new<AButton>("Visit docs").connect(&AView::clicked, this, [] {
APlatform::openUrl("https://aui-framework.github.io/");
}),
examples/ui/contacts/src/view/common.cpp
AUI Contacts — Usage of AUI_DECLARATIVE_FOR to make a contacts-like application.
using namespace ass;
using namespace declarative;
_<AView> common_views::divider() {
return _new<AView>() AUI_OVERRIDE_STYLE { FixedSize { {}, 1_px }, BackgroundSolid { AColor::GRAY } };
}
examples/ui/contacts/src/view/ContactDetailsView.cpp
AUI Contacts — Usage of AUI_DECLARATIVE_FOR to make a contacts-like application.
static constexpr auto EDITOR_CONTENT_MAX_WIDTH = 400_dp;
namespace {
_<AView> profilePhoto(const _<Contact>& contact) {
return Centered {
Label {
AUI_REACT(contact->displayName->empty() ? "?" : AString(1, contact->displayName->first()).uppercase())
} AUI_OVERRIDE_STYLE { Opacity(0.5f), FontSize { 32_dp } },
} AUI_OVERRIDE_STYLE {
examples/ui/contacts/src/view/ContactDetailsView.h
AUI Contacts — Usage of AUI_DECLARATIVE_FOR to make a contacts-like application.
examples/ui/contacts/src/view/common.h
AUI Contacts — Usage of AUI_DECLARATIVE_FOR to make a contacts-like application.
examples/ui/views/src/DemoGraphView.h
Views Example — All-in-one views building example.
#include "AUI/View/AView.h"
class DemoGraphView: public AView {
public:
DemoGraphView();
void render(ARenderContext ctx) override;
examples/ui/views/src/DemoGraphView.cpp
Views Example — All-in-one views building example.
}
}
void DemoGraphView::render(ARenderContext ctx) {
AView::render(ctx);
ctx.render.lines(ASolidBrush{0xff0000_rgb }, mPoints, ABorderStyle::Dashed{}, 4_dp);
}
Public fields and Signals#
clicked#
emits<> clicked
Left mouse button clicked.
Examples#
clickedButton#
emits<APointerIndex> clickedButton
Some mouse button clicked.
clickedRight#
emits<> clickedRight
Right mouse button clicked.
clickedRightOrLongPressed#
emits<> clickedRightOrLongPressed
Right mouse button clicked or long press gesture applied.
focusState#
emits<bool> focusState
Focus state changed.
first whether focused or not.
geometryChanged#
emits<glm::ivec2,glm::ivec2> geometryChanged
Geometry (position and size) changed.
keyPressed#
emits<AInput::Key> keyPressed
Keyboard key pressed.
keyReleased#
emits<AInput::Key> keyReleased
Keyboard key released.
mAss#
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.
mCursor#
Determines shape which should pointer take when it's above this AView.
mCustomStyleRule#
ass::PropertyListRecursive mCustomStyleRule
Custom ASS Rules
mParent#
AViewContainerBase* mParent
Parent AView.
mPosition#
glm::ivec2 mPosition
Top left corner's position relative to top left corner's position of the parent AView.
redrawn#
emits<> redrawn
View is painted onto the some surface.
This signal is emitted when view's AView::postRender() is called. This signal can be used to keep track if view is visible; however, AUI performs some optimizations when painting views. For example, a view located somewhere in AScrollArea is not painted until it is outside of AScrollArea's frame or at least barely reaches it.
scrolled#
emits<glm::ivec2> scrolled
Scroll event.
viewGraphSubtreeChanged#
emits<> viewGraphSubtreeChanged
onViewGraphSubtreeChanged()
Public Methods#
addAssName#
void AView::addAssName(const AString& assName)
Adds an ASS class to this AView.
- Arguments
assNamenew ASS name
capturesFocus#
- Returns
- Can this view capture focus.
For containers, capturing focus is redundant.
click#
Simulates click on the view. Useful then you want to call clicked() slots of this view.
Examples:
computeMinMaxAxis#
Returns cached min/max width for the given height.
- Arguments
heightouter height (including padding), or -1 for unconstrained.- Returns
- Outer (including padding) min/max width.
Applies padding and fixed/min/max size around onComputeIntrinsicMinMaxAxis(). Does not require a preceding layout pass. The result is cached until AView::requestLayout.
Override AView::onComputeIntrinsicMinMaxAxis, not this function.
consumesClick#
Determines whether this AView processes this click or passes it thru.
- Arguments
posmouse position- Returns
- true if AView processes this click
Used in AViewContainer::getViewAt method subset, thus affecting click event handling.
debugInspectorInfo#
Produces debug inspector information for this view.
Exposes view's state (position, size, visibility, etc.) to debugging/inspection tooling (e.g. devtools, ViewPropertiesView). Override in subclasses to expose additional properties; typically you should append to the result of AView::debugInspectorInfo().
debugString#
virtual AString AView::debugString()
String which helps to identify this object in debug string output (i.e., for logging)
enabled#
Whether view is enabled (i.e., reacts to user).
Examples:
expanding#
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.
extraStylesheet#
focus#
Requests focus for this AView.
- Arguments
needFocusChainUpdateif true, focus chain for new focused view will be updated
If needFocusChainUpdate is false you need to control focus chain targets outside the focus function
Examples:
examples/7guis/temperature_converter/src/main.cpp
7GUIs Temperature Converter — Fahrenheit to Celsius and vice versa.
examples/app/fractal/src/FractalWindow.cpp
Fractal Example — Fractal viewer application demonstrating usage of custom shaders.
},
} AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } },
} AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } });
fractal->focus();
}
getBorderRadius#
border-radius, specified in ASS.
getCenterPointInWindow#
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
getContentSize#
- Returns
- content size
getCursor#
Determines shape which should pointer take when it's above this AView.
getFixedSize#
Fixed size.
- Returns
- Fixed size. {0, 0} if unspecified.
getFloating#
AFloat AView::getFloating()
Floating value for AText.
getMargin#
const ABoxFields& AView::getMargin()
Returns the margin.
- Returns
- margin
getMaxSize#
- Returns
- maxSize (ignoring fixedSize)
getMinSize#
- Returns
- minSize (ignoring fixedSize)
getMinimumSizePlusMargin#
- 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.
getOverflow#
AOverflow AView::getOverflow()
Determines whether display graphics that go out of the bounds of this AView or not.
getOverflowMask#
AOverflowMask AView::getOverflowMask()
Controls how does the overflow (stencil) mask is produced.
getPadding#
const ABoxFields& AView::getPadding()
Returns the padding.
- Returns
- padding
getParent#
AViewContainerBase* AView::getParent()
Parent AView.
getPosition#
Top left corner's position relative to top left corner's position of the parent AView.
getPositionInWindow#
- Returns
- Coords of this AView relative to window
Examples:
examples/ui/embedded_sdl/src/main.cpp
SDL3 — This code demonstrates how to integrate the AUI Framework with SDL3 to create a window with OpenGL rendering.
setCustomDpiRatio(SDL_GetWindowDisplayScale(sdl_window));
connect(getWindow()->touchscreenKeyboardShown, this, [this] {
glm::ivec2 pos = getWindow()->getFocusedView()->getPositionInWindow();
glm::ivec2 size = getWindow()->getFocusedView()->getSize();
SDL_Rect rect;
rect.x = pos.x;
rect.y = pos.y;
rect.w = size.x;
getSize#
Size, including content area, border and padding.
Examples:
examples/app/game_of_life/src/main.cpp
Game of Life — Game of Life implementation that uses advanced large dynamic data rendering techniques such as ITexture, AImage to be GPU friendly. The computation is performed in AThreadPool.
}
auto drawGrid = [&] {
ASmallVector<std::pair<glm::vec2, glm::vec2>, 128 * 2> points;
for (int i = 1; i < mCells->size().x; ++i) {
points << std::make_pair(glm::vec2(i * SCALE, 0.f), glm::vec2(i * SCALE, getSize().y));
}
for (int i = 1; i < mCells->size().y; ++i) {
points << std::make_pair(glm::vec2(0.f, i * SCALE), glm::vec2(getSize().x, i * SCALE));
}
ctx.render.lines(ASolidBrush { AColor::GRAY }, points);
getTotalFieldHorizontal#
- Returns
- pixel count which this AView's margin and padding acquired by width.
getTotalFieldSize#
- Returns
- pixel count which this AView's margin and padding acquired.
getTotalFieldVertical#
- Returns
- pixel count which this AView's margin and padding acquired by height.
getTotalOccupiedHeight#
- Returns
- pixel count which this AView acquired by height including content area, padding, border and margin.
getTotalOccupiedWidth#
- Returns
- pixel count which this AView acquired by width including content area, padding, border and margin.
getWindow#
ASurface* AView::getWindow()
Determines window which this AView belongs to.
- Returns
- window which this AView belongs to. Could be nullptr
Examples:
handlesNonMouseNavigation#
- Returns
- true if this AView accepts tab focus
hasIndirectParent#
Checks if the specified view is an indirect parent of this view.
invalidateAllStyles#
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
invalidateAssHelper#
Resets mAssHelper.
invalidateStateStyles#
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
isLayoutBoundary#
Whether a layout request from inside this view can be resolved without laying out the parent.
A view whose size is fixed on both axes occupies exactly the same space no matter what happens inside it, so everything above it in the view hierarchy keeps the geometry it already has. Such a view is a layout boundary: AView::requestLayout stops here instead of travelling up to the surface, and the surface lays this view out on its own (@see ASurface::enqueueLayoutRoot).
Whenever something the parent's layout does depend on changes — fixed size, min/max size, margin, expanding, visibility — AView::markLayoutContributionChanged lifts the boundary for one request, so the parent finds out.
layout#
Performs layout with a position and size of the view.
- Arguments
x,yposition relative to the parent.w,hsize, subject to fixed/max size restrictions (@see AView::setSize).
Sets position and size, then calls AView::onLayout (which positions children of containers), and finally clears AView::mSkipUntilLayoutUpdate. Does nothing if neither position, size nor layout request changed.
This is the only place that clears AView::mSkipUntilLayoutUpdate; AView::setPosition and AView::setSize do not. A view which is positioned by hand (i.e., not by a layout manager of its parent), e.g., rendered manually or attached to something outside the regular view hierarchy, must be placed with layout() otherwise it (and all its children, as AView::setSize does not lay them out) stays hidden:
auto size = view->measure(AConstraints {});
view->layout(pos, size);
See ALayout and layout-managers for more info.
markLayoutContributionChanged#
Marks that the space this view occupies in its parent changed, so the parent has to lay out again.
To be called instead of AView::requestLayout by anything that changes fixed size, min/max size, margin, expanding or visibility of this view — the values the parent's layout manager reads from us.
measure#
glm::ivec2 AView::measure(AConstraints constraints)
Returns the preferred outer size of this view under the given constraints.
- Arguments
constraintsinline (width) / block (height) limits; -1 as a maximum means "unlimited".- Returns
- Outer size, including padding (but not margin), in pixels.
Applies padding and fixed/min/max size (ass::FixedSize, ass::MinSize, ass::MaxSize) around AView::onIntrinsicMeasure(). If both axes of the fixed size are set, it is returned right away.
Does not require a preceding layout pass, unlike AView::getSize() which is {0, 0} until the first
AView::layout. It is therefore safe to call right after AView::addView or on a view that is not attached to any
container at all. The result is cached until AView::requestLayout.
Override AView::onIntrinsicMeasure, not this function. See ALayout for the measure/layout pipeline.
auto size = view->measure(AConstraints {}); // unconstrained
auto wrapped = view->measure({ .maxInline = 200 }); // at most 200px wide
auto exactWidth = view->measure(AConstraints::fixedInline(200)); // exactly 200px wide
Note
Measurement must have no side effects on the geometry (see AView::onIntrinsicMeasure).
onClickPrevented#
Called on ASurface::preventClickOnPointerRelease.
onGesture#
- Arguments
originposition where the event(s) started to occur from.eventgesture event.- Returns
- true, if consumed (handled). True value prevents click.
Handles touch screen gesture event.
The standard implementation AView::onGesture emulates desktop events such as right click
and scroll.
onPointerMove#
virtual void AView::onPointerMove(glm::vec2 pos, const APointerMoveEvent& event)
Handles pointer hover events
- Arguments
posevent positioneventevent description
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.
Examples:
examples/7guis/circle_drawer/src/main.cpp
7GUIs Circle Drawer — Undo, redo, dialog control.
}
/// [custom_render]
void onPointerMove(glm::vec2 pos, const APointerMoveEvent& event) override {
AView::onPointerMove(pos, event);
mHoveredCircle = [&] {
Circle* result = nullptr;
float nearestDistanceToCursor = std::numeric_limits<float>::max();
for (auto& circle : mState->circles.raw) {
float distanceToCursor = glm::distance2(circle.position, pos);
onPointerPressed#
virtual void AView::onPointerPressed(const APointerPressedEvent& event)
Called on pointer (mouse) released event.
- Arguments
eventevent
Examples:
onPointerReleased#
virtual void AView::onPointerReleased(const APointerReleasedEvent& event)
Called on pointer (mouse) released event.
- Arguments
eventevent
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.
Examples:
onScroll#
virtual void AView::onScroll(const AScrollEvent& event)
- Arguments
eventevent info.
Handles mouse wheel events.
Examples:
pack#
Sets minimal size.
Examples:
examples/app/minesweeper/src/MinesweeperWindow.cpp
Minesweeper Game — Minesweeper game implementation driven by ass.
examples/app/minesweeper/src/NewGameWindow.cpp
Minesweeper Game — Minesweeper game implementation driven by ass.
connect(mHeight->valueChanging, me::updateMinesMax);
connect(mHeight->valueChanging, me::updateDifficultyLabel);
connect(mMines->valueChanging, me::updateDifficultyLabel);
pack();
}
void NewGameWindow::begin() {
close();
mMinesweeper->beginGame(gWidth = mWidth->getValue(), gHeight = mHeight->getValue(), gMines = mMines->getValue());
examples/app/fractal/src/JumpToCoordsWindow.cpp
Fractal Example — Fractal viewer application demonstrating usage of custom shaders.
_new<AButton>("Cancel").connect(&AButton::clicked, me::close),
} AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } },
} AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } });
pack();
}
position#
Top left corner's position relative to top left corner's position of the parent AView.
postRender#
virtual void AView::postRender(ARenderContext ctx)
Performs post-draw routines of this AView. Noone should call this function except rendering routine.
redraw#
Request window manager to redraw this AView.
Examples:
examples/ui/opengl_simple/src/main.cpp
OpenGL Example — Demonstrates how to integrate custom OpenGL rendering with AUI Framework.
removeAssName#
void AView::removeAssName(const AString& assName)
Removes an ASS class to this AView.
- Arguments
assNameASS name to remove
render#
virtual void AView::render(ARenderContext ctx)
Draws this AView. Noone should call this function except rendering routine.
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.
Examples:
requestLayout#
Marks this view it requires a layout update.
See ALayout and layout-managers for more info.
setAssName#
void AView::setAssName(const AString& assName, bool value)
Depending on value, either adds or removes ass name.
- Arguments
assNameASS name to add or removevalueboolean that determines actual operation
Examples:
setExpanding#
Changes the expanding of view.
Examples:
Changes the expanding of view.
Examples:
setExtraStylesheet#
Examples:
Examples:
setFloating#
void AView::setFloating(AFloat f)
Set floating value for AText.
setMargin#
void AView::setMargin(const ABoxFields& margin)
Sets the margin.
- Arguments
marginmargin
setPadding#
void AView::setPadding(const ABoxFields& padding)
Sets the padding.
- Arguments
paddingpadding
setSizeForced#
- Arguments
size
Set size ignoring all restrictions (i.e. min size, max size, fixed size, etc...). Used by AAnimator.
setSkipUntilLayoutUpdate#
size#
Size, including content area, border and padding.
Examples:
examples/7guis/cells/src/Spreadsheet.h
7GUIs Cells — Spreadsheet processor (Excel).
examples/7guis/cells/src/Functions.cpp
7GUIs Cells — Spreadsheet processor (Excel).
return double(accumulator);
} },
{ "IF",
[](Ctx ctx) {
if (ctx.args.size() != 3) {
throw AException("ARG");
}
auto condition = std::get_if<double>(&ctx.args[0]);
if (condition == nullptr) {
throw AException("ARG0");
visibility#
Visibility value.
wantsTouchscreenKeyboard#
Returns true if view is textfield-like view which requires touchscreen keyboard when clicked.