Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-02

Widget set definitions

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Morgan Lloyd

I've got a bit of diagnostic code that I add to most programs that retrieves things like Subversion revision numbers and link-time build ID. It also contains

(*$IFDEF LCLQT *)
	  widV= 'Linked with the Qt widget set';
   (*$DEFINE WIDGETSET *)
(*$ENDIF       *)
(*$IFDEF LCLFPGUI *)
	  widV= 'Linked with the FPGUI widget set';
   (*$DEFINE WIDGETSET *)
(*$ENDIF       *)

and so on.

Presumably LCLQT and the rest are defined somewhere in the IDE or LCL, but where can I find this so that I can make sure that my code's kept in step?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Ondrej Pokorny
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
Presumably LCLQT and the rest are defined somewhere in the IDE or LCL, but where can I find this so that I can make sure that my code's kept in step?

They are defined in the LCL package. See "package options -> usage -> custom" and "Compiler Options -> Custom Options".

Ondrej

Reply by email

Mattias Gaertner
to Mark Morgan Lloyd: I've got a bit of diagnostic code that I add to most programs that retrieves things like…
Show quoted text 18 lines
I've got a bit of diagnostic code that I add to most programs that retrieves things like Subversion revision numbers and link-time build ID. It also contains (*$IFDEF LCLQT *) widV= 'Linked with the Qt widget set'; (*$DEFINE WIDGETSET *) (*$ENDIF *) (*$IFDEF LCLFPGUI *) widV= 'Linked with the FPGUI widget set'; (*$DEFINE WIDGETSET *) (*$ENDIF *) and so on. Presumably LCLQT and the rest are defined somewhere in the IDE or LCL, but where can I find this so that I can make sure that my code's kept in step?
uses InterfaceBase, LCLPlatformDef;
widV:='Linked with '+LCLPlatformDisplayNames[WidgetSet.LCLPlatform]+'
widget set';

Mattias

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner
Mattias Gaertner wrote
On Mon, 13 Feb 2017 09:23:35 +0000Mark Morgan Lloyd via Lazarus wrote: > I've got a bit of diagnostic code that I add to most programs that > retrieves things like Subversion revision numbers and link-time build > ID. It also contains> > (*$IFDEF LCLQT *)> widV= 'Linked with the Qt widget set';> (*$DEFINE WIDGETSET *)> (*$ENDIF *)> (*$IFDEF LCLFPGUI *)> widV= 'Linked with the FPGUI widget set';> (*$DEFINE WIDGETSET *)> (*$ENDIF *)> > and so on.> > Presumably LCLQT and the rest are defined somewhere in the IDE or LCL, > but where can I find this so that I can make sure that my code's kept in > step? uses InterfaceBase, LCLPlatformDef; widV:='Linked with '+LCLPlatformDisplayNames[WidgetSet.LCLPlatform]+'widget set';

OK, Thanks. So I can see how I can derive the names etc. from that, it appears to have been supported since the dawn of time, and linking to it is still going to be no more intrusive than some of the other stuff that's already in my diagnostic unit.

But out of curiosity, I'd still be very interested to know how the compile-time definitions like the ones in my example are generated :-)

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Kostas Michalopoulos
to Mark Morgan Lloyd

The LCL package has this in custom definitions for dependent packages:

-dLCL -dLCL$(LCLWidgetType)

So Lazarus simply defines the LCL and LCL<widgettype> at compile time. <widgettype> is one of the subdirectories in lcl/interfaces.

On Mon, Feb 13, 2017 at 12:21 PM, Mark Morgan Lloyd via Lazarus <

Show quoted text 40 lines
wrote: On 13/02/17 10:00, Mattias Gaertner via Lazarus wrote: > On Mon, 13 Feb 2017 09:23:35 +0000Mark Morgan Lloyd via Lazarus < > > wrote: > >> I've got a bit of diagnostic code that I add to most programs that > >> retrieves things like Subversion revision numbers and link-time build > ID. >> It also contains> > (*$IFDEF LCLQT *)> widV= 'Linked with the Qt >> widget set';> (*$DEFINE WIDGETSET *)> (*$ENDIF *)> (*$IFDEF >> LCLFPGUI *)> widV= 'Linked with the FPGUI widget set';> (*$DEFINE >> WIDGETSET *)> (*$ENDIF *)> > and so on.> > Presumably LCLQT and the >> rest are defined somewhere in the IDE or LCL, > but where can I find this >> so that I can make sure that my code's kept in > step? >> > uses InterfaceBase, LCLPlatformDef; > widV:='Linked with '+LCLPlatformDisplayNames[WidgetSet.LCLPlatform]+'widget > set'; > OK, Thanks. So I can see how I can derive the names etc. from that, it appears to have been supported since the dawn of time, and linking to it is still going to be no more intrusive than some of the other stuff that's already in my diagnostic unit. But out of curiosity, I'd still be very interested to know how the compile-time definitions like the ones in my example are generated :-) -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- _______________________________________________ Lazarus mailing list http://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170213/378fc4b0/attachment.html>

Reply by email