Skip to content
forked from billyquith/GWork

Lightweight skinnable embeddable GUI with useful widget collection. Fork of GWEN.

License

Notifications You must be signed in to change notification settings

Grant1219/GWork

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GWork

GWork is a skinnable, embeddable GUI library with an extensive control set. Control rendering is abstracted, and can be implemented by any application wishing to use the library. Gwork (pronounced "gw-orc") is a fork of the GUI library GWEN. It was forked to fix issues with GWEN and add new features.

A number of rendering backends are provided for use, or as an example for your own:

  • Allegro5 (cross-platform).
  • OpenGL (cross-platform using GLFW).
  • SDL2 (cross-platform).
  • SFML2 (cross-platform).

Build

Get source code:

  • From git: git clone https://github.com/billyquith/GWork.git gwork or
  • Download zip & unzip

CMake is used to generate the project files. See cmake -h to see all the generators for your platform. Only have one renderer per build directory. Choose renderer:

  • -D RENDER_ALLEGRO5=ON
  • -D RENDER_OPENGL=ON
  • -D RENDER_SDL2=ON
  • -D RENDER_SFML2=ON

For example to build SDL2 renderer using Ninja:

cd gwork
mkdir build && cd build              # put all build files in separate directory
cmake -G Ninja -D RENDER_SDL2=ON ..  # create Ninja project files with SDL2 renderer

Providing the dependencies are present, this will create a sample executable. When run it will demonstrate all of the controls available:

ninja                 # build project
bin/GworkSDL2Sample   # run sample

Changes from GWEN

Features

  • CMake is used to generate project files instead of Premake. CMake is much more comprehensive.
  • SDL2 renderer added.
  • C++11 used.
  • UTF-8 everywhere. Unicode support simplified.
    • Gwen::UnicodeString removed. This assumed that all Unicode was best as a wide encoding. This is not the case on all platforms.
    • Gwen::TextObject removed. This stored two copies of each string, one as ASCII and one in wide Unicode. This is no longer necessary as all Unicode is dealt with as UTF-8, which is backwards compatible with std::string.
  • Documentation:
    • Any existing GWEN comments and docs formatted for doxygen.
    • Docs currently very minimal as GWEN has almost no documentation.
  • Cache to texture optimisation implemented (Allegro only).
  • No dependency on Bootil (Garry's personal library).
  • Fixes for Allegro. e.g. text rendering.
  • Many warnings fixed.

Source code formatting

  • The source code has been reformated to be more consistent with other C++ projects and how I like it.
  • Indentation: Spaces instead of tabs. Github, Google Code, etc use 8 space tabs. GWEN uses 4 space tabs. This messes up the indentation when reading code on Github.
  • Brackets: Allman/BSD indentation.
  • Line length ~100 chars. Github has width around 100. Easier for 3 way merge. Everything on regular screen.
  • camelCase variables.

Please report problems to Github or they'll get lost.

BQ

About

Lightweight skinnable embeddable GUI with useful widget collection. Fork of GWEN.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 62.4%
  • C 33.9%
  • CMake 3.7%