Commit Graph

7 Commits

Author SHA1 Message Date
Ben Marsh
20bf0eb6a1 Updating copyright notices to 2017 (copying from //Tasks/UE4/Dev-Copyright-2017).
#rb none
#lockdown Nick.Penwarden

[CL 3226823 by Ben Marsh in Main branch]
2016-12-08 08:52:44 -05:00
Ben Marsh
4ba423868f Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none

==========================
MAJOR FEATURES + CHANGES
==========================

Change 3209340 on 2016/11/23 by Ben.Marsh

	Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.

	Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.

	  * Every header now includes everything it needs to compile.
	        * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
	        * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
	  * Every .cpp file includes its matching .h file first.
	        * This helps validate that each header is including everything it needs to compile.
	  * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
	        * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
	        * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
	  * No engine code explicitly includes a precompiled header any more.
	        * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
	        * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.

	Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.

[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
Matthew Griffin
bb70b349ce Merging CL 2804086 from //UE4/Release-4.11 to Dev-Main (//UE4/Dev-Main) to isolate copyright update
#lockdown Nick.Penwarden

[CL 2819020 by Matthew Griffin in Main branch]
2016-01-07 08:17:16 -05:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Jamie Dale
4a52145b8b Fixed some cursor movement/placement issues in the multi-line editable text
TTP# 336464 - Editor: Finish the Multiline Editable Text Block

The fact that the end of a soft-wrapped line has the same FTextLocation as the start of the next soft-wrapped line leads to ambiguity when moving the cursor, as the cursor is always positioned based upon the line model (FTextLocation) rather than the line view.

I'd previously attempted to fix this when placing the cursor with the mouse by moving the cursor back one place (and aligning the cursor to the right) if it matched the end of a soft-line boundary. This worked for the end of the lines, but caused another issue where the clicking to the left of the start of a soft-line would move the cursor back to the previous line.

I've removed that code, and instead added code which allows the text layout (and text run) to report where on the line the given position has hit (either within the line itself, or inside the left or right gutter). This lets me adjust the cursor only if the click landed in the right gutter.

I also had to fix some issues with PreferredCursorScreenOffsetInLine as it was sometimes being set to a different position to the cursor, which could lead to it jumping around.

I also changed the code which converts a position into a line view location (GetLineViewIndexForTextLocation) to perform a non-exclusive range check - this ensures that the FTextLocation will match the start of a line view, rather than the end of a line view (which is correct due to the way I move the cursor back). The only exception to this is when the cursor has been placed to the right of a character, as this is assumed to mean that the cursor is at the end of a line view, and therefore we want to return the line view index for end of that line.

ReviewedBy Andrew.Rodham, Justin.Sargent

[CL 2225429 by Jamie Dale in Main branch]
2014-07-21 06:48:45 -04:00
Jamie Dale
b4a2958ef4 Added support for "lightweight highlighters"
TTP# 336464 - Editor: Finish the Multiline Editable Text Block

These are a kind of highlighter that exist at the line level, rather than the run level. This means that they can't do the more complex things like adjusting the run rendering (eg, changing the text color), but it does mean that they can be overlapped and don't require a re-flow of the entire layout when they're added or removed.

To avoid confusion with the existing "highlighter" concept, and to better describe what the classes do, the existing IRunHighlighter has been renamed to IRunRenderer, and the newly added "lightweight highlighters" are called ILineHighlighter.

FTextLayout has been updated to flow the lightweight highlighters separately to the main layout flow, and the dirty flag has been split so that we can skip the layout re-flow if only the highlighters have been changed.

FSlateTextLayout has been updated to first paint any "underlay" highlighters, then the line view blocks (potentially with a custom run renderer), then any "overlay" highlighters.

The GetChildren and OnArrangeChildren have been removed from ISlateRunRenderer (and not added to ISlateLineHighlighter) because they were never being used (FSlateTextLayout wasn't calling them), and were seemingly just adding complexity.

ReviewedBy Justin.Sargent

[CL 2222209 by Jamie Dale in Main branch]
2014-07-17 11:00:01 -04:00
Max Preussner
b63129a60c Slate: Refactored core Slate implementation into SlateCore module in preparation for UMG.
Other Updates:
- The WidgetReflector is now in its own module as well. It will be converted to a plug-in later.
- The Public API of both Slate and SlateCore has largely been reorganized for better discoverabilty. More cleanup work is needed.
- Added a lot of missing API documentation and fixed existing ones. More and better documentation is needed.
- Removed dead code, fixed a couple things I stubled upon, and conformed to coding guidelines (NULL vs nullptr, line breaks, etc.)

Upgrade Notes:
- The Slate Remote Server is currently disabled - will be re-enabled shortly!
- If your module previously had a module dependency to 'Slate', it now also needs a PrivateModuleDependency to 'SlateCore' in its Build.cs file.
- If your module exposes in any of its Public header files types that are now declared in SlateCore, it needs a PublicModuleDependency to 'SlateCore'
- The ToolTip property type on SWidget has changed from SToolTip to IToolTip; change local variables to TSharedPtr<IToolTip> instead of TSharedPtr<SToolTip> where needed
- IToolTip is not a widget. If you need access to the actual widget that represents the tool tip, use IToolTip::AsWidget(); If you need access to the tool tip's content, use IToolTip::GetContentWidget()

Troubleshooting:
- After syncing to this changelist you may have to clean your /Engine/Intermediate/Build/ directory and rebuild your entire project
- If in your project you are getting linker errors for unresolved types that are now declared in SlateCore, you may be missing a dependency to 'SlateCore'
- If in the Engine code you are getting linker errors for unresolved types that are now declared in SlateCore, you may need to rebuild the entire Engine

[CL 2057118 by Max Preussner in Main branch]
2014-04-26 15:07:24 -04:00