TTP# 336464 - Editor: Finish the Multiline Editable Text Block
Abstracted away the SetEditableText and GetEditableText functions from SMultiLineEditableText into "text marshallers" which handle converting text to and from a TextLayout.
There are three types of text marshallers currently implemented:
* Plain-text
* Rich-text
* Syntax highlighting
Text marshallers also have the ability to inject formatting "live" (as the text changes), which is how the syntax highlighting marshaller works.
Added the ability for a run to query the information it was created with. This allows the rich-text marshaller to reconstruct the original rich-text from the styled runs.
To test this out, I've implemented a simple WYSIWYG rich-text editor demo with the following features:
* Two SMultiLineEditableText widgets showing the same source text, one using a rich-text marshaller, and one using a syntax highlighter marshaller.
* A toolbar to allow you to control the style of the selected text.
* A button to allow you to insert a hyperlink into the document.
The demo also makes use of the meta-data stored in the runs (the same information used to reconstruct the original rich-text) to read the text style of whatever is currently under the cursor, live, as the cursor is moved.
Miscellaneous fixes:
* Fixed an issue where deleting text that spanned multiple runs could leave the remaining runs in a bad state, leading to phantom text appearing (see FTextLayout::RemoveAt).
* Fixed an issue where new-lines at the end of a rich-text document would be lost (see CalculateLineRanges).
* Fixed an issue where \\r\\n line endings werenÆt being handled correctly by the rich-text parser (see CalculateLineRanges).
* Fixed an issue where the rich-text parser would treat an empty run as plain-text (see FRichTextMarkupProcessing::ParseLineRanges).
* Fixed an issue where inserting a line break when the cursor was at the end of a line containing multiple runs could sometimes fail (see FTextLayout::SplitLineAt).
* Fixed mouse cursor movement not working correctly with a FSlateHyperlinkRun (see FSlateHyperlinkRun::GetTextIndexAt).
ReviewedBy Justin.Sargent
[CL 2246838 by Jamie Dale in Main branch]
NOTE: Old tutorials not deprecated (yet), but widget highlights in old tutorials will stop working with this change!
Added new Blueprintable UEditorTutorial object.
Added suite of widgets and details customizations to display tutorials.
New system is available on command line switch -NewTutorials.
Slate changes:
Tag names are now stored in SWidgets, rather than simply being discarded.
Removed STutorialWrapper in favour of using Tags.
Added Tags to more multibox widgets, so virtually all can now be picked.
Added SWindow::HasOverlay so we dont attempt to add overlays to widows that cannot have them.
[CL 2244216 by Thomas Sarkanen in Main branch]
Also:
- NULL to nullptr
- removed redundant documentation
- consistent line spacing
- added/fixed comments
[CL 2239470 by Max Preussner in Main branch]
There is more copy/paste here than I wanted. I had some unified layout/construct code, but with all of the templates and additional function calls, it was much harder to follow, and performance would have probably taken a hit, so I opted for the clearer duplicated code in a few spots.
[CL 2235776 by Frank Fella in Main branch]
Slate TPanelChildren, TSlotlessChildren are no longer full-fledged arrays; removed any unused Array API.
Fixed up a lot of improper use cases.
This better encapsulates the action of adding/removing Slate Widgets from the runtime tree as a Slate Core concern.
Alows us to add parent pointers in the future with significantly less effort.
#codereview Wes.Hunt
#codereview Nick.Darnell
#codereview Matt.Kuhlendschmidt
#codereview Justin.Sargent
[CL 2234301 by Nick Atamas in Main branch]
This TTP is not complete; only did safe step because of 4.4 deadline.
Further cleanup is required. The function SWindow::AcceptsInput() should include the call to IsWindowHousingInteractiveTooltip() and all other calls to IsWindowHousingInteractiveTooltip() should be deleted. However, the implications of that change must be studied. For the moment, IsWindowHousingInteractiveTooltip() is being called strategically alongside AcceptsInput() in the two locations that minimize potential fallout.
[CL 2231202 by Nick Atamas in Main branch]
There is now also a possibility of hittesting a ghost of a widget that is now removed.
We simply pretend we did not hit anything at the moment.
[CL 2229415 by Nick Atamas in Main branch]
- On Mac OS X we hide the per-window menu bar.
- MultiBlocks have a type so that the Mac-specific menu creation code can generate the proper native widget.
- The menu builder can now be asked for the constructed MultiBox so that on menu creation it can be set on the TabManager.
- That allows the TabManager to be told to update the current global menu bar when the tab or window focus changes.
- A window activation delegate has been added to SWindow to permit this.
- Widgets that used to live in the LevelEditor menu bar have been hoisted into the window titlebar on OS X as on that platform there's no menu bar anymore.
- There's limited support for parsing custom widgets in the menu MultiBlock in order to support the platform list in the File->Package... sub-menu, this is sufficient for now but is quite fragile.
- We can support custom Slate widgets inside native Mac menus should we ever need to - but it is tricky.
reviewedby michael.trepka, nick.atamas
[CL 2228398 by Mark Satterthwaite in Main branch]
- If your web camera requires vertical mirroring, we'll do that automatically now
- For editor streaming, you can now customize horizontal mirroring in the Live Streaming preferences
- For game streaming, you can select whether to mirror horizontally using the new pin on the "Start Broadcasting Game" node
Slate
- Slate brushes now support mirroring (none, horizontal, vertical, or both)
TTP 340769
#codereview matt.kuhlenschmidt
[CL 2220564 by Mike Fricker in Main branch]