Sugar is a toy project of mine that I hack on periodically in my spare time. It is primarily a Gtk# testing vehicle. It's starting to get interesting enough that I may release the code at some point, though. It is highly unlikely sugar will ever rival a real PG app like impress or the one from Redmond. I simply don't have that kind of time. It's also unlikely that it will ever import other presentation formats and integrate nicely into an office suite and all those other nice lofty goals that understaffed, underpowered open source applications always seem to aspire to yet rarely achieve. If you are looking for such a PG app, you probably need to look elsewhere.
Sugar is written in C# and uses Gtk#, but nothing above the Gtk namespace. The primary motivation for this is to make it possible to run sugar on win32 on either the MS or mono runtimes. Think testbed. It is a core project goal to reinvent as many wheels as possible, in the interest of testing the completeness of custom widget subclassing in Gtk#. Avoiding the Gnome namespace also allows me to reinvent the Gnome Canvas, as an added benefit. Everyone should write a canvas widget at least once.
As of 25 March 2005, a semicolon line count of the sugar codebase indicates there are under 1200 lines of non-commentary source. For such a small codebase, it already does a surprising amount, especially considering that includes a custom slide canvas and icon list implementation and manually coded dialogs.
A PG application seemed like a natural choice for my toy app, since it was my frustration over hacking achtung and bonobo-draw in C that drove me to try to find a better way. Gtk# was motivated by achtung. Sugar is achtung the way it should have been. Writing applications in C# on a serious development framework is so sweet. Everyone should try it.
Enough soapboxing...
Startup presents an Add Slide dialog for an empty presentation:
I've ported a simplified version of the old pre-treemodel EggIconList to C# to serve as a single-selection slide layout chooser. The lame icons are my doing.
Selecting a TitleSlide and adding it opens a SlideCanvas in edit mode. The TitleSlide is a Slide template containing two ClickToAddTextShapes with different font sizes:
I've implemented a simple TextMarkup buffer. The Slide canvas already does autozooming and simple text editing, but I still need to add UI to apply tags to selected text and so on...
Click the ClickToAdd shape and you go into edit mode, complete with blinking cursor, etc...
The ClickToAddTextShape is implemented as a morphable type. It uses a TextShape for rendering and editing, but adds the dashed outline box itself. When the shape detects a click, it focuses the text shape and uses a mechanism similar to the CellEditable interface in Gtk+ to start and end editing. When the EditingDone event fires, if text was inserted, the shape uses an IMorphable interface to notify its parent ShapeCollection that it has changed its type to a TextShape, and the ClickToAdd shape can be replaced by a simple TextShape. This mechanism will be used for other morphable "AutoShapes" if I ever get that far.
Solid and Image backgrounds are implemented, along with a Select Background dialog:
There's also the beginnings of a Sorter and of course, full-screen "slideshow" mode. I figure once I add some more richtext stuff and a bullet text shape, I'll kick out a release so people can complain about how lame it is.
Copyright © 2004-2005 Mike Kestner