Difference between revisions of "Adding a new interface"

From Free Pascal wiki
Jump to navigationJump to search
(New page: This article describes the steps to add a new wdiget set interface. This article is intended for developers who want to make an existing widget set available for use with the LCL. It descr...)
 
Line 7: Line 7:
 
Create a subdirectory pogo in lazarus\lcl\interface.
 
Create a subdirectory pogo in lazarus\lcl\interface.
  
'''TODO''': explain how to create a skeleton
+
Then copy the Makefile.fpc from one of the existing widgetsets and adapt it. For example change the ''unittargetdir''.
 +
Then create the Makefile:
 +
  export FPCDIR=/home/username/fpc_sources_2.3/
 +
  fpcmake -TAll -v
 +
  export FPCDIR=
 +
You '''must''' use the latest and greatest and unstable FPC sources, so that all FPC platforms are known in the Makefile.
 +
 
 +
Then copy the interfaces.pp from one of the other widgetsets and adapt it. For example rename the class to TPogoWidgetSet.
 +
 
 +
Then create a first unit pogoint.pp for the TPogoWidgetSet.
  
 
=== Update Makefiles ===
 
=== Update Makefiles ===

Revision as of 13:03, 15 February 2008

This article describes the steps to add a new wdiget set interface. This article is intended for developers who want to make an existing widget set available for use with the LCL. It describes the first steps to set up the directories and adapt the IDE for developing the new interface.

Steps

As example we write the steps for adding a new interface for the pogo widget set.

Create a directory for the interface

Create a subdirectory pogo in lazarus\lcl\interface.

Then copy the Makefile.fpc from one of the existing widgetsets and adapt it. For example change the unittargetdir. Then create the Makefile:

 export FPCDIR=/home/username/fpc_sources_2.3/
 fpcmake -TAll -v
 export FPCDIR=

You must use the latest and greatest and unstable FPC sources, so that all FPC platforms are known in the Makefile.

Then copy the interfaces.pp from one of the other widgetsets and adapt it. For example rename the class to TPogoWidgetSet.

Then create a first unit pogoint.pp for the TPogoWidgetSet.

Update Makefiles

Edit lazarus\lcl\intefaces\Makefile.fpc and append pogo to the Target directories

[target]
dirs=gtk gtk2 win32 wince qt carbon fpgui pogo

Generate the Makefile in lazarus\lcl\intefaces using Fpcmake.

cd lazarus\lcl\intefaces
fpcmake -Tall