LGI is an open source GUI framework (on
Phabricator)
for abstracting out all the operating system dependencies
that you can produce portable code. It handles all the graphical interface functions,
threading and semaphores, network connectivity and lots of other bits and peices to
help build small, fast and reliable applications.
The strengths of LGI is that it's a small enough library that one person can understand
it all. Also it's not too much of a burden on an application, both in increased download
time and memory footprint. Ultimately however size is a secondary consideration to the core
feature of LGI and that
is portability. Currently 3 serious ports exist: Windows, Mac and Linux. There is also
Haiku/BeOS and SDL ports which are partially implemented.
You can build some basic documentation using
doxygen and there is some scripting language
docs. Mostly though a good place to start is looking at the apps with source code:
Latest Trunk Code:
hg clone https://phab.mallen.id.au/source/lgi/ lgi/trunk
Developer environement GUI:
| Windows Win10+
|
v1.0
Stable
| Zip 2.7 MiB, 12/11/2018
|
Graphical editor / translation for resource files:
Cross platform and version control user interface (Git/Hg/Svn/Cvs):
| Windows Win10+
| OSX x32 10.10+
| Linux glibc 2.27
|
v0.4
Alpha
| Zip 2.4 MiB, 23/11/2018
| Zip 1.3 MiB, 23/11/2018
|
|
v0.1
Alpha
|
|
| Zip 5.1 MiB, 20/5/2018
|
There is
some documentation for configuring Lgi at runtime
via the
lgi.json file.
- File system abstraction (LFile, LDirectory, LFileSystem, LVolume)
- Basic windows built around the LWindow and LView classes.
- LEdit - Edit control (Win32: Native, Mac/Linux: LTextView3)
- LCheckBox - Boolean control (On/Off)
- LTextLabel - Label
- LRadioGroup/LRadioButton - Select one of many options
- LCombo - Combo box
- LList - List control
- LTree - Tree control
- LBitmap - Image display
- LProgress - Progress meter
- LSlider - Slider control
- LBox - Split into "n" panes
- LTableLayout - Html table like layout control
- LTabView - Tabbed control
- LTextView3 - Unicode text editor
- LToolBar - Toolbar control
- LStatusBar - Status bar
- LMenu / LSubMenu / LMenuItem - Menu controls
- LPopup - Popup windows
- LControlTree - A tree of settings with suitable edit controls
- LToolTip - Tool tips
- Internally all text is Utf-8.
- Unicode font support (LFont, LFontType, LDisplayString).
Tools for converting to/from
native OS text and other codepages are provided. iso-8859-x and
windows-12xx codepage support is native, other codepages supported via
the iconv library.
- Multi-threading (LThread, LMutex, LThreadEvent, LEventTargetThread)
- Graphics library (LSurface, LMemDC, LScreenDC, LPrintDC)
- Supports internally, all the basic primitives: Line, Circle, Rect,
Blt, Flood, Polygon, Ellipse etc. No OS support required.
- Bit depth conversion for bitmaps and colours.
- Palette management.
- Alpha blending.
- Vector art library, anti-aliased rasterisation of primitives & text.
Includes TTF -> path capability.
- Graphic file format support (GIF, TIFF, JPEG(dll), PNG(dll), BMP, ICO).
- Full OS independant file open/save dialog (LFileSelect)
There is also support for the Win32 and Mac native file open/save
dialogs (API compatible).
- Mime type detection lookup API with support for finding a suitable app for
a Mimetype.
- Platform independant XML resource file format for strings, dialogs and
menus. All fully multi-lingual.
LgiRes is a graphical
editor for this format.
- Clipboard IO for text and bitmaps.
- Drag'n'drop events/API.
- Commonly used dialogs (LInput, LMsgBox, LAlert, LFindReplace).
- Date time handling (LDateTime). Date subtraction/addition, conversion
to/from native format, conversion to/from strings.
- Container classes (LArray, List, LStream, LStringPipe).
- Network abstraction including OpenSSL support (LSocket, OpenSSLSocket).
- Network protocol client classes:
- FTP (IFtp)
- HTTP (IHttp)
- SMTP (MailSmtp)
- POP (MailPop3)
- IMAP (MailIMap)
- DNS (IDns)
- Xml (LXmlTree) and JSON (LJson) input/output .
- Simple HTML viewer and edit controls. Support for charsets, CSS classes/styles,
tables (colspan etc). Does most things but can get stuck on advanced layouts
(ie floats are not supported). Some form support. Hooks for scripting, but no
Javascript engine.
Building LGI
First check out the source:
hg clone https://phab.mallen.id.au/source/lgi/ lgi/trunk
Windows
Support Libraries
For full graphics and charset support download (or check you already have)
iconv,
libpng and zlib,
libjpeg;
then add their include paths to your compilers include paths. Or find the defines
in Lgi.h for the various libraries and set them to 0.
Visual Studio
Install a supported version of Visual Studio: 2019 or 2022.
Adding build folders to the shared library path:
Add this to your path:
| Mac
Install XCode
Go to the Apple Developer site and grab XCode
Build
Open Lgi.xcodeproj in XCode and run the build command.
| Linux
Building on Ubuntu:
sudo apt-get install mercurial libmagic-dev libgtk3.0-dev \
libgstreamer1.0-dev libappindicator3-dev libssh-dev
hg clone https://phab.mallen.id.au/source/lgi/ lgi/trunk
cd lgi/trunk
ln -s Makefile.linux makefile
make -j 4
If apt can't find the gtk 3 dev libraries, on some systems it's called 'libgtk-3-dev' just
to be different I guess.
If the makefile doesn't work on your system:
- Download a binary of LgiIde
- Project->Open and select lgi/trunk/Ide/LgiIde.xml
- Project->Create Makefile->Linux
- Project->Build
|