IDE, LCL: Lazarus help output refactoring by n7800, issue #40690:

1. The text has been slightly corrected and made more uniform.
2. The parameters are sorted in some logical order, starting with the more "global" ones. A long list of values for debugging is located at the end. Now all parameters are visible at once, without scrolling.
3. Indentations fixed.
4. The list of values for the --skip-checks parameter is listed in a column, similar to the values for the --debug-enable parameter. This is easier to read and does not create a very long line, which is visible in the screenshot.
5. The "LCL Interface specific options:" header is displayed only if such parameters exist.
6. Changed max line length to a more standard 80.
7. Help output has been moved in a nested function.
8. Removed unused code.
This commit is contained in:
Maxim Ganetsky 2024-01-20 02:31:54 +03:00
parent e585a9016f
commit f0eb9b849d
26 changed files with 338 additions and 444 deletions

View File

@ -146,27 +146,27 @@ resourcestring
lisErrOptionNeeded = 'Option at position %d needs an argument : %s'; lisErrOptionNeeded = 'Option at position %d needs an argument : %s';
// command line help // command line help
listhisHelpMessage = 'this help message'; lisThisHelpMessage = 'This help message.';
lisprimaryConfigDirectoryWhereLazarusStoresItsConfig = 'primary config '+ lisPrimaryConfigDirectoryWhereLazarusStoresItsConfig = 'Primary config '+
'directory where Lazarus stores its config files. Default is '; 'directory where Lazarus stores its config files. Default is "%s".';
lislazarusOptionsProjectFilename = 'lazarus [options] <project-filename>'; lisLazarusOptionsProjectFilename = 'lazarus [options] <project-filename>';
lisIDEOptions = 'IDE Options:'; lisIDEOptions = 'IDE Options:';
lisCmdLineLCLInterfaceSpecificOptions = 'LCL Interface specific options:'; lisCmdLineLCLInterfaceSpecificOptions = 'LCL Interface specific options:';
lisDoNotShowSplashScreen = 'Do not show splash screen'; lisDoNotShowSplashScreen = 'Do not show splash screen.';
lisSkipLoadingLastProject = 'Skip loading last project'; lisSkipLoadingLastProject = 'Skip loading last project.';
lisDoNotCheckIfAnotherIDEInstanceIsAlreadyRunning = '%sDo not check if ' lisDoNotCheckIfAnotherIDEInstanceIsAlreadyRunning = 'Do not check if '
+'another IDE instance is already running'; +'another IDE instance is already running.';
lisOverrideLanguage = 'Override language. For example --language=de.'+ lisOverrideLanguage = 'Override language. '+
' For possible values see files in the languages directory.'; 'For possible values see files in the "languages" directory. Example: "--language=de".';
lissecondaryConfigDirectoryWhereLazarusSearchesFor = 'secondary config '+ lisSecondaryConfigDirectoryWhereLazarusSearchesFor = 'Secondary config '+
'directory where Lazarus searches for config template files. Default is '; 'directory where Lazarus searches for config template files. Default is "%s".';
lisFileWhereDebugOutputIsWritten = lisFileWhereDebugOutputIsWritten =
'file where debug output is written to. If it is '+ 'File where debug output is written to. Default is write to the console.';
'not specified, debug output is written to the console.'; lisSkipStartupChecks = 'Skip selected checks at startup. Valid options are:';
lisSkipStartupChecks = 'Skip selected checks at startup.'; lisGroupsForDebugOutput = 'Enable or disable groups of debug output. ' +
lisGroupsForDebugOutput = 'Enable or Disable groups of debug output.' + 'Valid options are:';
' Valid Options are:'; lisLazarusDirOverride = 'Directory to be used as a basedirectory.';
lisLazarusDirOverride = 'directory to be used as a basedirectory';
lisMaximumNumberOfThreadsForCompilingInParallelDefaul = 'Maximum number of ' lisMaximumNumberOfThreadsForCompilingInParallelDefaul = 'Maximum number of '
+'threads for compiling in parallel. Default is 0 which guesses the ' +'threads for compiling in parallel. Default is 0 which guesses the '
+'number of cores in the system.'; +'number of cores in the system.';
@ -5495,11 +5495,11 @@ resourcestring
lisAddPackageSToListOfInstalledPackagesCombineWithBui = 'add package(s) to ' lisAddPackageSToListOfInstalledPackagesCombineWithBui = 'add package(s) to '
+'list of installed packages (combine with --build-ide to rebuild IDE).'; +'list of installed packages (combine with --build-ide to rebuild IDE).';
lisBuildIDEWithPackages = 'build IDE with packages'; lisBuildIDEWithPackages = 'build IDE with packages';
lisShowVersionAndExit = 'show version and exit'; lisShowVersionAndExit = 'Show version and exit.';
lisBeLessVerboseCanBeGivenMultipleTimes = 'be less verbose, can be given ' lisBeLessVerboseCanBeGivenMultipleTimes = 'Be less verbose. Can be given '
+'multiple times'; +'multiple times.';
lisBeMoreVerboseCanBeGivenMultipleTimes = 'be more verbose, can be given ' lisBeMoreVerboseCanBeGivenMultipleTimes = 'Be more verbose. Can be given '
+'multiple times'; +'multiple times.';
lisOverrideTheProjectOperatingSystemEGWin32LinuxDefau = '%soverride the ' lisOverrideTheProjectOperatingSystemEGWin32LinuxDefau = '%soverride the '
+'project operating system. e.g. win32 linux. default: %s'; +'project operating system. e.g. win32 linux. default: %s';
lisOverrideTheProjectWidgetsetEGGtkGtk2QtWin32CarbonD = '%soverride the ' lisOverrideTheProjectWidgetsetEGGtkGtk2QtWin32CarbonD = '%soverride the '
@ -5965,7 +5965,7 @@ resourcestring
lisCFETheComponentEditorOfClassHasCreatedTheError = 'The component editor ' lisCFETheComponentEditorOfClassHasCreatedTheError = 'The component editor '
+'of class "%s"has created the error:%s"%s"'; +'of class "%s"has created the error:%s"%s"';
lisShowSetupDialogForMostImportantSettings = 'Show setup dialog for most ' lisShowSetupDialogForMostImportantSettings = 'Show setup dialog for most '
+'important settings'; +'important settings.';
lisShowPositionOfSourceEditor = 'Show position of source editor'; lisShowPositionOfSourceEditor = 'Show position of source editor';
//Initial setup dialog //Initial setup dialog

View File

@ -1040,68 +1040,14 @@ end;
Parses the command line for the IDE. Parses the command line for the IDE.
-------------------------------------------------------------------------------} -------------------------------------------------------------------------------}
class procedure TMainIDE.ParseCmdLineOptions; class procedure TMainIDE.ParseCmdLineOptions;
const
space = ' ';
var var
AHelp: TStringList; lHelp: TStringList;
HelpLang: string; //
procedure TranslateHelp;
procedure AddHelp(Args: array of const);
var var
i: Integer; HelpLang: string;
s: String; ConfFileName: string;
begin Cfg: TXMLConfig;
s:='';
for i := Low(Args) to High(Args) do
begin
case Args[i].VType of
vtInteger: s+=dbgs(Args[i].vinteger);
vtInt64: s+=dbgs(Args[i].VInt64^);
vtQWord: s+=dbgs(Args[i].VQWord^);
vtBoolean: s+=dbgs(Args[i].vboolean);
vtExtended: s+=dbgs(Args[i].VExtended^);
{$ifdef FPC_CURRENCY_IS_INT64}
// fpc 2.x has troubles in choosing the right dbgs()
// so we convert here
vtCurrency: s+=dbgs(int64(Args[i].vCurrency^)/10000, 4);
{$else}
vtCurrency: s+=dbgs(Args[i].vCurrency^);
{$endif}
vtString: s+=Args[i].VString^;
vtAnsiString: s+=AnsiString(Args[i].VAnsiString);
vtChar: s+=Args[i].VChar;
vtPChar: s+=Args[i].VPChar;
vtPWideChar: {%H-}s+=Args[i].VPWideChar{%H-};
vtWideChar: {%H-}s+=Args[i].VWideChar{%H-};
vtWidestring: {%H-}s+=WideString(Args[i].VWideString){%H-};
vtObject: s+=DbgSName(Args[i].VObject);
vtClass: s+=DbgSName(Args[i].VClass);
vtPointer: s+=Dbgs(Args[i].VPointer);
end;
end;
AHelp.Add(s);
end;
procedure WriteHelp(const AText: string);
begin
if TextRec(Output).Mode = fmClosed then
// Note: do not use IDEMessageDialog here:
Dialogs.MessageDlg(lisInformation, AText, mtInformation, [mbOk],0)
else
WriteLn(UTF8ToConsole(AText));
Application.Terminate;
end;
var
i: integer;
ConfFileName: String;
Cfg: TXMLConfig;
begin
ParamBaseDirectory:=GetCurrentDirUTF8;
StartedByStartLazarus:=false;
SkipAutoLoadingLastProject:=false;
EnableRemoteControl:=false;
if IsHelpRequested then
begin begin
HelpLang := GetLanguageSpecified; HelpLang := GetLanguageSpecified;
if HelpLang = '' then if HelpLang = '' then
@ -1118,66 +1064,117 @@ begin
end; end;
end; end;
TranslateResourceStrings(ProgramDirectoryWithBundle, HelpLang); TranslateResourceStrings(ProgramDirectoryWithBundle, HelpLang);
end;
AHelp := TStringList.Create; //
AddHelp([lislazarusOptionsProjectFilename]); procedure WriteHelp(const AText: string);
AddHelp(['']); begin
AddHelp([lisIDEOptions]); if TextRec(Output).Mode = fmClosed then
AddHelp(['']); // Note: do not use IDEMessageDialog here:
AddHelp(['--help or -? ', listhisHelpMessage]); Dialogs.MessageDlg(lisInformation, AText, mtInformation, [mbOk], 0)
AddHelp(['']); else
AddHelp(['-v or --version ', lisShowVersionAndExit]); WriteLn(UTF8ToConsole(AText));
AddHelp(['--quiet ', lisBeLessVerboseCanBeGivenMultipleTimes]); Application.Terminate;
AddHelp(['--verbose ', lisBeMoreVerboseCanBeGivenMultipleTimes]); end;
AddHelp(['']); //
AddHelp([ShowSetupDialogOptLong]); function GetCmdLineParamDescForLazarus: TStringList;
AddHelp([BreakString(space+lisShowSetupDialogForMostImportantSettings, 75, 22)]); var
AddHelp(['']); e: TSkipAbleChecks;
AddHelp([PrimaryConfPathOptLong, ' <path>']); i: Integer;
AddHelp(['or ', PrimaryConfPathOptShort, ' <path>']); lDescr: String;
AddHelp([BreakString(space+lisprimaryConfigDirectoryWhereLazarusStoresItsConfig, lLogGroups: TStringList;
75, 22), LazConf.GetPrimaryConfigPath]); begin
AddHelp(['']); result := TStringList.Create;
AddHelp([SecondaryConfPathOptLong,' <path>']); // help
AddHelp(['or ',SecondaryConfPathOptShort,' <path>']); AddCmdLineParamDesc(result, ['-?', '-h', '--help'], lisThisHelpMessage);
AddHelp([BreakString(space+lissecondaryConfigDirectoryWhereLazarusSearchesFor, // version
75, 22), LazConf.GetSecondaryConfigPath]); AddCmdLineParamDesc(result, ['-v', '--version'], lisShowVersionAndExit);
AddHelp(['']); // language
AddHelp([SkipChecksOptLong,''.Join(',', SkipChecksKeys)]); AddCmdLineParamDesc(result, [LanguageOpt + '<id>'], lisOverrideLanguage);
AddHelp([BreakString(space+lisSkipStartupChecks, 75, 22)]); // setup
AddHelp(['']); AddCmdLineParamDesc(result, [ShowSetupDialogOptLong], lisShowSetupDialogForMostImportantSettings);
AddHelp([DebugLogOpt,' <file>']); // skipchecks
AddHelp([BreakString(space+lisFileWhereDebugOutputIsWritten, 75, 22)]); lDescr := lisSkipStartupChecks;
AddHelp(['']); for e := low(TSkipAbleChecks) to high(TSkipAbleChecks) do
AddHelp([DebugLogOptEnable,' [[-]OptName][,[-]OptName][...]']); lDescr := lDescr + LineEnding + SkipChecksKeys[e];
AddHelp([BreakString(space+lisGroupsForDebugOutput, 75, 22)]); AddCmdLineParamDesc(result, [SkipChecksOptLong + '[OptName][,OptName][...]'], lDescr);
// lazdir
AddCmdLineParamDesc(result, [LazarusDirOpt + '<directory>'], lisLazarusDirOverride);
// config
AddCmdLineParamDesc(result, [PrimaryConfPathOptShort + '<path>', PrimaryConfPathOptLong + '<path>'],
Format(lisPrimaryConfigDirectoryWhereLazarusStoresItsConfig, [LazConf.GetPrimaryConfigPath]));
AddCmdLineParamDesc(result, [SecondaryConfPathOptShort + '<path>', SecondaryConfPathOptLong + '<path>'],
Format(lisSecondaryConfigDirectoryWhereLazarusSearchesFor, [LazConf.GetSecondaryConfigPath]));
// new instance
AddCmdLineParamDesc(result, [ForceNewInstanceOpt], lisDoNotCheckIfAnotherIDEInstanceIsAlreadyRunning);
// skip last project
AddCmdLineParamDesc(result, [SkipLastProjectOpt], lisSkipLoadingLastProject);
// splash
AddCmdLineParamDesc(result, [NoSplashScreenOptShort, NoSplashScreenOptLong], lisDoNotShowSplashScreen);
// verbose
AddCmdLineParamDesc(result, ['--quiet'], lisBeLessVerboseCanBeGivenMultipleTimes);
AddCmdLineParamDesc(result, ['--verbose'], lisBeMoreVerboseCanBeGivenMultipleTimes);
// debug file
AddCmdLineParamDesc(result, [DebugLogOpt + '<file>'], lisFileWhereDebugOutputIsWritten);
// debug groups (sorted)
lLogGroups := TStringList.Create;
for i := 0 to DebugLogger.LogGroupList.Count - 1 do for i := 0 to DebugLogger.LogGroupList.Count - 1 do
AddHelp([space + DebugLogger.LogGroupList[i]^.ConfigName]); lLogGroups.Add(DebugLogger.LogGroupList[i]^.ConfigName);
AddHelp(['']); lLogGroups.Sort;
AddHelp([NoSplashScreenOptLong]); lDescr := lisGroupsForDebugOutput + LineEnding + lLogGroups.Text;
AddHelp(['or ',NoSplashScreenOptShort]); FreeAndNil(lLogGroups);
AddHelp([BreakString(space+lisDoNotShowSplashScreen,75, 22)]); AddCmdLineParamDesc(result, [DebugLogOptEnable + '[[-]OptName][,[-]OptName][...]'], lDescr);
AddHelp(['']); end;
AddHelp([ForceNewInstanceOpt]); //
AddHelp([BreakString(Format( // lOptions is freed at the end
lisDoNotCheckIfAnotherIDEInstanceIsAlreadyRunning, [space]), 75, 22)]); procedure AddHelpSection(aHeader: string; lOptions: TStringList);
AddHelp(['']); const
AddHelp([SkipLastProjectOpt]); cDescrIndent = 16;
AddHelp([BreakString(space+lisSkipLoadingLastProject, 75, 22)]); cMaxLength = 80;
AddHelp(['']); var
AddHelp([LanguageOpt]); i: Integer;
AddHelp([BreakString(space+lisOverrideLanguage,75, 22)]); begin
AddHelp(['']); if lOptions = nil then exit;
AddHelp([LazarusDirOpt,'<directory>']);
AddHelp([BreakString(space+lisLazarusDirOverride, 75, 22)]);
AddHelp(['']);
AddHelp([lisCmdLineLCLInterfaceSpecificOptions]);
AddHelp(['']);
AddHelp([GetCmdLineParamDescForInterface]);
AddHelp(['']);
WriteHelp(AHelp.Text); // header
AHelp.Free; lHelp.Add('');
lHelp.Add(aHeader);
lHelp.Add('');
// indent for descriptions (all lines not starting with '-' or '/')
for i := 0 to lOptions.Count - 1 do
if (lOptions[i] <> '') and not (lOptions[i][1] in ['-', '/']) then
lOptions[i] := BreakString(StringOfChar(' ', cDescrIndent) + lOptions[i], cMaxLength, cDescrIndent);
lHelp.AddStrings(lOptions);
FreeThenNil(lOptions);
end;
//
procedure CallHelp;
begin
TranslateHelp;
lHelp := TStringList.Create;
// command line
lHelp.Add(lisLazarusOptionsProjectFilename);
// IDE options
AddHelpSection(lisIDEOptions, GetCmdLineParamDescForLazarus);
// interface options
AddHelpSection(lisCmdLineLCLInterfaceSpecificOptions, GetCmdLineParamDescForInterface);
WriteHelp(lHelp.Text);
FreeThenNil(lHelp);
end;
//
begin
ParamBaseDirectory:=GetCurrentDirUTF8;
StartedByStartLazarus:=false;
SkipAutoLoadingLastProject:=false;
EnableRemoteControl:=false;
if IsHelpRequested then
begin
CallHelp;
exit; exit;
end; end;
if IsVersionRequested then if IsVersionRequested then

View File

@ -373,9 +373,9 @@ begin
Result := false; Result := false;
end; end;
function TWidgetSet.GetCmdLineParamDescForInterface: string; function TWidgetSet.GetCmdLineParamDescForInterface: TStringList;
begin begin
Result := ''; Result := nil;
end; end;
function TWidgetSet.GetControlConstraints(Constraints: TObject): boolean; function TWidgetSet.GetControlConstraints(Constraints: TObject): boolean;

View File

@ -238,7 +238,7 @@ end;
Returns a description of the command line parameters, that are understood by Returns a description of the command line parameters, that are understood by
the interface. the interface.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function GetCmdLineParamDescForInterface: string; function GetCmdLineParamDescForInterface: TStringList;
begin begin
Result := WidgetSet.GetCmdLineParamDescForInterface; Result := WidgetSet.GetCmdLineParamDescForInterface;
end; end;

View File

@ -70,7 +70,7 @@ function GetAvailableNativeCanvasTypes(DC: HDC; AAllowFallbackToParent: Boolean
function GetAvailableNativeHandleTypes(Handle: HWND; AAllowFallbackToParent: Boolean = False): TNativeHandleTypes; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} function GetAvailableNativeHandleTypes(Handle: HWND; AAllowFallbackToParent: Boolean = False): TNativeHandleTypes; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function GetCaretRespondToFocus(handle: HWND; var ShowHideOnFocus: boolean): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} function GetCaretRespondToFocus(handle: HWND; var ShowHideOnFocus: boolean): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function GetClientBounds(handle : HWND; var ARect: TRect) : Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} function GetClientBounds(handle : HWND; var ARect: TRect) : Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function GetCmdLineParamDescForInterface: string; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} function GetCmdLineParamDescForInterface: TStringList; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function GetControlConstraints(Constraints: TObject): boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} function GetControlConstraints(Constraints: TObject): boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function GetDCOriginRelativeToWindow(PaintDC: HDC; WindowHandle: HWND; var OriginDiff: TPoint): boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} function GetDCOriginRelativeToWindow(PaintDC: HDC; WindowHandle: HWND; var OriginDiff: TPoint): boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function GetDesignerDC(WindowHandle: HWND): HDC; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} function GetDesignerDC(WindowHandle: HWND): HDC; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}

View File

@ -1306,7 +1306,7 @@ begin
Result := TCarbonDeviceContext(DC).CopyClipRegion(TCarbonRegion(RGN)); Result := TCarbonDeviceContext(DC).CopyClipRegion(TCarbonRegion(RGN));
end; end;
function TCarbonWidgetSet.GetCmdLineParamDescForInterface: string; function TCarbonWidgetSet.GetCmdLineParamDescForInterface: TStringList;
begin begin
Result:=inherited GetCmdLineParamDescForInterface; Result:=inherited GetCmdLineParamDescForInterface;
end; end;

View File

@ -98,7 +98,7 @@ function GetClientBounds(Handle: HWND; var ARect: TRect): Boolean; override;
function GetClientRect(Handle: HWND; var ARect: TRect): Boolean; override; function GetClientRect(Handle: HWND; var ARect: TRect): Boolean; override;
function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override; function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override;
function GetClipRGN(DC : hDC; RGN : hRGN) : Longint; override; function GetClipRGN(DC : hDC; RGN : hRGN) : Longint; override;
function GetCmdLineParamDescForInterface: string; override; function GetCmdLineParamDescForInterface: TStringList; override;
function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override; function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override;
function GetCursorPos(var lpPoint: TPoint): Boolean; override; function GetCursorPos(var lpPoint: TPoint): Boolean; override;
function GetDC(HWnd: HWND): HDC; override; function GetDC(HWnd: HWND): HDC; override;

View File

@ -2576,40 +2576,6 @@ begin
end; end;
end; end;
(*function TQtWidgetSet.GetCmdLineParamDescForInterface: string;
function b(const s: string): string;
begin
Result:=BreakString(s,75,22)+LineEnding+LineEnding;
end;
begin
Result:=
b(rsqtOptionNoGrab)
+b(rsqtOptionDoGrab)
+b(rsqtOptionSync)
+b(rsqtOptionStyle)
+b(rsqtOptionStyleSheet)
+b(rsqtOptionGraphicsStyle)
+b(rsqtOptionSession)
+b(rsqtOptionWidgetCount)
+b(rsqtOptionReverse)
{$IFDEF HASX11}
+b(rsqtOptionX11Display)
+b(rsqtOptionX11Geometry)
+b(rsqtOptionX11Font)
+b(rsqtOptionX11BgColor)
+b(rsqtOptionX11FgColor)
+b(rsqtOptionX11BtnColor)
+b(rsqtOptionX11Name)
+b(rsqtOptionX11Title)
+b(rsqtOptionX11Visual)
+b(rsqtOptionX11NCols)
+b(rsqtOptionX11CMap)
+b(rsqtOptionX11IM)
+b(rsqtOptionX11InputStyle)
{$ENDIF}
;
end;*)
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Method: GetCurrentObject Method: GetCurrentObject
Params: Params:

View File

@ -2634,40 +2634,6 @@ begin
end; end;
end; end;
function TQtWidgetSet.GetCmdLineParamDescForInterface: string;
function b(const s: string): string;
begin
Result:=BreakString(s,75,22)+LineEnding+LineEnding;
end;
begin
Result:=
b(rsqtOptionNoGrab)
+b(rsqtOptionDoGrab)
+b(rsqtOptionSync)
+b(rsqtOptionStyle)
+b(rsqtOptionStyleSheet)
+b(rsqtOptionGraphicsStyle)
+b(rsqtOptionSession)
+b(rsqtOptionWidgetCount)
+b(rsqtOptionReverse)
{$IFDEF HASX11}
+b(rsqtOptionX11Display)
+b(rsqtOptionX11Geometry)
+b(rsqtOptionX11Font)
+b(rsqtOptionX11BgColor)
+b(rsqtOptionX11FgColor)
+b(rsqtOptionX11BtnColor)
+b(rsqtOptionX11Name)
+b(rsqtOptionX11Title)
+b(rsqtOptionX11Visual)
+b(rsqtOptionX11NCols)
+b(rsqtOptionX11CMap)
+b(rsqtOptionX11IM)
+b(rsqtOptionX11InputStyle)
{$ENDIF}
;
end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Method: GetCurrentObject Method: GetCurrentObject
Params: Params:

View File

@ -2619,40 +2619,6 @@ begin
end; end;
end; end;
function TQtWidgetSet.GetCmdLineParamDescForInterface: string;
function b(const s: string): string;
begin
Result:=BreakString(s,75,22)+LineEnding+LineEnding;
end;
begin
Result:=
b(rsqtOptionNoGrab)
+b(rsqtOptionDoGrab)
+b(rsqtOptionSync)
+b(rsqtOptionStyle)
+b(rsqtOptionStyleSheet)
+b(rsqtOptionGraphicsStyle)
+b(rsqtOptionSession)
+b(rsqtOptionWidgetCount)
+b(rsqtOptionReverse)
{$IFDEF HASX11}
+b(rsqtOptionX11Display)
+b(rsqtOptionX11Geometry)
+b(rsqtOptionX11Font)
+b(rsqtOptionX11BgColor)
+b(rsqtOptionX11FgColor)
+b(rsqtOptionX11BtnColor)
+b(rsqtOptionX11Name)
+b(rsqtOptionX11Title)
+b(rsqtOptionX11Visual)
+b(rsqtOptionX11NCols)
+b(rsqtOptionX11CMap)
+b(rsqtOptionX11IM)
+b(rsqtOptionX11InputStyle)
{$ENDIF}
;
end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Method: GetCurrentObject Method: GetCurrentObject
Params: Params:

View File

@ -106,7 +106,7 @@ function BackendGetClientBounds(handle : HWND; var ARect : TRect) : Boolean;
function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override; function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override;
function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override; function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override;
function GetClipRGN(DC: hDC; RGN: hRGN): Longint; override; function GetClipRGN(DC: hDC; RGN: hRGN): Longint; override;
//function GetCmdLineParamDescForInterface: string; override; //function GetCmdLineParamDescForInterface: TStringList; override;
function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override; function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override;
function GetCursorPos(var lpPoint: TPoint ): Boolean; override; function GetCursorPos(var lpPoint: TPoint ): Boolean; override;
function GetDC(hWnd: HWND): HDC; override; function GetDC(hWnd: HWND): HDC; override;

View File

@ -4831,26 +4831,22 @@ end;
Returns a description of the command line parameters, that are understood by Returns a description of the command line parameters, that are understood by
the interface. the interface.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function TGtkWidgetSet.GetCmdLineParamDescForInterface: string; function TGtkWidgetSet.GetCmdLineParamDescForInterface: TStringList;
function b(const s: string): string;
begin
Result:=BreakString(s,75,22)+LineEnding+LineEnding;
end;
begin begin
Result:= result := TStringList.Create;
b(rsgtkOptionNoTransient)
+b(rsgtkOptionModule) AddCmdLineParamDesc(result, ['--lcl-no-transient'], rsgtkOptionNoTransient);
+b(rsgOptionFatalWarnings) AddCmdLineParamDesc(result, ['--gtk-module <module>'], rsgtkOptionModule);
+b(rsgtkOptionDebug) AddCmdLineParamDesc(result, ['--g-fatal-warnings'], rsgOptionFatalWarnings);
+b(rsgtkOptionNoDebug) AddCmdLineParamDesc(result, ['--gtk-debug <flags>'], rsgtkOptionDebug);
+b(rsgdkOptionDebug) AddCmdLineParamDesc(result, ['--gtk-no-debug <flags>'], rsgtkOptionNoDebug);
+b(rsgdkOptionNoDebug) AddCmdLineParamDesc(result, ['--gdk-debug <flags>'], rsgdkOptionDebug);
+b(rsgtkOptionDisplay) AddCmdLineParamDesc(result, ['--gdk-no-debug <flags>'], rsgdkOptionNoDebug);
+b(rsgtkOptionSync) AddCmdLineParamDesc(result, ['--display <h:s:d>'], rsgtkOptionDisplay);
+b(rsgtkOptionNoXshm) AddCmdLineParamDesc(result, ['--sync'], rsgtkOptionSync);
+b(rsgtkOptionName) AddCmdLineParamDesc(result, ['--no-xshm'], rsgtkOptionNoXshm);
+b(rsgtkOptionClass); AddCmdLineParamDesc(result, ['--name <progname>'], rsgtkOptionName);
AddCmdLineParamDesc(result, ['--class <classname>'], rsgtkOptionClass);
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------

View File

@ -94,7 +94,7 @@ function GetClientBounds(handle : HWND; var ARect : TRect) : Boolean; override;
function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override; function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override;
function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override; function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override;
function GetClipRGN(DC : hDC; RGN : hRGN) : Longint; override; function GetClipRGN(DC : hDC; RGN : hRGN) : Longint; override;
function GetCmdLineParamDescForInterface: string; override; function GetCmdLineParamDescForInterface: TStringList; override;
function GetCursorPos(var lpPoint: TPoint): Boolean; override; function GetCursorPos(var lpPoint: TPoint): Boolean; override;
function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override; function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override;
function GetDC(hWnd: HWND): HDC; override; function GetDC(hWnd: HWND): HDC; override;

View File

@ -4620,27 +4620,23 @@ end;
Returns a description of the command line parameters, that are understood by Returns a description of the command line parameters, that are understood by
the interface. the interface.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function TGtk2WidgetSet.GetCmdLineParamDescForInterface: string; function TGtk2WidgetSet.GetCmdLineParamDescForInterface: TStringList;
function b(const s: string): string;
begin
Result:=BreakString(s,75,22)+LineEnding+LineEnding;
end;
begin begin
Result:= result := TStringList.Create;
b(rsgtkOptionNoTransient)
+b(rsgtkOptionModule) AddCmdLineParamDesc(result, ['--lcl-no-transient'], rsgtkOptionNoTransient);
+b(rsgOptionFatalWarnings) AddCmdLineParamDesc(result, ['--gtk-module <module>'], rsgtkOptionModule);
+b(rsgtkOptionDebug) AddCmdLineParamDesc(result, ['--g-fatal-warnings'], rsgOptionFatalWarnings);
+b(rsgtkOptionNoDebug) AddCmdLineParamDesc(result, ['--gtk-debug <flags>'], rsgtkOptionDebug);
+b(rsgdkOptionDebug) AddCmdLineParamDesc(result, ['--gtk-no-debug <flags>'], rsgtkOptionNoDebug);
+b(rsgdkOptionNoDebug) AddCmdLineParamDesc(result, ['--gdk-debug <flags>'], rsgdkOptionDebug);
+b(rsgtkOptionDisplay) AddCmdLineParamDesc(result, ['--gdk-no-debug <flags>'], rsgdkOptionNoDebug);
+b(rsgtkOptionSync) AddCmdLineParamDesc(result, ['--display <h:s:d>'], rsgtkOptionDisplay);
+b(rsgtkOptionNoXshm) AddCmdLineParamDesc(result, ['--sync'], rsgtkOptionSync);
+b(rsgtkOptionName) AddCmdLineParamDesc(result, ['--no-xshm'], rsgtkOptionNoXshm);
+b(rsgtkOptionClass) AddCmdLineParamDesc(result, ['--name <progname>'], rsgtkOptionName);
+b(rsqtOptionDisableAccurateFrame); AddCmdLineParamDesc(result, ['--class <classname>'], rsgtkOptionClass);
AddCmdLineParamDesc(result, ['--disableaccurateframe'], rsqtOptionDisableAccurateFrame);
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------

View File

@ -111,7 +111,7 @@ function GetClientBounds(handle : HWND; var ARect : TRect) : Boolean; override;
function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override; function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override;
function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override; function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override;
function GetClipRGN(DC : hDC; RGN : hRGN) : Longint; override; function GetClipRGN(DC : hDC; RGN : hRGN) : Longint; override;
function GetCmdLineParamDescForInterface: string; override; function GetCmdLineParamDescForInterface: TStringList; override;
function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override; function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override;
function GetCursorPos(var lpPoint: TPoint): Boolean; override; function GetCursorPos(var lpPoint: TPoint): Boolean; override;
function GetDC(hWnd: HWND): HDC; override; function GetDC(hWnd: HWND): HDC; override;

View File

@ -1911,7 +1911,7 @@ begin
end; end;
end; end;
function TGtk3WidgetSet.GetCmdLineParamDescForInterface: string; function TGtk3WidgetSet.GetCmdLineParamDescForInterface: TStringList;
begin begin
{$IFDEF GTK3DEBUGNOTIMPLEMENTED} {$IFDEF GTK3DEBUGNOTIMPLEMENTED}
DebugLn('WARNING: TGtk3WidgetSet.GetCmdLineParamDescForInterface not implemented ...'); DebugLn('WARNING: TGtk3WidgetSet.GetCmdLineParamDescForInterface not implemented ...');

View File

@ -112,7 +112,7 @@ function GetClientBounds(handle : HWND; var ARect : TRect) : Boolean; override;
function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override; function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override;
function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override; function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override;
function GetClipRGN(DC : hDC; RGN : hRGN) : Longint; override; function GetClipRGN(DC : hDC; RGN : hRGN) : Longint; override;
function GetCmdLineParamDescForInterface: string; override; function GetCmdLineParamDescForInterface: TStringList; override;
function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override; function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override;
function GetCursorPos(var lpPoint: TPoint): Boolean; override; function GetCursorPos(var lpPoint: TPoint): Boolean; override;
function GetDC(hWnd: HWND): HDC; override; function GetDC(hWnd: HWND): HDC; override;

View File

@ -2791,39 +2791,35 @@ begin
end; end;
end; end;
function TQtWidgetSet.GetCmdLineParamDescForInterface: string; function TQtWidgetSet.GetCmdLineParamDescForInterface: TStringList;
function b(const s: string): string;
begin
Result:=BreakString(s,75,22)+LineEnding+LineEnding;
end;
begin begin
Result:= result := TStringList.Create;
b(rsqtOptionNoGrab)
+b(rsqtOptionDoGrab) AddCmdLineParamDesc(result, ['-nograb'], rsqtOptionNoGrab);
+b(rsqtOptionSync) AddCmdLineParamDesc(result, ['-dograb'], rsqtOptionDoGrab);
+b(rsqtOptionStyle) AddCmdLineParamDesc(result, ['-sync'], rsqtOptionSync);
+b(rsqtOptionStyleSheet) AddCmdLineParamDesc(result, ['-style <style>', '-style=<style>'], rsqtOptionStyle);
+b(rsqtOptionGraphicsStyle) AddCmdLineParamDesc(result, ['-stylesheet <stylesheet>', '-stylesheet=<stylesheet>'], rsqtOptionStyleSheet);
+b(rsqtOptionSession) AddCmdLineParamDesc(result, ['-graphicssystem <param>'], rsqtOptionGraphicsStyle);
+b(rsqtOptionWidgetCount) AddCmdLineParamDesc(result, ['-session <session>'], rsqtOptionSession);
+b(rsqtOptionReverse) AddCmdLineParamDesc(result, ['-widgetcount'], rsqtOptionWidgetCount);
{$IFDEF HASX11} AddCmdLineParamDesc(result, ['-reverse'], rsqtOptionReverse);
+b(rsqtOptionX11Display) {$IFDEF HASX11}
+b(rsqtOptionX11Geometry) AddCmdLineParamDesc(result, ['-display <display>'], rsqtOptionX11Display);
+b(rsqtOptionX11Font) AddCmdLineParamDesc(result, ['-geometry <geometry>'], rsqtOptionX11Geometry);
+b(rsqtOptionX11BgColor) AddCmdLineParamDesc(result, ['-fn <font>', '-font <font>'], rsqtOptionX11Font);
+b(rsqtOptionX11FgColor) AddCmdLineParamDesc(result, ['-bg <color>', '-background <color>'], rsqtOptionX11BgColor);
+b(rsqtOptionX11BtnColor) AddCmdLineParamDesc(result, ['-fg <color>', '-foreground <color>'], rsqtOptionX11FgColor);
+b(rsqtOptionX11Name) AddCmdLineParamDesc(result, ['-btn <color>', '-button <color>'], rsqtOptionX11BtnColor);
+b(rsqtOptionX11Title) AddCmdLineParamDesc(result, ['-name <name>'], rsqtOptionX11Name);
+b(rsqtOptionX11Visual) AddCmdLineParamDesc(result, ['-title <title>'], rsqtOptionX11Title);
+b(rsqtOptionX11NCols) AddCmdLineParamDesc(result, ['-visual TrueColor'], rsqtOptionX11Visual);
+b(rsqtOptionX11CMap) AddCmdLineParamDesc(result, ['-ncols <count>'], rsqtOptionX11NCols);
+b(rsqtOptionX11IM) AddCmdLineParamDesc(result, ['-cmap'], rsqtOptionX11CMap);
+b(rsqtOptionX11InputStyle) AddCmdLineParamDesc(result, ['-im'], rsqtOptionX11IM);
+b(rsqtOptionDisableAccurateFrame) AddCmdLineParamDesc(result, ['-inputstyle'], rsqtOptionX11InputStyle);
{$ENDIF} AddCmdLineParamDesc(result, ['-disableaccurateframe'], rsqtOptionDisableAccurateFrame);
; {$ENDIF}
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------

View File

@ -96,7 +96,7 @@ function GetClientBounds(handle : HWND; var ARect : TRect) : Boolean; override;
function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override; function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override;
function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override; function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override;
function GetClipRGN(DC: hDC; RGN: hRGN): Longint; override; function GetClipRGN(DC: hDC; RGN: hRGN): Longint; override;
function GetCmdLineParamDescForInterface: string; override; function GetCmdLineParamDescForInterface: TStringList; override;
function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override; function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override;
function GetCursorPos(var lpPoint: TPoint ): Boolean; override; function GetCursorPos(var lpPoint: TPoint ): Boolean; override;
function GetDC(hWnd: HWND): HDC; override; function GetDC(hWnd: HWND): HDC; override;

View File

@ -2732,39 +2732,35 @@ begin
end; end;
end; end;
function TQtWidgetSet.GetCmdLineParamDescForInterface: string; function TQtWidgetSet.GetCmdLineParamDescForInterface: TStringList;
function b(const s: string): string;
begin
Result:=BreakString(s,75,22)+LineEnding+LineEnding;
end;
begin begin
Result:= result := TStringList.Create;
b(rsqtOptionNoGrab)
+b(rsqtOptionDoGrab) AddCmdLineParamDesc(result, ['-nograb'], rsqtOptionNoGrab);
+b(rsqtOptionSync) AddCmdLineParamDesc(result, ['-dograb'], rsqtOptionDoGrab);
+b(rsqtOptionStyle) AddCmdLineParamDesc(result, ['-sync'], rsqtOptionSync);
+b(rsqtOptionStyleSheet) AddCmdLineParamDesc(result, ['-style <style>', '-style=<style>'], rsqtOptionStyle);
+b(rsqtOptionGraphicsStyle) AddCmdLineParamDesc(result, ['-stylesheet <stylesheet>', '-stylesheet=<stylesheet>'], rsqtOptionStyleSheet);
+b(rsqtOptionSession) AddCmdLineParamDesc(result, ['-graphicssystem <param>'], rsqtOptionGraphicsStyle);
+b(rsqtOptionWidgetCount) AddCmdLineParamDesc(result, ['-session <session>'], rsqtOptionSession);
+b(rsqtOptionReverse) AddCmdLineParamDesc(result, ['-widgetcount'], rsqtOptionWidgetCount);
{$IFDEF HASX11} AddCmdLineParamDesc(result, ['-reverse'], rsqtOptionReverse);
+b(rsqtOptionX11Display) {$IFDEF HASX11}
+b(rsqtOptionX11Geometry) AddCmdLineParamDesc(result, ['-display <display>'], rsqtOptionX11Display);
+b(rsqtOptionX11Font) AddCmdLineParamDesc(result, ['-geometry <geometry>'], rsqtOptionX11Geometry);
+b(rsqtOptionX11BgColor) AddCmdLineParamDesc(result, ['-fn <font>', '-font <font>'], rsqtOptionX11Font);
+b(rsqtOptionX11FgColor) AddCmdLineParamDesc(result, ['-bg <color>', '-background <color>'], rsqtOptionX11BgColor);
+b(rsqtOptionX11BtnColor) AddCmdLineParamDesc(result, ['-fg <color>', '-foreground <color>'], rsqtOptionX11FgColor);
+b(rsqtOptionX11Name) AddCmdLineParamDesc(result, ['-btn <color>', '-button <color>'], rsqtOptionX11BtnColor);
+b(rsqtOptionX11Title) AddCmdLineParamDesc(result, ['-name <name>'], rsqtOptionX11Name);
+b(rsqtOptionX11Visual) AddCmdLineParamDesc(result, ['-title <title>'], rsqtOptionX11Title);
+b(rsqtOptionX11NCols) AddCmdLineParamDesc(result, ['-visual TrueColor'], rsqtOptionX11Visual);
+b(rsqtOptionX11CMap) AddCmdLineParamDesc(result, ['-ncols <count>'], rsqtOptionX11NCols);
+b(rsqtOptionX11IM) AddCmdLineParamDesc(result, ['-cmap'], rsqtOptionX11CMap);
+b(rsqtOptionX11InputStyle) AddCmdLineParamDesc(result, ['-im'], rsqtOptionX11IM);
+b(rsqtOptionDisableAccurateFrame) AddCmdLineParamDesc(result, ['-inputstyle'], rsqtOptionX11InputStyle);
{$ENDIF} AddCmdLineParamDesc(result, ['-disableaccurateframe'], rsqtOptionDisableAccurateFrame);
; {$ENDIF}
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------

View File

@ -96,7 +96,7 @@ function GetClientBounds(handle : HWND; var ARect : TRect) : Boolean; override;
function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override; function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override;
function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override; function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override;
function GetClipRGN(DC: hDC; RGN: hRGN): Longint; override; function GetClipRGN(DC: hDC; RGN: hRGN): Longint; override;
function GetCmdLineParamDescForInterface: string; override; function GetCmdLineParamDescForInterface: TStringList; override;
function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override; function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override;
function GetCursorPos(var lpPoint: TPoint ): Boolean; override; function GetCursorPos(var lpPoint: TPoint ): Boolean; override;
function GetDC(hWnd: HWND): HDC; override; function GetDC(hWnd: HWND): HDC; override;

View File

@ -2729,39 +2729,35 @@ begin
end; end;
end; end;
function TQtWidgetSet.GetCmdLineParamDescForInterface: string; function TQtWidgetSet.GetCmdLineParamDescForInterface: TStringList;
function b(const s: string): string;
begin
Result:=BreakString(s,75,22)+LineEnding+LineEnding;
end;
begin begin
Result:= result := TStringList.Create;
b(rsqtOptionNoGrab)
+b(rsqtOptionDoGrab) AddCmdLineParamDesc(result, ['-nograb'], rsqtOptionNoGrab);
+b(rsqtOptionSync) AddCmdLineParamDesc(result, ['-dograb'], rsqtOptionDoGrab);
+b(rsqtOptionStyle) AddCmdLineParamDesc(result, ['-sync'], rsqtOptionSync);
+b(rsqtOptionStyleSheet) AddCmdLineParamDesc(result, ['-style <style>', '-style=<style>'], rsqtOptionStyle);
+b(rsqtOptionGraphicsStyle) AddCmdLineParamDesc(result, ['-stylesheet <stylesheet>', '-stylesheet=<stylesheet>'], rsqtOptionStyleSheet);
+b(rsqtOptionSession) AddCmdLineParamDesc(result, ['-graphicssystem <param>'], rsqtOptionGraphicsStyle);
+b(rsqtOptionWidgetCount) AddCmdLineParamDesc(result, ['-session <session>'], rsqtOptionSession);
+b(rsqtOptionReverse) AddCmdLineParamDesc(result, ['-widgetcount'], rsqtOptionWidgetCount);
{$IFDEF HASX11} AddCmdLineParamDesc(result, ['-reverse'], rsqtOptionReverse);
+b(rsqtOptionX11Display) {$IFDEF HASX11}
+b(rsqtOptionX11Geometry) AddCmdLineParamDesc(result, ['-display <display>'], rsqtOptionX11Display);
+b(rsqtOptionX11Font) AddCmdLineParamDesc(result, ['-geometry <geometry>'], rsqtOptionX11Geometry);
+b(rsqtOptionX11BgColor) AddCmdLineParamDesc(result, ['-fn <font>', '-font <font>'], rsqtOptionX11Font);
+b(rsqtOptionX11FgColor) AddCmdLineParamDesc(result, ['-bg <color>', '-background <color>'], rsqtOptionX11BgColor);
+b(rsqtOptionX11BtnColor) AddCmdLineParamDesc(result, ['-fg <color>', '-foreground <color>'], rsqtOptionX11FgColor);
+b(rsqtOptionX11Name) AddCmdLineParamDesc(result, ['-btn <color>', '-button <color>'], rsqtOptionX11BtnColor);
+b(rsqtOptionX11Title) AddCmdLineParamDesc(result, ['-name <name>'], rsqtOptionX11Name);
+b(rsqtOptionX11Visual) AddCmdLineParamDesc(result, ['-title <title>'], rsqtOptionX11Title);
+b(rsqtOptionX11NCols) AddCmdLineParamDesc(result, ['-visual TrueColor'], rsqtOptionX11Visual);
+b(rsqtOptionX11CMap) AddCmdLineParamDesc(result, ['-ncols <count>'], rsqtOptionX11NCols);
+b(rsqtOptionX11IM) AddCmdLineParamDesc(result, ['-cmap'], rsqtOptionX11CMap);
+b(rsqtOptionX11InputStyle) AddCmdLineParamDesc(result, ['-im'], rsqtOptionX11IM);
+b(rsqtOptionDisableAccurateFrame) AddCmdLineParamDesc(result, ['-inputstyle'], rsqtOptionX11InputStyle);
{$ENDIF} AddCmdLineParamDesc(result, ['-disableaccurateframe'], rsqtOptionDisableAccurateFrame);
; {$ENDIF}
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------

View File

@ -96,7 +96,7 @@ function GetClientBounds(handle : HWND; var ARect : TRect) : Boolean; override;
function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override; function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override;
function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override; function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override;
function GetClipRGN(DC: hDC; RGN: hRGN): Longint; override; function GetClipRGN(DC: hDC; RGN: hRGN): Longint; override;
function GetCmdLineParamDescForInterface: string; override; function GetCmdLineParamDescForInterface: TStringList; override;
function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override; function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override;
function GetCursorPos(var lpPoint: TPoint ): Boolean; override; function GetCursorPos(var lpPoint: TPoint ): Boolean; override;
function GetDC(hWnd: HWND): HDC; override; function GetDC(hWnd: HWND): HDC; override;

View File

@ -1471,7 +1471,7 @@ begin
Result := Windows.GetCurrentObject(DC, uObjectType); Result := Windows.GetCurrentObject(DC, uObjectType);
end; end;
{function TWinCEWidgetSet.GetCmdLineParamDescForInterface: string; {function TWinCEWidgetSet.GetCmdLineParamDescForInterface: TStringList;
begin begin
Result:=inherited GetCmdLineParamDescForInterface; Result:=inherited GetCmdLineParamDescForInterface;
end;} end;}

View File

@ -235,9 +235,13 @@ function UnicodeToUTF16(u: cardinal): UnicodeString; deprecated 'Use LazUTF16.Un
// identifier // identifier
function CreateFirstIdentifier(const Identifier: string): string; function CreateFirstIdentifier(const Identifier: string): string;
function CreateNextIdentifier(const Identifier: string): string; function CreateNextIdentifier(const Identifier: string): string;
// Font // Font
function IsFontNameDefault(const AName: string): boolean; inline; function IsFontNameDefault(const AName: string): boolean; inline;
// Help
procedure AddCmdLineParamDesc(var aText: TStringList; aParamOpts: array of string; aDescr: string);
implementation implementation
const const
@ -1766,6 +1770,33 @@ begin
Result := CompareText(AName, 'default') = 0; Result := CompareText(AName, 'default') = 0;
end; end;
procedure AddCmdLineParamDesc(var aText: TStringList; aParamOpts: array of string; aDescr: string);
var
i: Integer;
s: String;
begin
if Length(aParamOpts) = 0 then exit;
// parameter options (separate lines)
for i := 0 to high(aParamOpts) do
aText.Add(aParamOpts[i]);
// parameter options (one line)
//s := aParamOpts[0];
//for i := 1 to high(aParamOpts) do
// s := s + ', ' + aParamOpts[i];
//aText.Add(s);
// extra line between name and description
//aText.Add('');
// description
aText.Add(aDescr);
// extra line between parameters
//aText.Add('');
end;
{ TDebugLCLItems } { TDebugLCLItems }
constructor TDebugLCLItems.Create(const TheName: string); constructor TDebugLCLItems.Create(const TheName: string);

View File

@ -120,96 +120,84 @@ resourceString
rsBlank = 'Blank'; rsBlank = 'Blank';
rsUnableToLoadDefaultFont = 'Unable to load default font'; rsUnableToLoadDefaultFont = 'Unable to load default font';
rsFileInfoFileNotFound = '(file not found: "%s")'; rsFileInfoFileNotFound = '(file not found: "%s")';
rsgtkOptionNoTransient = '--lcl-no-transient Do not set transient order for' rsgtkOptionNoTransient = 'Do not set transient order for modal forms.';
+' modal forms'; rsgtkOptionModule = 'Load the specified module at startup.';
rsgtkOptionModule = '--gtk-module module Load the specified module at ' rsgOptionFatalWarnings = 'Warnings and errors '
+'startup.';
rsgOptionFatalWarnings = '--g-fatal-warnings Warnings and errors '
+'generated by Gtk+/GDK will halt the application.'; +'generated by Gtk+/GDK will halt the application.';
rsgtkOptionDebug = '--gtk-debug flags Turn on specific Gtk+ trace/' rsgtkOptionDebug = 'Turn on specific Gtk+ trace/debug messages.';
+'debug messages.'; rsgtkOptionNoDebug = 'Turn off specific Gtk+ trace/debug messages.';
rsgtkOptionNoDebug = '--gtk-no-debug flags Turn off specific Gtk+ trace/' rsgdkOptionDebug = 'Turn on specific GDK trace/debug messages.';
+'debug messages.'; rsgdkOptionNoDebug = 'Turn off specific GDK trace/debug messages.';
rsgdkOptionDebug = '--gdk-debug flags Turn on specific GDK trace/debug ' rsgtkOptionDisplay = 'Connect to the specified X '
+'messages.';
rsgdkOptionNoDebug = '--gdk-no-debug flags Turn off specific GDK trace/'
+'debug messages.';
rsgtkOptionDisplay = '--display h:s:d Connect to the specified X '
+'server, where "h" is the hostname, "s" is the server number (usually 0), ' +'server, where "h" is the hostname, "s" is the server number (usually 0), '
+'and "d" is the display number (typically omitted). If --display is not ' +'and "d" is the display number (typically omitted). If --display is not '
+'specified, the DISPLAY environment variable is used.'; +'specified, the DISPLAY environment variable is used.';
rsgtkOptionSync = '--sync Call XSynchronize (display, True) ' rsgtkOptionSync = 'Call XSynchronize (display, True) '
+'after the Xserver connection has been established. This makes debugging ' +'after the Xserver connection has been established. This makes debugging '
+'X protocol errors easier, because X request buffering will be disabled ' +'X protocol errors easier, because X request buffering will be disabled '
+'and X errors will be received immediately after the protocol request that ' +'and X errors will be received immediately after the protocol request that '
+'generated the error has been processed by the X server.'; +'generated the error has been processed by the X server.';
rsgtkOptionNoXshm = '--no-xshm Disable use of the X Shared ' rsgtkOptionNoXshm = 'Disable use of the X Shared Memory Extension.';
+'Memory Extension.'; rsgtkOptionName = 'Set program name to "progname". '
rsgtkOptionName = '--name programe Set program name to "progname". '
+'If not specified, program name will be set to ParamStrUTF8(0).'; +'If not specified, program name will be set to ParamStrUTF8(0).';
rsgtkOptionClass = '--class classname Following Xt conventions, the ' rsgtkOptionClass = 'Following Xt conventions, the '
+'class of a program is the program name with the initial character ' +'class of a program is the program name with the initial character '
+'capitalized. For example, the classname for gimp is "Gimp". If --class ' +'capitalized. For example, the classname for gimp is "Gimp". If --class '
+'is specified, the class of the program will be set to "classname".'; +'is specified, the class of the program will be set to "classname".';
// qt interface // qt interface
rsqtOptionNoGrab = '-nograb, tells Qt that it must never grab ' rsqtOptionNoGrab = 'Tells Qt that it must never grab '
+'the mouse or the keyboard. Need QT_DEBUG.'; +'the mouse or the keyboard. Needs QT_DEBUG.';
rsqtOptionDoGrab = '-dograb (only under X11), running under a debugger can ' rsqtOptionDoGrab = 'Running under a debugger can cause an implicit -nograb, '
+'cause an implicit -nograb, use -dograb to override. Need QT_DEBUG.'; +'use -dograb to override. Works only under X11, needs QT_DEBUG.';
rsqtOptionSync = '-sync (only under X11), switches to synchronous mode ' rsqtOptionSync = 'Switches to synchronous mode for debugging. Works only under X11.';
+'for debugging.'; rsqtOptionStyle = 'Sets the application GUI '
rsqtOptionStyle = '-style style or -style=style, sets the application GUI '
+'style. Possible values are motif, windows, and platinum. If you compiled ' +'style. Possible values are motif, windows, and platinum. If you compiled '
+'Qt with additional styles or have additional styles as plugins these ' +'Qt with additional styles or have additional styles as plugins these '
+'will be available to the -style command line option. NOTE: Not all ' +'will be available to the -style command line option. NOTE: Not all '
+'styles are available on all platforms. If style param does not exist ' +'styles are available on all platforms. If style param does not exist '
+'Qt will start an application with default common style (windows).'; +'Qt will start an application with default common style (windows).';
rsqtOptionStyleSheet = '-stylesheet stylesheet or -stylesheet=stylesheet, ' rsqtOptionStyleSheet = 'Sets the application Style Sheet. '
+'sets the application Style Sheet. '
+'The value must be a path to a file that contains the Style Sheet. ' +'The value must be a path to a file that contains the Style Sheet. '
+'Note: Relative URLs in the Style Sheet file are relative ' +'Note: Relative URLs in the Style Sheet file are relative '
+'to the Style Sheet file''s path.'; +'to the Style Sheet file''s path.';
rsqtOptionGraphicsStyle = '-graphicssystem param, sets the backend to be ' rsqtOptionGraphicsStyle = 'Sets the backend to be '
+'used for on-screen widgets and QPixmaps. ' +'used for on-screen widgets and QPixmaps. '
+'Available options are native, raster and opengl. OpenGL is still unstable.'; +'Available options are native, raster and opengl. OpenGL is still unstable.';
rsqtOptionSession = '-session session, restores the application from an ' rsqtOptionSession = 'Restores the application from an earlier session.';
+'earlier session.'; rsqtOptionWidgetCount = 'Prints debug message at the end about '
rsqtOptionWidgetCount = '-widgetcount, prints debug message at the end about '
+'number of widgets left undestroyed and maximum number of widgets existed ' +'number of widgets left undestroyed and maximum number of widgets existed '
+'at the same time.'; +'at the same time.';
rsqtOptionReverse = '-reverse, sets the application''s layout direction ' rsqtOptionReverse = 'Sets the application''s layout direction to Qt::RightToLeft.';
+'to Qt::RightToLeft.';
// qt X11 options // qt X11 options
rsqtOptionX11Display = '-display display, sets the X display (default is $DISPLAY).'; rsqtOptionX11Display = 'Sets the X display. Default is $DISPLAY.';
rsqtOptionX11Geometry = '-geometry geometry, sets the client geometry of ' rsqtOptionX11Geometry = 'Sets the client geometry of the first window that is shown.';
+'the first window that is shown.'; rsqtOptionX11Font = 'Defines the application font. The '
rsqtOptionX11Font = '-fn or -font font, defines the application font. The '
+'font should be specified using an X logical font description.'; +'font should be specified using an X logical font description.';
rsqtOptionX11BgColor = '-bg or -background color, sets the default background ' rsqtOptionX11BgColor = 'Sets the default background '
+'color and an application palette (light and dark shades are calculated).'; +'color and an application palette (light and dark shades are calculated).';
rsqtOptionX11FgColor = '-fg or -foreground color, sets the default foreground color.'; rsqtOptionX11FgColor = 'Sets the default foreground color.';
rsqtOptionX11BtnColor = '-btn or -button color, sets the default button color.'; rsqtOptionX11BtnColor = 'Sets the default button color.';
rsqtOptionX11Name = '-name name, sets the application name.'; rsqtOptionX11Name = 'Sets the application name.';
rsqtOptionX11Title = '-title title, sets the application title.'; rsqtOptionX11Title = 'Sets the application title.';
rsqtOptionX11Visual = '-visual TrueColor, forces the application to use a ' rsqtOptionX11Visual = 'Forces the application to use a '
+'TrueColor visual on an 8-bit display.'; +'TrueColor visual on an 8-bit display.';
rsqtOptionX11NCols = '-ncols count, limits the number of colors allocated ' rsqtOptionX11NCols = 'Limits the number of colors allocated '
+'in the color cube on an 8-bit display, if the application is using the ' +'in the color cube on an 8-bit display, if the application is using the '
+'QApplication::ManyColor color specification. If count is 216 then a ' +'QApplication::ManyColor color specification. If count is 216 then a '
+'6x6x6 color cube is used (i.e. 6 levels of red, 6 of green, and 6 of ' +'6x6x6 color cube is used (i.e. 6 levels of red, 6 of green, and 6 of '
+'blue); for other values, a cube approximately proportional to a 2x3x1 ' +'blue); for other values, a cube approximately proportional to a 2x3x1 '
+'cube is used.'; +'cube is used.';
rsqtOptionX11CMap = '-cmap, causes the application to install a private ' rsqtOptionX11CMap = 'Causes the application to install a private '
+'color map on an 8-bit display.'; +'color map on an 8-bit display.';
rsqtOptionX11IM = '-im, sets the input method server (equivalent to setting ' rsqtOptionX11IM = 'Sets the input method server (equivalent to setting '
+'the XMODIFIERS environment variable).'; +'the XMODIFIERS environment variable).';
rsqtOptionX11InputStyle = '-inputstyle, defines how the input is inserted ' rsqtOptionX11InputStyle = 'Defines how the input is inserted '
+'into the given widget, e.g. onTheSpot makes the input appear directly ' +'into the given widget, e.g. onTheSpot makes the input appear directly '
+'in the widget, while overTheSpot makes the input appear in a box ' +'in the widget, while overTheSpot makes the input appear in a box '
+'floating over the widget and is not inserted until the editing is done.'; +'floating over the widget and is not inserted until the editing is done.';
rsqtOptionDisableAccurateFrame = '-disableaccurateframe, disables fully accurate ' rsqtOptionDisableAccurateFrame = 'Disables fully accurate '
+'window frame under X11. This feature is implemented for Qt, Qt5 and Gtk2 interfaces ' +'window frame under X11. This feature is implemented for Qt, Qt5 and Gtk2 interfaces '
+'and used mostly by GetWindowRect().'; +'and used mostly by GetWindowRect().';