Sign in Join
Wiki copytemporary

fpGUI Interface

Deutsch · English · Español · Français

Introduction

fpGUI is a widgetset completely written in Object Pascal. It links directly with the underlying windowing system, and thus avoids the need for many external libraries. More information on its website: http://fpgui.sourceforge.net

This page covers the fpGUI widgetset - a Lazarus LCL widget wrapping the fpGUI code. It is different from pure fpGUI code.

Other Interfaces

Platform specific Tips

Interface Development Articles

Creating your first LCL application with fpGUI

This is a step-by-step guide to build your first application with the fpGUI widgetset

  1. Download the latest Lazarus from subversion and build it (not necessary if you downloaded a pre-compiled snapshot)
  2. Download fpGUI source code from the SourceForge.net Git repository as follows:
pascal
git clone git://git.code.sf.net/p/fpgui/code
  1. Make sure you switch the the maint branch of fpGUI.
pascal
git checkout maint
  1. Now we need to make the Lazarus LCL find the fpGUI code.
  2. Using Lazarus (trunk)
    • Option 1)

Copy the 'src' directory from the fpGUI sources into your Lazarus directory as follows:

<fpgui>/src/ ⇒ <lazarus>/lcl/interfaces/fpgui/src/

pascal
* Option 2)

Use your file system's symbolic linking function to create a link the fpGUI src directory, to the correct location in Lazarus.

For example:

cd /opt/lazarus/lcl/interfaces/fpgui

ln -s /path/to/fpgui/src src

pascal
2. **Using Lazarus 1.0.8 and earlier**
   * Option 1)

Supported on all platforms. Copy two directories and one file from the downloaded fpgui to lazarus

<fpGUI dir>/src/gui ⇒ lazarus/lcl/interfaces/fpgui/gui

<fpGUI dir>/src/corelib ⇒ lazarus/lcl/interfaces/fpgui/corelib

<fpGUI dir>/src/VERSION_FILE.inc ⇒ lazarus/lcl/interfaces/fpgui/VERSION_FILE.inc

pascal
* Option 2)

Linux or any other Unix type platforms. Create symbolic links from the fpGUI's corelib , gui directories and VERSION_FILE.inc to the Lazarus LCL directory as follows:

ln -s <fpGUI dir>/src/gui lazarus/lcl/interfaces/fpgui/gui

ln -s <fpGUI dir>/src/corelib lazarus/lcl/interfaces/fpgui/corelib

ln -s <fpGUI dir>/src/VERSION_FILE.inc lazarus/lcl/interfaces/fpgui/VERSION_FILE.inc

  1. Now you need to recompile LCL for the LCL-fpGUI widgetset
  2. Using Lazarus (trunk)
  3. Start a new LCL application
  4. Tell it to use the LCL-fpGUI widgeset by using the Additions and Overrides dialog. This can be found by selecting "Project Options -> Compiler Options -> Additions and Overrides". You can use the drop-down button menus in that dialog to define the following IDE Macros, or type them in by hand. For the fpGUIPlatform macro, only define one, dependent on the platform you are compiling for.
    • define IDE Macro: LCLWidgetType := fpgui
      • define IDE Macro: fpGUIPlatform := gdi(for Windows)
      • define IDE Macro: fpGUIPlatform := x11(for Linux/FreeBSD)
  5. Compile your project!
  6. Using Lazarus 1.0.8 and earlier
    1. Start a new LCL application
    2. Open Lazarus, open the menu "Tools -> Configure Build Lazarus", select all options to None and LCL to Build+Clean, select fpGUI widgetset and rebuild it.
    3. Go to the menu Compiler Options, select fpGUI as the widgetset
    4. Compile your project!

Implementation details

Component mapping

This is a table indication which FPGUI controls are used to build each LCL control.

NOTE: This table is incomplete and out of date. Many other controls have already been implemented in LCL-fpGUI, but not listed in this table.

LCL Control FPGUI Control Comments
TPageControl TfpgPageControl -
TButton TfpgButton -
TBitBtn TfpgButton fpGUI's standard button class supports images.
TSpeedButton TfpgButton fpGUI's standard button class supports images and flat look etc.

Road map for the fpGUI interface

Here: Roadmap#Widgetset dependent components

See also


From the Free Pascal wiki, page "fpGUI Interface", as the Internet Archive kept it on 2023-06-07, last changed on 2016-10-29. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 3, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.