AEmptyState
- Module
- Arc
- Header
#include "Arc/Widgets/AEmptyState.h"- Namespace
Arcf
Properties
| Type | Name | Description |
|---|---|---|
static constexpr float | kSidePadding | Default 16.0f. |
ArcDelegate<void()> | OnAction | |
ArcDelegate<void()> | OnLink |
Public functions
| Returns | Name | Description |
|---|---|---|
ARC_WIDGET_ARGS | ||
void | Construct | |
TSharedPtr<AEmptyState> | NoResults | The search-no-results variant: search-x, "No results", the query quoted in the body and, given a suggestion, a "Did you mean" link. |
std::string | SuggestCorrection | The candidate closest to query by edit distance, or "" when none is close enough to be the word that was meant. |
void | SetIcon | |
void | SetTitle | |
void | SetBody | |
void | SetLinkText | |
void | SetActionLabel | |
void | SetSize | |
void | SetBackdrop | Off where the host already draws a busy field of its own (a graph canvas's grid): two textures on one another read as noise. |
bool | HasBackdrop | |
void | Set | |
const std::string& | GetIcon | |
const std::string& | GetTitle | |
const std::string& | GetBody | |
const std::string& | GetLinkText | |
std::string | GetActionLabel | |
TSharedPtr<AWidget> | GetActionWidget | The action button, to anchor a menu the action opens under it. |
bool | ShowsBackdrop | Whether the point-cloud field paints (off in High Contrast). |
void | GenerateBackdrop | The texture dots the backdrop draws in rect around content, with their final alpha (texel x 0.14 x radial fade). |
FArcEmptyStateLayout | ComputeLayout | |
float | GetRequiredHeight | The height the state needs in a rect width wide (0 is the 260 it asks for), its 16 px padding above and below included, for a host that sizes a list or a menu row to fit it. |
void | PaintInRect | Paints the state into rect for a host that draws its rows itself (a palette or dropdown painted in an overlay) instead of parenting widgets. |
ArcVec2 | ComputeDesiredSize | |
void | ArrangeChildren | |
int32_t | OnPaint | |
CReply | OnMouseButtonDown | |
EAccessibleRole | GetAccessibleRole | |
std::string | GetAccessibleName | |
const char* | GetTypeName |
Function details
ARC_WIDGET_ARGS
ARC_WIDGET_ARGS(AEmptyState) ARC_ARG(std::string, Icon) ARC_ARG(std::string, Title) ARC_ARG(std::string, Body) ARC_ARG(std::string, ActionLabel) ARC_ARG(std::string, LinkText) ARC_ARG(EArcEmptyStateSize, Size) ARC_ARG(bool, NoBackdrop) ARC_WIDGET_ARGS_END() static constexpr float kCompactHeight = 200.0fConstruct
void Construct(const CArguments& args)NoResults
static TSharedPtr<AEmptyState> NoResults(const std::string& query, const std::string& suggestion = std::string())The search-no-results variant: search-x, "No results", the query quoted in the body and, given a suggestion, a "Did you mean" link.
SuggestCorrection
static std::string SuggestCorrection(const std::string& query, const std::vector<std::string>& candidates)The candidate closest to query by edit distance, or "" when none is close enough to be the word that was meant.
SetIcon
void SetIcon(const std::string& icon)SetTitle
void SetTitle(const std::string& title)SetBody
void SetBody(const std::string& body)SetLinkText
void SetLinkText(const std::string& text)SetActionLabel
void SetActionLabel(const std::string& label)SetSize
void SetSize(EArcEmptyStateSize size)SetBackdrop
void SetBackdrop(bool enabled)Off where the host already draws a busy field of its own (a graph canvas's grid): two textures on one another read as noise.
HasBackdrop
bool HasBackdrop() constSet
void Set(const std::string& icon, const std::string& title, const std::string& body)GetIcon
const std::string& GetIcon() constGetTitle
const std::string& GetTitle() constGetBody
const std::string& GetBody() constGetLinkText
const std::string& GetLinkText() constGetActionLabel
std::string GetActionLabel() constGetActionWidget
TSharedPtr<AWidget> GetActionWidget() constThe action button, to anchor a menu the action opens under it.
ShowsBackdrop
static bool ShowsBackdrop()Whether the point-cloud field paints (off in High Contrast).
GenerateBackdrop
static void GenerateBackdrop(const ArcRect& rect, const ArcRect& content, std::vector<FArcPointCloudDot>& out)The texture dots the backdrop draws in rect around content, with their final alpha (texel x 0.14 x radial fade). Empty in High Contrast.
ComputeLayout
FArcEmptyStateLayout ComputeLayout(const ArcRect& rect) constGetRequiredHeight
float GetRequiredHeight(float width = 0.0f) constThe height the state needs in a rect width wide (0 is the 260 it asks for), its 16 px padding above and below included, for a host that sizes a list or a menu row to fit it.
PaintInRect
void PaintInRect(CArcUIRenderer& renderer, const ArcRect& rect)Paints the state into rect for a host that draws its rows itself (a palette or dropdown painted in an overlay) instead of parenting widgets. The rect becomes the cached geometry hit tests read.
ComputeDesiredSize
ArcVec2 ComputeDesiredSize(float scale) const overrideArrangeChildren
void ArrangeChildren(const CGeometry& geo) overrideOnPaint
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const overrideOnMouseButtonDown
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) overrideGetAccessibleRole
EAccessibleRole GetAccessibleRole() const overrideGetAccessibleName
std::string GetAccessibleName() const overrideGetTypeName
const char* GetTypeName() const override