
	spComponent - Multi-platform GUI toolkit

			Last modified: <2024-06-11 17:17:11 hideki>


Introduction
------------

spComponent is a multi-platform GUI toolkit written in C. While this
library used to be developed for speech signal processing, you can use
it for other purposes. By using this library, you can create excellent GUI
easily on Windows, macOS and UNIX without source code modification. If
you need to create program working on these environments, this library
is very useful.


Features 
--------

We developed a library for signal processing called spLib, we used it for our
research and creating demonstration of the research. The library did not
provide functions to create GUI, so we used Motif or Tcl/Tk for creating GUI. 
However, developing demonstration was not very easy, because Motif is
low-level toolkit. Tcl/Tk does not have enough speed to run real-time
application, and there are some limitations in it. While there are other GUI
toolkits, almost all of them is written in C++. In our speech signal
processing field, C++ is not very popular. For these reasons, I started in
developing high-level library toward Motif. The developed library depends on
Motif toolkit, so Motif was required necessarily and Motif functions must be
called directly, if needed. At the same time, Windows95 became popular in the
PC field, thus the developed demonstration had better work on UNIX and
Windows. In consideration of this situation, we began to develop new
high-level toolkit working on Motif and Windows. As a consequence of the work, 
the library now seems to be worked well on Windows, macOS, UNIX, iOS, and 
Android. This is how spComponent library was developed. Thus, this library
has the following features.

 * Easy to create GUI.
 * Written in C.
   + People who don't know language except C can use it.
   + Not very slow (faster than BASIC or Java).
 * Working on multiple platforms.
   + Supports compilation of 64-bit native application.
 * Based on user interface guideline on each environment.

However, there are some functional limitations, because this library is
designed to support various environments and to ease your program
development. Also, the basic toolkit (Motif or GTK+ on UNIX, Windows API on
Windows, Carbon or Cocoa on macOS) is required to use this library.


Requirements
------------

spBase library is required to compile spComponent library. UNIX version needs
Motif or GTK+ (GTK version works on both version 2.X and version 3.X of
GTK+). If you don't have Motif, LessTif (http://www.lesstif.org/) is
available instead of Motif (I tested with version 0.88).  Motif version
requires XPM library to support tool bar.


Install
-------

To compile this library on UNIX (including Linux or Cygwin), go to the
spComponent top directory, and make a symbolic link from `include' directory
and `lib' directory of spBase (e.g. /usr/local/include and /usr/local/lib)
like this:

 % cd spComponent-X.X.X
 % ln -s /usr/local/include
 % ln -s /usr/local/lib

If your platform is supported by the configuration file of spBase, you can
build the library by typing in the source directory:

 % cd spComponent
 % make

To install this library to your system directory (e.g /usr/local), login as
root and type:

 # make SPDESTROOT=/usr/local install
 # make SPDESTROOT=/usr/local install.hdr

If you don't want to make a symbolic link from spBase directory, you can
compile and install by adding TOP=/usr/local option (/usr/local is top
directory of spBase) to the above command line of `make' such as:
 
 % cd spComponent-X.X.X
 % cd spComponent
 % make TOP=/usr/local
 % su
 # make TOP=/usr/local SPDESTROOT=/usr/local install
 # make TOP=/usr/local SPDESTROOT=/usr/local install.hdr

By default, the GTK version is selected forcedly on Linux, so compiling the
Motif version on Linux requires USE_MOTIF=y option against `make' command.

When the compilation fails because of the problem of environment detection
(`unknown' is displayed), setting HOSTTYPE value may fix the problem.  For
example, on Linux, type

 % export HOSTTYPE=i486

and make.

The procedure of compiling the example programs is almost the same as the
above procedure, run make in example directory.

 % cd example
 % make

To compile the example programs on GTK2/GTK3 environment, append USE_GTK2=y
option (USE_GTK3=y on GTK3 environment) to make command:

 % cd example
 % make USE_GTK2=y

Recently, X11 install directory has been moved to /usr, so you have to 
specify X11TOP=/usr option to compile Motif version like this:

 % make USE_MOTIF=y MOTIF_STATIC=n X11TOP=/usr 

In this case, in order to fix the error that Xmu.a is not found,
MOTIF_STATIC=n option also should be specified.


Supported Platforms
-------------------

spComponent is known to work at least on Windows Vista/7/8/10, macOS,
and Linux (Redhat, Fedora, CentOS, Ubuntu, etc.).  I think that
you can compile spComponent by modifying Makefile slightly on UNIX-like
environment.

To execute binaries compiled with GTK and Motif version on Cygwin or some
virtual machine environments such as vmware, you may need to set the
environment variable XLIB_SKIP_ARGB_VISUALS to 1:

 % export XLIB_SKIP_ARGB_VISUALS=1


Bugs
----

Please see BUGS.txt.


To do
-----

Please see TODO.txt. 


Official Site
-------------

The official web site is:
  https://www-ie.meijo-u.ac.jp/labs/rj001/spLibs/index.html
  

License
-------

Please see LICENSE.txt. Windows, Motif, GTK+, and Mac OS (Carbon) versions
are open-source and have the so-called X11 license. macOS Cocoa, iOS and
Android versions are currently closed-source. The license of these versions
has not been fixed yet. I will make these versions free for educational and
research use.


Hideki BANNO
