4#include "Widgets/DeclarativeSyntaxSupport.h"
5#include "Widgets/Input/SSearchBox.h"
6#include "Widgets/Layout/SScrollBorder.h"
7#include "Widgets/Views/SListView.h"
8#include "Widgets/Input/SComboButton.h"
9#include "Widgets/Input/SCheckBox.h"
26 , _HasContextCheckbox(false)
27 , _IsContextCheckBoxChecked(false)
28 , _ContextCheckBoxText(NSLOCTEXT(
"SDialogueTextPropertyPickList",
"ContextCheckBoxText",
"Local Search"))
29 , _ContextCheckBoxToolTipText(NSLOCTEXT(
"SDialogueTextPropertyPickList",
"ContextCheckBoxToolTipText",
30 "Should the search be local? If not checked the search is global."))
31 , _ToolTipText(NSLOCTEXT(
"SDialogueTextPropertyPickList",
"DefaultToolTip",
"REPLACE ME"))
32 , _HintText(NSLOCTEXT(
"SDialogueTextPropertyPickList",
"SearchBoxHint",
"Search Names"))
33 , _CurrentContextAvailableSuggestions(TArray<FName>())
34 , _AvailableSuggestions(TArray<FName>())
38 , _DelayChangeNotificationsWhileTyping(true)
44 SLATE_ARGUMENT(
bool, HasContextCheckbox)
50 SLATE_ATTRIBUTE(
FText, ContextCheckBoxText)
53 SLATE_ATTRIBUTE(
FText, ContextCheckBoxToolTipText)
56 SLATE_ATTRIBUTE(
FText, ToolTipText)
59 SLATE_ATTRIBUTE(
FText, HintText)
66 SLATE_ATTRIBUTE(TArray<FName>, CurrentContextAvailableSuggestions)
69 SLATE_ATTRIBUTE(TArray<FName>, AvailableSuggestions)
81 SLATE_ARGUMENT(
bool, DelayChangeNotificationsWhileTyping)
102 FReply
OnPreviewKeyDown(const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent) override;
123 FReply
OnFocusReceived(
const FGeometry& MyGeometry,
const FFocusEvent& InFocusEvent)
override
128 return FReply::Handled().SetUserFocus(
InputTextWidget.ToSharedRef(), InFocusEvent.GetCause());
131 return Super::OnFocusReceived(MyGeometry, InFocusEvent);
136 void SetText(
const TAttribute<FText>& InNewText);
166 return SNew(SScrollBorder, Table)
185 FReply
HandleKeyDown(
const FGeometry& MyGeometry,
const FKeyEvent& InKeyEvent);
TSharedRef< SWidget > GetContextCheckBoxWidget()
void HandleTextChanged(const FText &InSearchText)
FText GetHighlightText() const
TAttribute< TArray< FName > > CurrentContextSuggestionAttributes
TSharedPtr< SComboButton > ComboButtonWidget
TArray< TextListItem > Suggestions
TSharedRef< SWidget > GetListViewWidget()
TAttribute< FText > TextAttribute
void SetText(const TAttribute< FText > &InNewText)
TSharedPtr< FName > TextListItem
void HandleListSelectionChanged(TextListItem NewValue, ESelectInfo::Type SelectInfo)
TSharedPtr< SVerticalBox > MenuWidget
FOnTextChanged OnTextChanged
TextListItem GetSelectedSuggestion() const
TSharedPtr< STextBlock > ComboButtonTextWidget
TAttribute< FText > HintTextAttribute
TSharedPtr< SListView< TextListItem > > ListViewWidget
TSharedPtr< IPropertyHandle > PropertyHandle
bool SupportsKeyboardFocus() const override
bool HasKeyboardFocus() const override
void FocusSearchBox() const
TAttribute< FText > ContextCheckBoxToolTipTextAttribute
void HandleMenuOpenChanged(bool bOpen)
TSharedRef< ITableRow > HandleListGenerateRow(TextListItem Text, const TSharedRef< STableViewBase > &OwnerTable)
bool bIsContextCheckBoxChecked
FOnKeyDown OnKeyDownHandler
FReply OnPreviewKeyDown(const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent) override
void HandleTextCommitted(const FText &InSearchText, ETextCommit::Type CommitInfo)
void SetPropertyHandle(const TSharedPtr< IPropertyHandle > &InPropertyHandle)
TSharedRef< SWidget > GetMenuWidget()
void Construct(const FArguments &InArgs)
TAttribute< FText > ContextCheckBoxTextAttribute
FOnTextCommitted OnTextCommitted
TAttribute< FText > ToolTipAttribute
bool bDelayChangeNotificationsWhileTyping
TSharedPtr< SBorder > ListViewContainerWidget
SDialogueTextPropertyPickList Self
void UpdateSuggestionList()
FReply OnFocusReceived(const FGeometry &MyGeometry, const FFocusEvent &InFocusEvent) override
TSharedPtr< SSearchBox > InputTextWidget
ECheckBoxState IsContextCheckBoxChecked() const
TAttribute< TArray< FName > > SuggestionAttributes
void HandleComboBoxOpened()
TSharedRef< SWidget > CreateShadowOverlay(TSharedRef< STableViewBase > Table) const
void HandleContextCheckboxChanged(ECheckBoxState CheckState)
TSharedRef< SWidget > GetSearchBoxWidget()
FReply HandleKeyDown(const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
TSharedPtr< SCheckBox > ContextCheckBoxWidget
void SetToolTipAttribute(const TAttribute< FText > &InNewText)