Sign in Join
Wiki copytemporary

fpGUI Interface: what changed

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

OldNewLine
1-## Contents
2-
3- * 1 Introduction
4- * 2 Other Interfaces
5- * 2.1 Platform specific Tips
6- * 2.2 Interface Development Articles
7- * 3 Creating your first LCL application with fpGUI
8- * 4 Implementation details
9- * 4.1 Component mapping
10- * 5 Road map for the fpGUI interface
11- * 6 See also
12-
131## Introduction
142
153[[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>
164
175This page covers the fpGUI widgetset - a Lazarus LCL widget wrapping the fpGUI code. It is different from [[fpGUI|pure fpGUI]] code.
186
197## Other Interfaces
208
219 * [[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
2210 * [[Win32/64 Interface]] \- The Windows API (formerly Win32 API) interface for Windows 95/98/Me/2000/XP/Vista/10, but not CE
2311 * [[Windows CE Interface]] \- For Pocket PC and Smartphones
2412 * [[Carbon Interface]] \- The Carbon 32 bit interface for macOS (deprecated; removed from macOS 10.15)
2513 * [[Cocoa Interface]] \- The Cocoa 64 bit interface for macOS
2614 * [[Qt Interface]] \- The Qt4 interface for Unixes, macOS, Windows, and Linux-based PDAs
2715 * [[Qt5 Interface]] \- The Qt5 interface for Unixes, macOS, Windows, and Linux-based PDAs
2816 * [[GTK1 Interface]] \- The gtk1 interface for Unixes, macOS (X11), Windows
2917 * [[GTK2 Interface]] \- The gtk2 interface for Unixes, macOS (X11), Windows
3018 * [[GTK3 Interface]] \- The gtk3 interface for Unixes, macOS (X11), Windows
3119 * fpGUI Interface \- Based on the fpGUI library, which is a cross-platform toolkit completely written in Object Pascal
3220 * [[Custom Drawn Interface]] \- A cross-platform LCL backend written completely in Object Pascal inside Lazarus. The Lazarus interface to Android.
3321
3422### Platform specific Tips
3523
3624 * [[Android Programming]] \- For Android smartphones and tablets
3725 * [[iPhone/iPod development]] \- About using Objective Pascal to develop iOS applications
3826 * [[FreeBSD Programming Tips]] \- FreeBSD programming tips
3927 * [[Linux Programming Tips]] \- How to execute particular programming tasks in Linux
4028 * [[macOS Programming Tips]] \- Lazarus tips, useful tools, Unix commands, and more...
4129 * [[WinCE Programming Tips]] \- Using the telephone API, sending SMSes, and more...
4230 * [[Windows Programming Tips]] \- Desktop Windows programming tips
4331
4432### Interface Development Articles
4533
4634 * [[Carbon interface internals]] \- If you want to help improving the Carbon interface
4735 * [[Windows CE Development Notes]] \- For Pocket PC and Smartphones
4836 * [[Adding a new interface]] \- How to add a new widget set interface
4937 * [[LCL Defines]] \- Choosing the right options to recompile LCL
5038 * [[LCL Internals]] \- Some info about the inner workings of the LCL
5139 * [[Cocoa Internals]] \- Some info about the inner workings of the Cocoa widgetset
5240
5341## Creating your first LCL application with fpGUI
5442
5543This is a step-by-step guide to build your first application with the fpGUI widgetset
5644
5745 1. Download the latest Lazarus from subversion and build it (not necessary if you downloaded a pre-compiled snapshot)
5846 2. Download fpGUI source code from the SourceForge.net Git repository as follows:
59-
60-
6147```
6248git clone git://git.code.sf.net/p/fpgui/code
6349```
6450
6551 3. Make sure you switch the the **maint** branch of fpGUI.
66-
67-
6852```
6953git checkout maint
7054```
7155
7256 4. Now we need to make the Lazarus LCL find the fpGUI code.
7357 1. **Using Lazarus (trunk)**
7458 * Option 1)
7559
76- Copy the 'src' directory from the fpGUI sources into your Lazarus directory as follows:
60+Copy the 'src' directory from the fpGUI sources into your Lazarus directory as follows:
7761
7862
79- <fpgui>/src/ ⇒ <lazarus>/lcl/interfaces/fpgui/src/
80-
63+<fpgui>/src/ ⇒ <lazarus>/lcl/interfaces/fpgui/src/
8164
65+
66+
8267 * Option 2)
8368
84- Use your file system's symbolic linking function to create a link the fpGUI **src** directory, to the correct location in Lazarus.
85- For example:
69+Use your file system's symbolic linking function to create a link the fpGUI **src** directory, to the correct location in Lazarus.
70+
71+For example:
8672
8773
88- cd /opt/lazarus/lcl/interfaces/fpgui
89- ln -s /path/to/fpgui/src src
90-
74+cd /opt/lazarus/lcl/interfaces/fpgui
9175
76+ln -s /path/to/fpgui/src src
77+
78+
79+
9280 2. **Using Lazarus 1.0.8 and earlier**
9381 * Option 1)
9482
95- Supported on all platforms. Copy two directories and one file from the downloaded **fpgui** to **lazarus**
83+Supported on all platforms. Copy two directories and one file from the downloaded **fpgui** to **lazarus**
9684
9785
98- <fpGUI dir>/src/gui ⇒ lazarus/lcl/interfaces/fpgui/gui
99- <fpGUI dir>/src/corelib ⇒ lazarus/lcl/interfaces/fpgui/corelib
100- <fpGUI dir>/src/VERSION_FILE.inc ⇒ lazarus/lcl/interfaces/fpgui/VERSION_FILE.inc
101-
86+<fpGUI dir>/src/gui ⇒ lazarus/lcl/interfaces/fpgui/gui
10287
88+<fpGUI dir>/src/corelib ⇒ lazarus/lcl/interfaces/fpgui/corelib
89+
90+<fpGUI dir>/src/VERSION_FILE.inc ⇒ lazarus/lcl/interfaces/fpgui/VERSION_FILE.inc
91+
92+
93+
10394 * Option 2)
10495
105- 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:
96+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:
10697
10798
108- ln -s <fpGUI dir>/src/gui lazarus/lcl/interfaces/fpgui/gui
109- ln -s <fpGUI dir>/src/corelib lazarus/lcl/interfaces/fpgui/corelib
110- ln -s <fpGUI dir>/src/VERSION_FILE.inc lazarus/lcl/interfaces/fpgui/VERSION_FILE.inc
111-
99+ln -s <fpGUI dir>/src/gui lazarus/lcl/interfaces/fpgui/gui
100+
101+ln -s <fpGUI dir>/src/corelib lazarus/lcl/interfaces/fpgui/corelib
102+
103+ln -s <fpGUI dir>/src/VERSION_FILE.inc lazarus/lcl/interfaces/fpgui/VERSION_FILE.inc
104+
105+
112106
113107 5. Now you need to recompile LCL for the LCL-fpGUI widgetset
114108 1. **Using Lazarus (trunk)**
115109 1. Start a new LCL application
116110 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.
117111 * define IDE Macro: **LCLWidgetType := fpgui**
118112 * define IDE Macro: **fpGUIPlatform := gdi**(for Windows)
119113 * define IDE Macro: **fpGUIPlatform := x11**(for Linux/FreeBSD)
120114 3. Compile your project!
121115 2. **Using Lazarus 1.0.8 and earlier**
122116 1. Start a new LCL application
123117 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.
124118 3. Go to the menu Compiler Options, select **fpGUI** as the widgetset
125119 4. Compile your project!
126120
127121## Implementation details
128122
129123### Component mapping
130124
131125This is a table indication which FPGUI controls are used to build each LCL control.
132126
133127**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.
134128
135129
136130
137131LCL Control | FPGUI Control | Comments
138132---|---|---
139133TPageControl | TfpgPageControl | \-
140134TButton | TfpgButton | \-
141135TBitBtn | TfpgButton | fpGUI's standard button class supports images.
142136TSpeedButton | TfpgButton | fpGUI's standard button class supports images and flat look etc.
143137
144138## Road map for the fpGUI interface
145139
146140Here: [[Roadmap|Roadmap#Widgetset dependent components]]
147141
148142## See also
149143
150144 * [[fpGUI]] Toolkit
151145 * [**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.
152146
153147---
154148*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