My First Slate Window: Tree View that Reflects contents of Hard Drive, real time!

Dear Community,

Here I present to you my first Slate Window!

It reflects the contents of my hard drive, and auto updates itself as I make changes to my computer’s hard drive!

I used a Tree View widget to reflect the file structure for easy viewing and navigation.

Once the user clicks on a certain directory in the Slate window top portion, the file contents of all subdirectories are displayed in the lower portion!

The Slate window is light-weight and features my own unique Style :slight_smile:


I am giving you the entire c++ code for the foundation of what you see in the video, for your own unique implementation!

What took me the longest to figure out was all the basics, which I am giving you on the wiki page!

Wiki Link to the C++ Code,_Tree_View_Widget,_Ex:_In-Editor_File_Structure_Explorer



Handy for saved game files, custom icons/portraits, or other things. Very handy, thanks! You’re very industrious…

Hee hee! Thanks VegasRich!


Good job Rama, this will be useful to plenty of people.

Thanks Ehamloptiran!

And congrats on your awesome plugins! (see his signature :slight_smile: )



Rama, it is not evident from the video, but is your window a child of the viewport, or a separate pop-up window? I can do the latter with:

FSlateApplication::Get().AddWindow( SomeSWindowRef );

But I would like to know how to have the SWindow as a child of the viewport to keep it “inside” the game.

To avoid having the issue where clicking outside the new window would cause it to disappear / be hidden in the layers of windows, I had to make it a “native child” of the current parent window

**Code Sample ~ Get Active Top Level Window **

I wrote this code to ensure that my new window was a native child of whatever the "**Active Top Level Window**" was:


	TSharedPtr<SWindow> TopWindow = FSlateApplication::Get().GetActiveTopLevelWindow();
		//Add as Native
		FSlateApplication::Get().AddWindowAsNativeChild(NewWindow, TopWindow.ToSharedRef(), true);
		//Default in case no top window


Solved my issue, thanks!





From what I can gather (video, comments), this slate application does load a level which you extend class UnrealEdEngine. Can you please describe more about this - a full working source code would be a very nice start!

Thank you:)