Sign in Join

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

Mailing lists / lazarus / 2009-12

Define for the used windgetset

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Joost van der Sluis

Hi all,

Is it possible to add some define which can be used to detect the current widgetset? It would be usefull in a package to detect if the 'nogui' widgetset is used. But as it is now I see no way to do so?

Joost.

Reply by email

zeljko
to Joost van der Sluis
Joost van der Sluis wrote 5 lines
Hi all, Is it possible to add some define which can be used to detect the current widgetset? It would be usefull in a package to detect if the 'nogui' widgetset is used. But as it is now I see no way to do so?
{$IFDEF LCLNoGui} is not available ?

Reply by email

Marc Weustink
to Joost van der Sluis: Is it possible to add some define which can be used to detect the current widgetset? It…
Joost van der Sluis wrote 5 lines
Hi all, Is it possible to add some define which can be used to detect the current widgetset? It would be usefull in a package to detect if the 'nogui' widgetset is used. But as it is now I see no way to do so?

In theory it is possible to compile the LCL independent of the used widgetset. And it is possible to compile each widgetset separate. Only at link time these are linked togehter. Till then it is unknown, so a package extending the lcl should be able to handle that.

What you can check at runtime is WidgetSet.LCLPlatform=lpNoGUI

Marc

Reply by email

Mattias Gaertner
to Joost van der Sluis: Is it possible to add some define which can be used to detect the current widgetset? It…
Show quoted text 5 lines
Hi all, Is it possible to add some define which can be used to detect the current widgetset? It would be usefull in a package to detect if the 'nogui' widgetset is used. But as it is now I see no way to do so?
Compile time:
{$IFDEF LCLnogui}
Run time:
uses interfacebase;
if WidgetSet.LCLPlatform=lpNoGUI then

Mattias

Reply by email

Joost van der Sluis
to Marc Weustink: In theory it is possible to compile the LCL independent of the used widgetset. And it is…
Marc Weustink wrote 11 lines
Joost van der Sluis wrote: > Hi all, > > Is it possible to add some define which can be used to detect the > current widgetset? It would be usefull in a package to detect if the > 'nogui' widgetset is used. But as it is now I see no way to do so? In theory it is possible to compile the LCL independent of the used widgetset. And it is possible to compile each widgetset separate. Only at link time these are linked togehter. Till then it is unknown, so a package extending the lcl should be able to handle that.

Didn't thought of that. But in case it's a design-time issue it could work? I'll try the LCLnogui define as proposed by Matthias and Zeljko.

What you can check at runtime is WidgetSet.LCLPlatform=lpNoGUI

Thanks,

Joost

Reply by email