© 2013-2019 by Zack Smith. All rights reserved.
What is FrugalWidgets?
FrugalWidgets is a user-interface library, meaning it provides views, view controllers, and associated classes that are required to create GUI applications using the Model-View-Controller paradigm. FrugalWidgets has a hardware-abstration layer so that it can run on several platforms. I've coded it in C++.
FrugalWidgets is meant mainly for hobby projects.
FrugalWidgets runs on multiple platforms, including:
- MacOS (using OpenGL or X)
- Linux (using OpenGL or X)
- Windows Cygwin (using X)
Why is it needed?
Because good alternatives don't exist.
By good I mean:
- Not bloated. The library should take seconds to compile, not hours.
- Written in a fast, compiled language: C++, not an interpreted or bytecode-based language.
- Tiny runtime footprint, small enough to run in low RAM environments.
What is the scope of FrugalWidgets?
It provides the UI layer for applications.
What are the key components?
MVC stuff: View, Controller, ViewAnimator
Image stuff: (Mutable)Image
Basic UI stuff: Window, OutputDevice(s), Font, Application
Basic stuff: Object, Value, RECT, etc.
What are the issues when developing a cross-platform UI library?
- Choice of language:
- Must be fast, cross-platform, ideally produce small binaries.
- Memory management:
- Retain/release seems best to avoid garbage collection stutter.
- Smooth animations:
- This is difficult on low-resource platforms.
- I/O differences:
- Various platforms provide events, inputs and windows differently.
- Display differences:
- Need to support multiple DPIs, multiple pixel depths.
- Font availability:
- Need to provide scalable fonts plus fallback fonts.
How easily can FrugalWidgets be debugged and refactored?
Relatively easily because:
- Few apps exist.
- There is very little technical debt in FW because it is small.
- It didn't originate as a desktop UI library so lots of cruft isn't there.
- OutputDevice subclasses (mostly) rely on stable APIs.
OpenGL (100 DPI)
X-Windows (100 DPI)