class
ASearchBox
- Module
- Arc
- Header
#include "Arc/Widgets/ASearchBox.h"- Namespace
Arcf
Properties
| Type | Name | Description |
|---|---|---|
ArcDelegate<void(const std::string&)> | OnTextChanged | Every edit, immediately. |
ArcDelegate<void(const std::string&)> | OnFilterChanged | The query to filter by: 150 ms after the last keystroke, and at once when the text is cleared or set from code. |
static constexpr int32_t | kFilterDebounceMs | Default 150. |
Public functions
| Returns | Name | Description |
|---|---|---|
ARC_WIDGET_ARGS | ||
WidgetArgsType& | DrawBorder | |
ARC_ARG | ||
void | SetText | |
const std::string& | GetText | |
std::string | GetSelectedText | |
int32_t | GetCursorPosition | |
void | ClearText | |
void | SelectWordAt | What a double-click selects: the UAX #29 word, punctuation run or whitespace run under the byte, as the single-line box picks it. |
void | FlushFilter | Fires a pending OnFilterChanged now (Enter, a test). |
bool | IsFilterPending | |
void | SetHasError | |
bool | HasError | |
EFocusVisual | GetFocusVisual | |
ArcVec2 | ComputeDesiredSize | |
int32_t | OnPaint | |
CReply | OnMouseButtonDown | |
CReply | OnMouseMove | |
CReply | OnMouseButtonUp | |
CReply | OnKeyChar | |
CReply | OnKeyDown | |
void | OnFocusReceived | |
void | OnFocusLost | |
bool | CanCacheDesiredSize | A fixed field sized off its font; the query text scrolls inside it. |
bool | CanRetainPaint | Refused: it hosts an editable field, caret and all. |
const char* | GetTypeName | |
EAccessibleRole | GetAccessibleRole | |
std::string | GetAccessibleValue | |
bool | IsTextInput | |
bool | IsFocusable | |
bool | WantsTextInput |
Function details
ARC_WIDGET_ARGS
C++
ARC_WIDGET_ARGS(ASearchBox) ARC_ATTR(CText, HintText) ARC_ATTR(ArcColor, BackgroundColor) ARC_ATTR(ArcColor, TextColor) ARC_ARG(CArcFontInfo, Font) bool _DrawBorder = trueDrawBorder
C++
WidgetArgsType& DrawBorder(bool value)ARC_ARG
C++
ARC_ARG(std::string, ShortcutHint) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)SetText
C++
void SetText(const std::string& text)GetText
C++
const std::string& GetText() constGetSelectedText
C++
std::string GetSelectedText() constGetCursorPosition
C++
int32_t GetCursorPosition() constClearText
C++
void ClearText()SelectWordAt
C++
void SelectWordAt(int32_t byte)What a double-click selects: the UAX #29 word, punctuation run or whitespace run under the byte, as the single-line box picks it.
FlushFilter
C++
void FlushFilter()Fires a pending OnFilterChanged now (Enter, a test).
IsFilterPending
C++
bool IsFilterPending() constSetHasError
C++
void SetHasError(bool hasError)HasError
C++
bool HasError() constGetFocusVisual
C++
EFocusVisual GetFocusVisual() const overrideComputeDesiredSize
C++
ArcVec2 ComputeDesiredSize(float scale) const overrideOnPaint
C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const overrideOnMouseButtonDown
C++
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseMove
C++
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseButtonUp
C++
CReply OnMouseButtonUp(const CGeometry& geo, const CPointerEvent& event) overrideOnKeyChar
C++
CReply OnKeyChar(const CGeometry& geo, const CCharacterEvent& event) overrideOnKeyDown
C++
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) overrideOnFocusReceived
C++
void OnFocusReceived(const CFocusEvent& event) overrideOnFocusLost
C++
void OnFocusLost(const CFocusEvent& event) overrideCanCacheDesiredSize
C++
bool CanCacheDesiredSize() const overrideA fixed field sized off its font; the query text scrolls inside it.
CanRetainPaint
C++
bool CanRetainPaint() const overrideRefused: it hosts an editable field, caret and all.
GetTypeName
C++
const char* GetTypeName() const overrideGetAccessibleRole
C++
EAccessibleRole GetAccessibleRole() const overrideGetAccessibleValue
C++
std::string GetAccessibleValue() const overrideIsTextInput
C++
bool IsTextInput() const overrideIsFocusable
C++
bool IsFocusable() const overrideWantsTextInput
C++
bool WantsTextInput(bool& outPassword) const overrideGenerated from Arc/Widgets/ASearchBox.h via arc.json · Nov 5, 2026Version 1.0.0