Difference between revisions of "LCL Defines"

From Lazarus wiki
Jump to navigationJump to search
Line 59: Line 59:
 
* '''USE_QT_44''' - The default Qt version utilized by the interface is 4.3 or superior. By setting this define you allow the interface to use qt 4.4 features like better QPrinter,QPainter support etc.Also, if you use this define, you must download qt bindings for 4.4 (1.66 or superior).
 
* '''USE_QT_44''' - The default Qt version utilized by the interface is 4.3 or superior. By setting this define you allow the interface to use qt 4.4 features like better QPrinter,QPainter support etc.Also, if you use this define, you must download qt bindings for 4.4 (1.66 or superior).
  
* '''QTOPIA''' - Build for qtopia/embedded Qt Interface. See also [[Qt4 binding|FreePascal Qt4 binding#Supported_Platforms]]
+
* '''QTOPIA''' - Build for qtopia/embedded Qt Interface. See also [[Qt4 binding#Supported_Platforms|Supported Platforms of FreePascal Qt4 binding]]
  
 
==Carbon defines==
 
==Carbon defines==

Revision as of 17:40, 5 January 2009

English (en) français (fr)

This page documents the defines that can be utilized to recompile the different widgetsets of LCL. It isn´t a compreensive list, but may become one as more defines are added.

Other Interfaces

Platform specific Tips

Interface Development Articles

Why use defines?

Defines allow to add non-standard functionality to LCL, test experimental features or to add debug output that helps testing the widgetsets.

Recompiling LCL with a define

To recompile LCL with a special define go to the Lazarus menu Tools -> "Configure Build Lazarus"

There add -d<DEFINE_NAME> on the Options box.

So if you wish to add the PassWin32MessagesToLCL define, you will add -dPassWin32MessagesToLCL to this box.


Win32 defines

  • PassWin32MessagesToLCL - Allows the use of user messages, i.e. messages greater then WM_USER + 32 - Made default and removed as of 0.9.25


  • WindowsUnicodeSupport - Toggles on experimental Unicode support on Windows.

WinCE defines

Gtk defines

DebugLCLComponents

This activates saving information on every creation or destruction of LCL components, device contexts, gdi objects (pen, brush, font, ...) and main widgets. It will spot mem leaks and double frees with stacktraces.

TraceGDICalls

This activates saving information on every creation or destruction of gdi objects (pen, brush, font, ...). It will spot mem leaks and double frees with stacktraces.

Qt defines

You can use the following defines while building LCL to configure your Qt Interface:

  • USE_QT_4_3 - The default Qt version utilized by the interface is 4.2 or superior. By setting this define you allow the interface to use 4.3+ features, like MDI Forms. - Made default and removed as of 0.9.25
  • VerboseQt - Writes extensive debug information about the creation and deletion of Qt objects and LCL Objects to the StdOut.
  • VerboseQtWinAPI - Writes extensive debug information about the Qt implementation of the functions on the LCLIntf unit to StdOut.
  • QT_HIDDEN_BUTTON_WORKAROUND - This activates a work around for a LCL miss-behavior which makes it create a hidden button to overcome some Gtk problem. This should be removed after LCL is fixed. Link for the bug: http://www.freepascal.org/mantis/view.php?id=9152
  • QT_LAZARUS_IDE_WORKAROUND - Activates workaround for invisible mainmenu inside lazarus ide, also moving offsets of TGraphicControl descendants , because geometry of form doesn't take TMainMenu height and TToolbar height into account. This should be removed, as soon as we fix offsets, and accounting of TMainMenu & TToolBar height.
  • VerboseQtWinAPI_MISSING_IMPLEMENTATION - Writes extensive debug information about the MISSING Qt implementation of the functions on the LCLIntf unit to StdOut.
  • VerboseQtWinAPI_DEBUG_CLIPBOARD - Writes extensive debug information about LCL clipboard operations.
  • QT_NO_MENU_EFFECTS - Turns off menu effects, fading and animating, which sometimes produces problems (eg. stays visible even they are closed). It is also possible that this is an Qt bug, but have to check it first.
  • USE_QT_44 - The default Qt version utilized by the interface is 4.3 or superior. By setting this define you allow the interface to use qt 4.4 features like better QPrinter,QPainter support etc.Also, if you use this define, you must download qt bindings for 4.4 (1.66 or superior).

Carbon defines

List of Carbon defines used to show debug info when tracing:

  • DebugEventLoop
  • VerboseObject - Carbon interface application
  • VerboseTimer
  • VerboseWinAPI
  • VerboseLCLIntf
  • VerboseMouse
  • VerboseCursor
  • VerboseKeyboard
  • VerbosePaint
  • VerboseCanvas
  • VerboseMenu
  • VerboseScroll
  • VerboseWidget - TCarbonWidget class
  • VerboseAppEvent - Carbon application event handlers
  • VerboseControlEvent - Carbon control event handlers
  • VerboseWindowEvent - Carbon window event handlers
  • VerboseCommonEvent - Carbon common event handlers
  • VerboseWSClass - TCarbonWS classes
  • VerboseCarbonTrayIcon - TCarbonWSTrayIcon verbose mode