Sleeping Wombat GUI  0.100
swGUI
Sleeping Wombat GUI Documentation

Introduction

This GUI is platform independent system for writing GUI applications in C++. The main idea of this gui is to cover the most common WPF functionalities and allow user to load already created xaml sheets. Of course WPF is to rich to implement all features. The key features are:

GUI will support similar controls with similar properties, but we will choose only most usefull properties which we used in our short practise with WPF, so porting from WPF to Wombat GUI will not always be simple.

The second goal of this gui are game engines. GUI system should be efficient enough to be used in real time graphics and to not consume to much CPU and GPU resources. These two goals can be defficult to bring together...

Sleeping Wombat GUI is still in development process.

Road map

  1. Handling main input events (keyboard mouse)
  2. Hit testing, mouse and keyboard capture
  3. Basic rendering - rectangle, circle with using simple brushes
  4. Controls layout and arrangment system
  5. Controls visual states (Fake implementation for testing)
  6. Basic controls (Buttons, StackPanels ...)
  7. Data binding
  8. Control Templates
  9. Storyboard and visual states - proper implementation
  10. XAML deserialization
  11. Control Styles
  12. Basic controls set (Buttons, Layout controls, Tree, List, Window)
  13. ...

Installation

Sleeping Wombat gui uses:

The best option is to add all libraries as subtrees to your project. Imagine that you have all libraries in folder /External. Your directory should look like this:

You must add folder External to additional include directories. All paths in sw libraries are relative to folder ../

Linking Libraries

The best way to link sw libraries is to add all projects to your own solution (for example make merge solution). Then you can simply add CoreGUI as reference. Then Add swGUI\ProjectDir\Visual2015\LinkSleepingWombatGUI.props file to project that uses GUI.

Note that all libraries are in development and not all commits will work together. In future we will tag which versions should be used or think of better solution for that, but first all libraries must stabilize.

Installation_Usage

Usage example of GUI: main.cpp

#include "Application.h"
int main( int argc, char** argv )
{
Application app( argc, argv, GUI::WinAPIGUI::Create() );
app.Init();
return app.MainLoop();
}

Note you must reference specific Native API in project.

Application.h

#pragma once
{
private:
protected:
public:
explicit Application ( int argc, char** argv, sw::gui::INativeGUI* gui );
~Application () = default;
protected:
virtual void Initialize () override;
virtual void OnInitialized () override;
virtual void OnClosing () override;
virtual void OnIdle () override;
};

Application.cpp

#include "Application.h"
// ================================ //
//
Application::Application ( int argc, char** argv, sw::gui::INativeGUI* gui )
: sw::gui::GUISystem( argc, argv, gui )
{}
// ================================ //
//
{
DefaultInit( 1024, 768, "Window Tittle" );
}
// ================================ //
//
{
// In this function sizeofs basic classes are printed. Test purposes only.
CreateNativeHostWindow( 500, 500, "Additional window" );
}
// ================================ //
//
{ }
// ================================ //
//
{ }

In future we will provide better usage examples!