A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
SDialogueTextPropertyPickList Class Reference

#include <SDialogueTextPropertyPickList.h>

Inheritance diagram for SDialogueTextPropertyPickList:
[legend]

Public Member Functions

void Construct (const FArguments &InArgs)
 
bool HasKeyboardFocus () const override
 
FReply OnFocusReceived (const FGeometry &MyGeometry, const FFocusEvent &InFocusEvent) override
 
FReply OnPreviewKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent) override
 
void SetPropertyHandle (const TSharedPtr< IPropertyHandle > &InPropertyHandle)
 
void SetText (const TAttribute< FText > &InNewText)
 
void SetToolTipAttribute (const TAttribute< FText > &InNewText)
 
 SLATE_BEGIN_ARGS (Self)
 
bool SupportsKeyboardFocus () const override
 

Private Types

typedef SDialogueTextPropertyPickList Self
 
typedef SCompoundWidget Super
 
typedef TSharedPtr< FName > TextListItem
 

Private Member Functions

TSharedRef< SWidget > CreateShadowOverlay (TSharedRef< STableViewBase > Table) const
 
void FocusSearchBox () const
 
TSharedRef< SWidget > GetContextCheckBoxWidget ()
 
FText GetHighlightText () const
 
TSharedRef< SWidget > GetListViewWidget ()
 
TSharedRef< SWidget > GetMenuWidget ()
 
TSharedRef< SWidget > GetSearchBoxWidget ()
 
TextListItem GetSelectedSuggestion () const
 
void HandleComboBoxOpened ()
 
void HandleContextCheckboxChanged (ECheckBoxState CheckState)
 
FReply HandleKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 
TSharedRef< ITableRow > HandleListGenerateRow (TextListItem Text, const TSharedRef< STableViewBase > &OwnerTable)
 
void HandleListSelectionChanged (TextListItem NewValue, ESelectInfo::Type SelectInfo)
 
void HandleMenuOpenChanged (bool bOpen)
 
void HandleTextChanged (const FText &InSearchText)
 
void HandleTextCommitted (const FText &InSearchText, ETextCommit::Type CommitInfo)
 
ECheckBoxState IsContextCheckBoxChecked () const
 
void UpdateSuggestionList ()
 

Private Attributes

bool bDelayChangeNotificationsWhileTyping = true
 
bool bHasContextCheckBox = false
 
bool bIsContextCheckBoxChecked = false
 
TSharedPtr< STextBlock > ComboButtonTextWidget
 
TSharedPtr< SComboButton > ComboButtonWidget
 
TAttribute< FTextContextCheckBoxTextAttribute
 
TAttribute< FTextContextCheckBoxToolTipTextAttribute
 
TSharedPtr< SCheckBox > ContextCheckBoxWidget
 
TAttribute< TArray< FName > > CurrentContextSuggestionAttributes
 
TAttribute< FTextHintTextAttribute
 
TSharedPtr< SSearchBox > InputTextWidget
 
TSharedPtr< SBorderListViewContainerWidget
 
TSharedPtr< SListView< TextListItem > > ListViewWidget
 
TSharedPtr< SVerticalBox > MenuWidget
 
FOnKeyDown OnKeyDownHandler
 
FOnTextChanged OnTextChanged
 
FOnTextCommitted OnTextCommitted
 
TSharedPtr< IPropertyHandle > PropertyHandle
 
TAttribute< TArray< FName > > SuggestionAttributes
 
TArray< TextListItemSuggestions
 
TAttribute< FTextTextAttribute
 
TAttribute< FTextToolTipAttribute
 

Detailed Description

A widget to edit a Text property but it allows you to pick from a list of possible values and search in it. Inspired from SPropertyMenuAssetPicker and SAssetPicker and SAssetView

Definition at line 17 of file SDialogueTextPropertyPickList.h.

Member Typedef Documentation

◆ Self

◆ Super

◆ TextListItem

typedef TSharedPtr<FName> SDialogueTextPropertyPickList::TextListItem
private

Definition at line 19 of file SDialogueTextPropertyPickList.h.

Member Function Documentation

◆ Construct()

void SDialogueTextPropertyPickList::Construct ( const FArguments & InArgs)

The Property handle of the property this widget represents. Does this pick list has a checkbox for ContextSensitive suggestions? The check status of the context sensitive checkbox. The Text that is displayed besides the display checkbox The tooltip text for the context checkbox. Tooltip text to displayed all over the place. Hint text to display for the search text when there is no value All possible suggestions for the search text If the context sensitive checkbox is true. Aka the current context Only used if HasContextCheckbox is true. All possible suggestions for the search text. If the context sensitive checkbox is false. Invoked whenever the text changes Invoked whenever the text is committed (e.g. user presses enter) Callback delegate to have first chance handling of the OnKeyDown event Whether the SearchBox should delay notifying listeners of text changed events until the user is done typing Construct the widget. It must have the PropertyHandle set or else it will fail

Parameters
InArgsArguments for widget construction

Definition at line 15 of file SDialogueTextPropertyPickList.cpp.

Here is the call graph for this function:

◆ CreateShadowOverlay()

TSharedRef< SWidget > SDialogueTextPropertyPickList::CreateShadowOverlay ( TSharedRef< STableViewBase > Table) const
inlineprivate

Adds A SScrollBorder over a Table

Definition at line 164 of file SDialogueTextPropertyPickList.h.

Here is the caller graph for this function:

◆ FocusSearchBox()

void SDialogueTextPropertyPickList::FocusSearchBox ( ) const
private

Sets the focus to the InputText box

Definition at line 491 of file SDialogueTextPropertyPickList.cpp.

Here is the caller graph for this function:

◆ GetContextCheckBoxWidget()

TSharedRef< SWidget > SDialogueTextPropertyPickList::GetContextCheckBoxWidget ( )
private

Gets the context sensitive checkbox widget

Definition at line 196 of file SDialogueTextPropertyPickList.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetHighlightText()

FText SDialogueTextPropertyPickList::GetHighlightText ( ) const
inlineprivate

Gets the text to highlight in the suggestion list

Definition at line 161 of file SDialogueTextPropertyPickList.h.

Here is the caller graph for this function:

◆ GetListViewWidget()

TSharedRef< SWidget > SDialogueTextPropertyPickList::GetListViewWidget ( )
private

Gets the list view that is displaying the text strings

Definition at line 254 of file SDialogueTextPropertyPickList.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetMenuWidget()

TSharedRef< SWidget > SDialogueTextPropertyPickList::GetMenuWidget ( )
private

Gets the menu content widget that is shown once the text is clicked on

Definition at line 139 of file SDialogueTextPropertyPickList.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSearchBoxWidget()

TSharedRef< SWidget > SDialogueTextPropertyPickList::GetSearchBoxWidget ( )
private

Gets the search box widget/input text.

Definition at line 227 of file SDialogueTextPropertyPickList.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSelectedSuggestion()

TSharedPtr< FName > SDialogueTextPropertyPickList::GetSelectedSuggestion ( ) const
private

Returns the currently selected suggestion

Definition at line 498 of file SDialogueTextPropertyPickList.cpp.

Here is the caller graph for this function:

◆ HandleComboBoxOpened()

void SDialogueTextPropertyPickList::HandleComboBoxOpened ( )
private

Handles when the combo box opens

Definition at line 304 of file SDialogueTextPropertyPickList.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandleContextCheckboxChanged()

void SDialogueTextPropertyPickList::HandleContextCheckboxChanged ( ECheckBoxState CheckState)
private

Toggle changed.

Definition at line 438 of file SDialogueTextPropertyPickList.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandleKeyDown()

FReply SDialogueTextPropertyPickList::HandleKeyDown ( const FGeometry & MyGeometry,
const FKeyEvent & InKeyEvent )
private

Handles key down events to the editable text widget

Definition at line 367 of file SDialogueTextPropertyPickList.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandleListGenerateRow()

TSharedRef< ITableRow > SDialogueTextPropertyPickList::HandleListGenerateRow ( TextListItem Text,
const TSharedRef< STableViewBase > & OwnerTable )
private

Makes the widget row for the list view

Definition at line 284 of file SDialogueTextPropertyPickList.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandleListSelectionChanged()

void SDialogueTextPropertyPickList::HandleListSelectionChanged ( TextListItem NewValue,
ESelectInfo::Type SelectInfo )
private

Handles when the selection changes in the suggestion list (list view widget)

Definition at line 418 of file SDialogueTextPropertyPickList.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandleMenuOpenChanged()

void SDialogueTextPropertyPickList::HandleMenuOpenChanged ( bool bOpen)
private

Handles when the menu of the combo box open status changes

Definition at line 295 of file SDialogueTextPropertyPickList.cpp.

Here is the caller graph for this function:

◆ HandleTextChanged()

void SDialogueTextPropertyPickList::HandleTextChanged ( const FText & InSearchText)
private

Handles when text in the editable text box changed

Handler for when text in the editable text box changed

Definition at line 312 of file SDialogueTextPropertyPickList.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandleTextCommitted()

void SDialogueTextPropertyPickList::HandleTextCommitted ( const FText & NewText,
ETextCommit::Type CommitType )
private

Handles for when text in the editable text box is commited (pressed enter/click).

Handler for when text in the editable text box changed

Definition at line 321 of file SDialogueTextPropertyPickList.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasKeyboardFocus()

bool SDialogueTextPropertyPickList::HasKeyboardFocus ( ) const
inlineoverride

Checks to see if this widget currently has the keyboard focus

Returns
True if this widget has keyboard focus

Definition at line 114 of file SDialogueTextPropertyPickList.h.

◆ IsContextCheckBoxChecked()

ECheckBoxState SDialogueTextPropertyPickList::IsContextCheckBoxChecked ( ) const
inlineprivate

Is the context sensitive toggle checked?

Definition at line 194 of file SDialogueTextPropertyPickList.h.

Here is the caller graph for this function:

◆ OnFocusReceived()

FReply SDialogueTextPropertyPickList::OnFocusReceived ( const FGeometry & MyGeometry,
const FFocusEvent & InFocusEvent )
inlineoverride

Called when focus is given to this widget. This event does not bubble.

Parameters
MyGeometryThe Geometry of the widget receiving the event
InFocusEventThe FocusEvent
Returns
Returns whether the event was handled, along with other possible actions

Definition at line 123 of file SDialogueTextPropertyPickList.h.

◆ OnPreviewKeyDown()

FReply SDialogueTextPropertyPickList::OnPreviewKeyDown ( const FGeometry & MyGeometry,
const FKeyEvent & InKeyEvent )
override

Called after a key is pressed when this widget or a child of this widget has focus If a widget handles this event, OnKeyDown will not be passed to the focused widget.

This event is primarily to allow parent widgets to consume an event before a child widget processes it and it should be used only when there is no better design alternative.

Parameters
MyGeometryThe Geometry of the widget receiving the event
InKeyEventKey event
Returns
Returns whether the event was handled, along with other possible actions

Definition at line 91 of file SDialogueTextPropertyPickList.cpp.

◆ SetPropertyHandle()

void SDialogueTextPropertyPickList::SetPropertyHandle ( const TSharedPtr< IPropertyHandle > & InPropertyHandle)

Sets the property handle this widget represents.

Definition at line 126 of file SDialogueTextPropertyPickList.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetText()

void SDialogueTextPropertyPickList::SetText ( const TAttribute< FText > & InNewText)

Sets the text string currently being edited

Definition at line 103 of file SDialogueTextPropertyPickList.cpp.

Here is the caller graph for this function:

◆ SetToolTipAttribute()

void SDialogueTextPropertyPickList::SetToolTipAttribute ( const TAttribute< FText > & InNewText)

Sets the current tooltip being displayed

Definition at line 119 of file SDialogueTextPropertyPickList.cpp.

Here is the caller graph for this function:

◆ SLATE_BEGIN_ARGS()

SDialogueTextPropertyPickList::SLATE_BEGIN_ARGS ( Self )
inline

Definition at line 24 of file SDialogueTextPropertyPickList.h.

◆ SupportsKeyboardFocus()

bool SDialogueTextPropertyPickList::SupportsKeyboardFocus ( ) const
inlineoverride

Checks to see if this widget supports keyboard focus. Override this in derived classes.

Returns
True if this widget can take keyboard focus

Definition at line 108 of file SDialogueTextPropertyPickList.h.

◆ UpdateSuggestionList()

void SDialogueTextPropertyPickList::UpdateSuggestionList ( )
private

Updates and shows or hides the suggestion list

Definition at line 446 of file SDialogueTextPropertyPickList.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ bDelayChangeNotificationsWhileTyping

bool SDialogueTextPropertyPickList::bDelayChangeNotificationsWhileTyping = true
private

Whether the SearchBox should delay notifying listeners of text changed events until the user is done typing

Definition at line 271 of file SDialogueTextPropertyPickList.h.

◆ bHasContextCheckBox

bool SDialogueTextPropertyPickList::bHasContextCheckBox = false
private

Do we display the context sensitive checkbox?

Definition at line 274 of file SDialogueTextPropertyPickList.h.

◆ bIsContextCheckBoxChecked

bool SDialogueTextPropertyPickList::bIsContextCheckBoxChecked = false
private

Is the box checked?

Definition at line 277 of file SDialogueTextPropertyPickList.h.

◆ ComboButtonTextWidget

TSharedPtr<STextBlock> SDialogueTextPropertyPickList::ComboButtonTextWidget
private

Text of the combo button

Definition at line 252 of file SDialogueTextPropertyPickList.h.

◆ ComboButtonWidget

TSharedPtr<SComboButton> SDialogueTextPropertyPickList::ComboButtonWidget
private

Main combo button

Definition at line 249 of file SDialogueTextPropertyPickList.h.

◆ ContextCheckBoxTextAttribute

TAttribute<FText> SDialogueTextPropertyPickList::ContextCheckBoxTextAttribute
private

The Text that is displayed besides the display checkbox

Definition at line 228 of file SDialogueTextPropertyPickList.h.

◆ ContextCheckBoxToolTipTextAttribute

TAttribute<FText> SDialogueTextPropertyPickList::ContextCheckBoxToolTipTextAttribute
private

The tooltip text for the context checkbox.

Definition at line 231 of file SDialogueTextPropertyPickList.h.

◆ ContextCheckBoxWidget

TSharedPtr<SCheckBox> SDialogueTextPropertyPickList::ContextCheckBoxWidget
private

The context sensitive checkbox widget.

Definition at line 255 of file SDialogueTextPropertyPickList.h.

◆ CurrentContextSuggestionAttributes

TAttribute<TArray<FName> > SDialogueTextPropertyPickList::CurrentContextSuggestionAttributes
private

Used when the context sensitive checkbox is cehcked

Definition at line 216 of file SDialogueTextPropertyPickList.h.

◆ HintTextAttribute

TAttribute<FText> SDialogueTextPropertyPickList::HintTextAttribute
private

Hint text to display for the search text when there is no value

Definition at line 225 of file SDialogueTextPropertyPickList.h.

◆ InputTextWidget

TSharedPtr<SSearchBox> SDialogueTextPropertyPickList::InputTextWidget
private

The editable text field aka the search box

Definition at line 261 of file SDialogueTextPropertyPickList.h.

◆ ListViewContainerWidget

TSharedPtr<SBorder> SDialogueTextPropertyPickList::ListViewContainerWidget
private

The list view that is displaying the text strings

Definition at line 243 of file SDialogueTextPropertyPickList.h.

◆ ListViewWidget

TSharedPtr<SListView<TextListItem> > SDialogueTextPropertyPickList::ListViewWidget
private

The list view for showing all suggestions

Definition at line 246 of file SDialogueTextPropertyPickList.h.

◆ MenuWidget

TSharedPtr<SVerticalBox> SDialogueTextPropertyPickList::MenuWidget
private

The menu content widget displyed on click.

Definition at line 258 of file SDialogueTextPropertyPickList.h.

◆ OnKeyDownHandler

FOnKeyDown SDialogueTextPropertyPickList::OnKeyDownHandler
private

Delegate for first chance handling for key down events

Definition at line 240 of file SDialogueTextPropertyPickList.h.

◆ OnTextChanged

FOnTextChanged SDialogueTextPropertyPickList::OnTextChanged
private

Delegate for when text is changed in the edit box

Definition at line 234 of file SDialogueTextPropertyPickList.h.

◆ OnTextCommitted

FOnTextCommitted SDialogueTextPropertyPickList::OnTextCommitted
private

Delegate for when text is changed in the edit box

Definition at line 237 of file SDialogueTextPropertyPickList.h.

◆ PropertyHandle

TSharedPtr<IPropertyHandle> SDialogueTextPropertyPickList::PropertyHandle
private

The Property handle of the property this widget represents.

Definition at line 210 of file SDialogueTextPropertyPickList.h.

◆ SuggestionAttributes

TAttribute<TArray<FName> > SDialogueTextPropertyPickList::SuggestionAttributes
private

All possible suggestions for the search text. When there is no context sensitive checkbox or the context sensitive checkbox is unchecked.

Definition at line 213 of file SDialogueTextPropertyPickList.h.

◆ Suggestions

TArray<TextListItem> SDialogueTextPropertyPickList::Suggestions
private

All suggestions stored in this widget for the list view. It represents a snapshot of the SuggestionsAttribute or ContextSensitiveSuggestionsAttribute depending on situation. Call UpdateSuggestionList to update.

Definition at line 268 of file SDialogueTextPropertyPickList.h.

◆ TextAttribute

TAttribute<FText> SDialogueTextPropertyPickList::TextAttribute
private

Text Value to display for the search text/Combo Button

Definition at line 219 of file SDialogueTextPropertyPickList.h.

◆ ToolTipAttribute

TAttribute<FText> SDialogueTextPropertyPickList::ToolTipAttribute
private

Tooltip Value to display.

Definition at line 222 of file SDialogueTextPropertyPickList.h.


The documentation for this class was generated from the following files: