Fox toolkit

Last updated
FOX toolkit FOX hello screenshot.PNG
FOX toolkit
FOX toolkit
Developer(s) Jeroen van der Zijp, FOX community
Stable release
1.7.82 / March 27, 2023;
11 months ago
 (2023-03-27)
Preview release
1.7.82 / March 27, 2023;
11 months ago
 (2023-03-27) [1]
Written in C++
Operating system Cross-platform
Type Development Library
License GNU Lesser General Public License with License Addendum allowing static linking fox-toolkit.org/license.html
Website fox-toolkit.org   OOjs UI icon edit-ltr-progressive.svg

The FOX toolkit is an open-source, cross-platform widget toolkit, i.e. a library of basic elements for building a graphical user interface (GUI). FOX stands for Free Objects for X.

Contents

It features a hard-wired Windows 95-style theme available for both Microsoft Windows itself as well as the X Window System (which is used on many UNIX and UNIX-like operating systems). [2]

The FOX toolkit has been released under the GNU Lesser General Public Licence. Development began 1997 by Jeroen van der Zijp while he was affiliated at CFDRC. Since then, Jeroen van der Zijp maintains the core library and test applications, with the help of user community.

The FOX toolkit is written in C++, with language bindings available for Python, Ruby and Eiffel. The FOX source code distribution supports building with many different (commercial and free) C++ compilers.

Cross-platform compatibility

FOX differentiates itself in the following way from other cross-platform toolkits:

All of these toolkits have some support for programming natively on the classic Mac OS and/or macOS platforms, which FOX currently does not support.[ citation needed ]

FOX uses a technique similar to the Java Swing-style approach to display a graphical user interface to the screen, using only graphical primitives available on that platform, as opposed to the original Java AWT-style approach which used native widgets. This means that applications will have a similar look and feel across platforms. In theory, porting FOX to a new platform should also be easier than implementing support for native widgets.

On the downside, it usually means that FOX applications will look and feel different from native applications for those platforms, which some users may find confusing. Also, certain native platform features may not be available immediately, such as comprehensive printing support or internationalized input handling, because they will need to be re-implemented in a cross-platform way before they can be used in FOX. Some applications, like Xfe File Manager, allow changing the color scheme to better integrate with the system's theme colors. [3] On Arch Linux, an app called FOX Control Panel is available to change the color scheme of all FOX applications system-wide. It ships with the main FOX Toolkit package.

Messaging system

FOX offers a transparent bi-directional messaging system. Each widget sends its message to a certain target. Each message is composed by a selector that identifies its kind and an id that is unique and provided by the widget's enumeration. The advantage is that each widget can call a target widget's method in a transparent manner, even if the method does not exist. Vice versa, in the implementation of the individual message handler, since the sender is known, the target can also dispatch a message to the sender. This is a particularly important feature in component oriented software, where components may be written by different people, or even different organizations.

The FOX messaging system simplifies the GUI update strategy: during widget update, the widgets can ask from their targets to update them. This means that a command message does not also have to explicitly update any widgets as it is typical. In case an application implements N command messages each updating M widgets, then M*N updates must be executed and at most M*N messages must be implemented. On the other hand, if widgets request for update, only N command messages and at most M update messages are implemented. This strategy separates the GUI update from data changes, making the GUI a real-time reflection of the underlying data structures.

Internals

Dependencies

Under hood it depends on the cross-platform libraries, which include the following: [4]

Hello World

The following example creates a FOX application and a dialog with a button on C++:

#include"fx.h"intmain(intargc,char*argv[]){FXAppapplication("Hello","FoxTest");application.init(argc,argv);FXMainWindow*main=newFXMainWindow(&application,"Hello",NULL,NULL,DECOR_ALL);newFXButton(main,"&Hello, World!",NULL,&application,FXApp::ID_QUIT);application.create();main->show(PLACEMENT_SCREEN);returnapplication.run();}

It is also possible to create dialogs with Python 2.2 and Ruby:

FXPy

#!/usr/bin/env python3fromFXPy.foximport*importsysdefrunme():app=FXApp("Hello","Test")app.init(sys.argv)main=FXMainWindow(app,"Hello",None,None,DECOR_ALL)button=FXButton(main,"&Hello, World!",None,app,FXApp.ID_QUIT)app.create()main.show(PLACEMENT_SCREEN)app.run()if__name__=="__main__":runme()

FXRuby

require'fox16'includeFoxapplication=FXApp.new("Hello","FoxTest")main=FXMainWindow.new(application,"Hi",nil,nil,DECOR_ALL)FXButton.new(main,"&Hello, World!",nil,application,FXApp::ID_QUIT,LAYOUT_FILL_X|BUTTON_TOOLBAR|FRAME_RAISED|FRAME_THICK)application.create()main.show(PLACEMENT_SCREEN)application.run()

Software built on FOX

See also

Related Research Articles

In computing, cross-platform software is computer software that is designed to work in several computing platforms. Some cross-platform software requires a separate build for each platform, but some can be directly run on any platform without special preparation, being written in an interpreted language or compiled to portable bytecode for which the interpreters or run-time packages are common or standard components of all supported platforms.

<span class="mw-page-title-main">Swing (Java)</span> Java-based GUI toolkit

Swing is a GUI widget toolkit for Java. It is part of Oracle's Java Foundation Classes (JFC) – an API for providing a graphical user interface (GUI) for Java programs.

wxWidgets Widget toolkit

wxWidgets is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. wxWidgets enables a program's GUI code to compile and run on several computer platforms with minimal or no code changes. A wide choice of compilers and other tools to use with wxWidgets facilitates development of sophisticated applications. wxWidgets supports a comprehensive range of popular operating systems and graphical libraries, both proprietary and free, and is widely deployed in prominent organizations.

<span class="mw-page-title-main">Standard Widget Toolkit</span> Graphical widget toolkit for use with the Java platform

The Standard Widget Toolkit (SWT) is a graphical widget toolkit for use with the Java platform. It was originally developed by Stephen Northover at IBM and is now maintained by the Eclipse Foundation in tandem with the Eclipse IDE. It is an alternative to the Abstract Window Toolkit (AWT) and Swing Java graphical user interface (GUI) toolkits provided by Sun Microsystems as part of the Java Platform, Standard Edition (J2SE).

<span class="mw-page-title-main">FLTK</span>

Fast Light Toolkit (FLTK) is a cross-platform widget library for graphical user interfaces (GUIs), developed by Bill Spitzak and others. Made to accommodate 3D graphics programming, it has an interface to OpenGL, but it is also suitable for general GUI programming.

<span class="mw-page-title-main">Graphical widget</span> Element of interaction in a graphical user interface

A graphical widget in a graphical user interface is an element of interaction, such as a button or a scroll bar. Controls are software components that a computer user interacts with through direct manipulation to read or edit information about an application. User interface libraries such as Windows Presentation Foundation, Qt, GTK, and Cocoa, contain a collection of controls and the logic to render these.

wxPython Python wrapper for wxWidgets

wxPython is a wrapper for the cross-platform GUI API wxWidgets for the Python programming language. It is one of the alternatives to Tkinter. It is implemented as a Python extension module.

<span class="mw-page-title-main">Graphical user interface builder</span> Software development tool

A graphical user interface builder, also known as GUI designer or sometimes RAD IDE, is a software development tool that simplifies the creation of GUIs by allowing the designer to arrange graphical control elements using a drag-and-drop WYSIWYG editor. Without a GUI builder, a GUI must be built by manually specifying each widget's parameters in the source code, with no visual feedback until the program is run. Such tools are usually called the term RAD IDE.

gtkmm is the official C++ interface for the popular GUI library GTK. gtkmm is free software distributed under the GNU Lesser General Public License (LGPL).

Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to the Tk GUI toolkit, and is Python's de facto standard GUI. Tkinter is included with standard Linux, Microsoft Windows and macOS installs of Python.

A graphics library is a program library designed to aid in rendering computer graphics to a monitor. This typically involves providing optimized versions of functions that handle common rendering tasks. This can be done purely in software and running on the CPU, common in embedded systems, or being hardware accelerated by a GPU, more common in PCs. By employing these functions, a program can assemble an image to be output to a monitor. This relieves the programmer of the task of creating and optimizing these functions, and allows them to focus on building the graphics program. Graphics libraries are mainly used in video games and simulations.

<span class="mw-page-title-main">Tk (software)</span> GUI toolkit or framework

Tk is a cross-platform widget toolkit that provides a library of basic elements of GUI widgets for building a graphical user interface (GUI) in many programming languages. It is free and open-source software released under a BSD-style software license.

fpGUI Graphical user interface toolkit in Object Pascal

fpGUI, the Free Pascal GUI toolkit, is a cross-platform graphical user interface toolkit developed by Graeme Geldenhuys. fpGUI is open source and free software, licensed under a Modified LGPL license. The toolkit has been implemented using the Free Pascal compiler, meaning it is written in the Object Pascal language.

A software widget is a relatively simple and easy-to-use software application or component made for one or more different software platforms.

<span class="mw-page-title-main">GTK</span> Free and open-source cross-platform widget toolkit for creating graphical user interfaces

GTK is a free software cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and proprietary software to use it. It is one of the most popular toolkits for the Wayland and X11 windowing systems.

Wt is an open-source widget-centric web framework for the C++ programming language. It has an API resembling that of Qt framework, also using a widget-tree and an event-driven signal/slot system.

<span class="mw-page-title-main">Abstract Window Toolkit</span> Java-based GUI toolkit

The Abstract Window Toolkit (AWT) is Java's original platform-dependent windowing, graphics, and user-interface widget toolkit, preceding Swing. The AWT is part of the Java Foundation Classes (JFC) — the standard API for providing a graphical user interface (GUI) for a Java program. AWT is also the GUI toolkit for a number of Java ME profiles. For example, Connected Device Configuration profiles require Java runtimes on mobile telephones to support the Abstract Window Toolkit.

<span class="mw-page-title-main">Immediate mode GUI</span> Type of graphical user interface

An immediate mode graphic user interface (GUI), also known as IMGUI, is a graphical user interface design pattern which uses an immediate mode API to render controls, as opposed to a retained mode one.

<span class="mw-page-title-main">Fyne (software)</span> Graphical toolkit for building cross platform GUIs

Fyne is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs) across desktop and mobile platforms. It is designed to enable developers to build applications that run on multiple desktop and mobile platforms/versions from a single code base. Fyne uses OpenGL to provide cross-platform graphics. It is inspired by the principles of Material Design to create applications that look and behave consistently across all platforms. It is licensed under the terms of the 3-clause BSD License, supporting the creation of free and proprietary applications. In December 2019 Fyne became the most popular GUI toolkit for Go, by GitHub star count and in early February 2020 it was trending as #1 project in GitHub trending ranks.

References

  1. "News". fox-toolkit.org. Retrieved 2022-06-01.
  2. FOX Toolkit, GUI Toolkits for The X Window System, by Leslie Polzer, 27 Jul 2003, freshmeat.net
  3. "XFE Homepage".
  4. "Installation instructions". fox-toolkit.org. Retrieved 2021-08-04.
  5. "Abaqus FEA / Version 6.7 Open Source Programs". Archived from the original on 2007-11-09. Retrieved 2007-12-09.
  6. "Acronis licensing information" . Retrieved 2007-12-08.