FLUID
Encyclopedia
FLUID is a graphical editor that is used to produce FLTK
FLTK
FLTK is a cross-platform GUI library developed by Bill Spitzak and others. Made with 3D graphics programming in mind, it has an interface to OpenGL, but it is also suitable for general GUI programming....

 source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

. FLUID edits and saves its state in text .fl files, which can be edited in a text editor for finer control over display and behavior.

After designing the application, FLUID compiles the .fl file into a .cxx file, which defines all the objects from the .fl file, and an .h file
Header file
Some programming languages use header files. These files allow programmers to separate certain elements of a program's source code into reusable files. Header files commonly contain forward declarations of classes, subroutines, variables, and other identifiers...

, which declares all the global ones. FLUID also supports localization
Internationalization and localization
In computing, internationalization and localization are means of adapting computer software to different languages, regional differences and technical requirements of a target market...

 of label strings using message files and the GNU
GNU
GNU is a Unix-like computer operating system developed by the GNU project, ultimately aiming to be a "complete Unix-compatible software system"...

 gettext
Gettext
In computing, gettext is an internationalization and localization system commonly used for writing multilingual programs on Unix-like computer operating systems. The most commonly-used implementation of gettext is GNU gettext, released by the GNU Project in 1995.- History :gettext was originally...

 or POSIX
POSIX
POSIX , an acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems...

 catgets interfaces.

A simple program can be made by putting all non-interface code (including a main function) into the .fl file, thus making the .cxx file a single source file to compile. Most programs are more complex than this, so other .cxx files can be written that call the FLUID functions. These .cxx files must #include the .h file, or they can #include the .cxx file so it still appears to be a single source file.

Normally the FLUID file defines one or more functions or classes, which output C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 code. Each function defines a one or more FLTK windows, and all the widgets that go inside those windows.

Widgets created by FLUID are either "named", "complex named", or "unnamed". A named widget has a legal C++ variable identifier as its name (i.e. only alphanumeric and underscore), and is defined by a global variable or class member that will point at the widget after the function defining it is called. A complex named object has punctuation such as '.' or '->' or any other symbols in its name. In this case, FLUID assigns a pointer to the widget to the name, but does not attempt to declare it. This can be used to get the widgets into structures. An unnamed widget has a blank name and no pointer is stored.

Widgets may either call a named callback function that you write in another source file, or you can supply a small piece of C++ source and FLUID will write a private callback
Callback (computer science)
In computer programming, a callback is a reference to executable code, or a piece of executable code, that is passed as an argument to other code. This allows a lower-level software layer to call a subroutine defined in a higher-level layer....

function into the .cxx file.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK