spiegel-keyman/common/windows/delphi/charmap/CharacterMapSettings.pas
Marc Durdin 99b04a4240 chore(windows): move global/delphi/charmap to common
Moves character map units to common folder, and updates project refs.
2022-06-13 05:54:23 +10:00

65 lines
1.4 KiB
ObjectPascal

(*
Name: CharacterMapSettings
Copyright: Copyright (C) SIL International.
Documentation:
Description:
Create Date: 14 Sep 2006
Modified Date: 14 Sep 2006
Authors: mcdurdin
Related Files:
Dependencies:
Bugs:
Todo:
Notes:
History: 14 Sep 2006 - mcdurdin - Initial version
*)
unit CharacterMapSettings;
interface
type
TCharMapSettings = class
private
function GetIsUnicode: Boolean;
procedure SetIsUnicode(const Value: Boolean);
public
SelectedCharacterSet, SelectedSubRange: Integer;
FontName: string;
UseQuotedTextFont: Boolean;
constructor Create;
property IsUnicode: Boolean read GetIsUnicode write SetIsUnicode;
end;
implementation
uses CharacterRanges;
{ TCharMapSettings }
constructor TCharMapSettings.Create;
begin
inherited Create;
SelectedCharacterSet := CR_UnicodeRange;
SelectedSubRange := -1;
FontName := 'Arial';
end;
function TCharMapSettings.GetIsUnicode: Boolean;
begin
Result := not CharacterRange[SelectedCharacterSet].IsANSI;
end;
procedure TCharMapSettings.SetIsUnicode(const Value: Boolean);
begin
if Value <> IsUnicode then
begin
if Value
then SelectedCharacterSet := CR_UnicodeRange
else SelectedCharacterSet := CR_ANSIRange;
SelectedSubRange := -1;
end;
end;
end.