Sign in Join
Wiki copytemporary

fpGUI Interface: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## Contents
22
33 * 1 Introduction
44 * 2 Other Interfaces
55 * 2.1 Platform specific Tips
66 * 2.2 Interface Development Articles
77 * 3 Creating your first LCL application with fpGUI
88 * 4 Implementation details
99 * 4.1 Component mapping
1010 * 5 Road map for the fpGUI interface
1111 * 6 See also
1212
1313## Introduction
1414
1515[[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>
1616
1717This page covers the fpGUI widgetset - a Lazarus LCL widget wrapping the fpGUI code. It is different from [[fpGUI|pure fpGUI]] code.
1818
1919## Other Interfaces
2020
2121 * [[Lazarus known issues \(things that will never be fixed\|Lazarus known issues (things that will never be fixed)]]> "Lazarus known issues \(things that will never be fixed\)") \- A list of interface compatibility issues
2222 * [[Win32/64 Interface]] \- The Windows API (formerly Win32 API) interface for Windows 95/98/Me/2000/XP/Vista/10, but not CE
2323 * [[Windows CE Interface]] \- For Pocket PC and Smartphones
2424 * [[Carbon Interface]] \- The Carbon 32 bit interface for macOS (deprecated; removed from macOS 10.15)
2525 * [[Cocoa Interface]] \- The Cocoa 64 bit interface for macOS
2626 * [[Qt Interface]] \- The Qt4 interface for Unixes, macOS, Windows, and Linux-based PDAs
2727 * [[Qt5 Interface]] \- The Qt5 interface for Unixes, macOS, Windows, and Linux-based PDAs
2828 * [[GTK1 Interface]] \- The gtk1 interface for Unixes, macOS (X11), Windows
2929 * [[GTK2 Interface]] \- The gtk2 interface for Unixes, macOS (X11), Windows
3030 * [[GTK3 Interface]] \- The gtk3 interface for Unixes, macOS (X11), Windows
3131 * fpGUI Interface \- Based on the fpGUI library, which is a cross-platform toolkit completely written in Object Pascal
3232 * [[Custom Drawn Interface]] \- A cross-platform LCL backend written completely in Object Pascal inside Lazarus. The Lazarus interface to Android.
3333
3434### Platform specific Tips
3535
3636 * [[Android Programming]] \- For Android smartphones and tablets
3737 * [[iPhone/iPod development]] \- About using Objective Pascal to develop iOS applications
3838 * [[FreeBSD Programming Tips]] \- FreeBSD programming tips
3939 * [[Linux Programming Tips]] \- How to execute particular programming tasks in Linux
4040 * [[macOS Programming Tips]] \- Lazarus tips, useful tools, Unix commands, and more...
4141 * [[WinCE Programming Tips]] \- Using the telephone API, sending SMSes, and more...
4242 * [[Windows Programming Tips]] \- Desktop Windows programming tips
4343
4444### Interface Development Articles
4545
4646 * [[Carbon interface internals]] \- If you want to help improving the Carbon interface
4747 * [[Windows CE Development Notes]] \- For Pocket PC and Smartphones
4848 * [[Adding a new interface]] \- How to add a new widget set interface
4949 * [[LCL Defines]] \- Choosing the right options to recompile LCL
5050 * [[LCL Internals]] \- Some info about the inner workings of the LCL
5151 * [[Cocoa Internals]] \- Some info about the inner workings of the Cocoa widgetset
5252
5353## Creating your first LCL application with fpGUI
5454
5555This is a step-by-step guide to build your first application with the fpGUI widgetset
5656
5757 1. Download the latest Lazarus from subversion and build it (not necessary if you downloaded a pre-compiled snapshot)
5858 2. Download fpGUI source code from the SourceForge.net Git repository as follows:
5959
6060
6161```
6262git clone git://git.code.sf.net/p/fpgui/code
6363```
6464
6565 3. Make sure you switch the the **maint** branch of fpGUI.
6666
6767
6868```
6969git checkout maint
7070```
7171
7272 4. Now we need to make the Lazarus LCL find the fpGUI code.
7373 1. **Using Lazarus (trunk)**
7474 * Option 1)
7575
7676 Copy the 'src' directory from the fpGUI sources into your Lazarus directory as follows:
7777
7878
7979 <fpgui>/src/ ⇒ <lazarus>/lcl/interfaces/fpgui/src/
8080
8181
8282 * Option 2)
8383
8484 Use your file system's symbolic linking function to create a link the fpGUI **src** directory, to the correct location in Lazarus.
8585 For example:
8686
8787
8888 cd /opt/lazarus/lcl/interfaces/fpgui
8989 ln -s /path/to/fpgui/src src
9090
9191
9292 2. **Using Lazarus 1.0.8 and earlier**
9393 * Option 1)
9494
9595 Supported on all platforms. Copy two directories and one file from the downloaded **fpgui** to **lazarus**
9696
9797
9898 <fpGUI dir>/src/gui ⇒ lazarus/lcl/interfaces/fpgui/gui
9999 <fpGUI dir>/src/corelib ⇒ lazarus/lcl/interfaces/fpgui/corelib
100100 <fpGUI dir>/src/VERSION_FILE.inc ⇒ lazarus/lcl/interfaces/fpgui/VERSION_FILE.inc
101101
102102
103103 * Option 2)
104104
105105 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:
106106
107107
108108 ln -s <fpGUI dir>/src/gui lazarus/lcl/interfaces/fpgui/gui
109109 ln -s <fpGUI dir>/src/corelib lazarus/lcl/interfaces/fpgui/corelib
110110 ln -s <fpGUI dir>/src/VERSION_FILE.inc lazarus/lcl/interfaces/fpgui/VERSION_FILE.inc
111111
112112
113113 5. Now you need to recompile LCL for the LCL-fpGUI widgetset
114114 1. **Using Lazarus (trunk)**
115115 1. Start a new LCL application
116116 2. 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.
117117 * define IDE Macro: **LCLWidgetType := fpgui**
118118 * define IDE Macro: **fpGUIPlatform := gdi**(for Windows)
119119 * define IDE Macro: **fpGUIPlatform := x11**(for Linux/FreeBSD)
120120 3. Compile your project!
121121 2. **Using Lazarus 1.0.8 and earlier**
122122 1. Start a new LCL application
123123 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.
124124 3. Go to the menu Compiler Options, select **fpGUI** as the widgetset
125125 4. Compile your project!
126126
127127## Implementation details
128128
129129### Component mapping
130130
131131This is a table indication which FPGUI controls are used to build each LCL control.
132132
133133**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.
134134
135135
136136
137137LCL Control | FPGUI Control | Comments
138138---|---|---
139139TPageControl | TfpgPageControl | \-
140140TButton | TfpgButton | \-
141141TBitBtn | TfpgButton | fpGUI's standard button class supports images.
142142TSpeedButton | TfpgButton | fpGUI's standard button class supports images and flat look etc.
143143
144144## Road map for the fpGUI interface
145145
146146Here: [[Roadmap|Roadmap#Widgetset dependent components]]
147147
148148## See also
149149
150150 * [[fpGUI]] Toolkit
151151 * [**Easy fpGUI**](<http://www.turbocontrol.com/easyfpgui.htm>) The easy way to try fpGUI and Free Pascal! Simply unpack the archive and you have a fully working FPC and fpGUI environment.
152152
153153---
154-*From the Free Pascal wiki, page "fpGUI Interface", as the Internet Archive kept it on 2023-06-07. 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](/wiki-contact).*
154+*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](/wiki-contact).*

Back to history