Windows Runtime or WinRT (
http://en.wikipedia.org/wiki/Windows_Runtime) is the API used for Metro apps on Windows 8. Scintilla works well in the desktop box of Windows 8 which will remain the best environment for heavyweight IDEs. However, there may be some opportunities for Metro applications containing source code display and editing where Scintilla could be useful. I've been taking a look at this and have published some experimental code as a Mercurial repository MetroSci at
It looks like this:
MetroSci contains two parts - a control called Skeen which is a port of Scintilla, and Schott which is an application that embeds Skeen. Schott initially shows a snippet of code. The black app bar at the bottom is shown/hidden with the secondary mouse button as is common with Metro. The Load File button displays a file selection screen where a file can be picked for editing. The Save File button saves any edits back to that file but this is experimental code so don't trust it on anything precious. Typing in the text box does incremental search and the Find button finds the next occurrence of the search text.
Many standard Scintilla key actions work. Not all typed characters do - WinRT's key events are low-level so have to be translated from scan code and virtual key codes into characters and that code is incomplete. There isn't even a way to find out which modifiers are currently pressed so the code has to track press and release of the Shift, Ctrl, and Alt keys. The mouse works but fingers not-so-well. Good touch interaction would require more planning and implementation effort.
WinRT includes DirectX with Direct2D and DirectWrite so the current implementation using Direct2D / DirectWrite was copied into Skeen. The scroll bar control wouldn't work so instead Skeen's drawing area is embedded into a ScrollViewer. This has some advantages such as supporting inertial scrolling but it also required some large changes to Scintilla and it means horizontal scrolling moves the margins too. There are 3 Microsoft-suggested ways to use DirectX in WinRT - with a simple surface matching the screen, with a virtual surface covering the document, or with direct control over the swap chain.
The simple surface could work if the scroll bar was working and that would have required less changes to Scintilla. MetroSci uses the virtual surface approach. With this technique, image tiles are presented to application code to draw on and are cached as they may be redisplayed as scrolling occurs. This makes scrolling quite smooth. A tile may not be (all) visible on the screen when the drawing request occurs so the code in Scintilla that avoids drawing offscreen has to be disabled. Coordinates are also document-based - I did try using a transform so they would be screen based but that had bugs with scrolling backwards.
To get styling working, a copy of all of SciTE's .properties files is embedded in Schott as C source code - ugly and it seems to slow initial load down but it makes for a more complete demonstration.
I'm not planning on integrating this code into the standard distribution in the near future and it may be redesigned completely before inclusion if it ever happens. While Metro isn't currently meant for complex applications, it will probably be extended in the future. WinRT looks quite decent and could be extended for use as the primary API for desktop apps.
If you want to experiment with this code, you'll have to install the Windows 8 Release Preview along with the RC of Visual Studio 2012. Open the MetroSci.sln solution file, make Schott the Startup Project and press F5. VS will want to create and install a temporary developer key (due to Metro being locked down) so allow that.
Neil