IDE: Move CharacterMap to separate package.
49
components/charactermap/charactermap_ide_pkg.lpk
Normal file
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="5">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="charactermap_ide_pkg"/>
|
||||
<Type Value="DesignTime"/>
|
||||
<Author Value="Lazarus team"/>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="source\designtime"/>
|
||||
<UnitOutputDirectory Value="lib\designtime\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
</CompilerOptions>
|
||||
<Description Value="Displays a character map for ANSI and UTF8 encodings (designtime package for IDE integration). A character can be copied into the source editor by clicking on the character cell."/>
|
||||
<License Value=" See the file COPYING.modifiedLGPL, included in this distribution,
|
||||
for details about the copyright."/>
|
||||
<Version Minor="1"/>
|
||||
<Files>
|
||||
<Item>
|
||||
<Filename Value="source\designtime\charactermap_reg.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="charactermap_reg"/>
|
||||
</Item>
|
||||
</Files>
|
||||
<RequiredPkgs>
|
||||
<Item>
|
||||
<PackageName Value="SynEdit"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="IdeConfig"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="charactermappkg"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
</Item>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<UseFileFilters Value="True"/>
|
||||
</PublishOptions>
|
||||
</Package>
|
||||
</CONFIG>
|
22
components/charactermap/charactermap_ide_pkg.pas
Normal file
@ -0,0 +1,22 @@
|
||||
{ This file was automatically created by Lazarus. Do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
}
|
||||
|
||||
unit charactermap_ide_pkg;
|
||||
|
||||
{$warn 5023 off : no warning about unused units}
|
||||
interface
|
||||
|
||||
uses
|
||||
charactermap_reg, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterUnit('charactermap_reg', @charactermap_reg.Register);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterPackage('charactermap_ide_pkg', @Register);
|
||||
end.
|
BIN
components/charactermap/charactermap_images.res
Normal file
43
components/charactermap/charactermappkg.lpk
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="5">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="charactermappkg"/>
|
||||
<Author Value="Lazarus team"/>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="source\runtime"/>
|
||||
<UnitOutputDirectory Value="lib\runtime\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
</CompilerOptions>
|
||||
<Description Value="Displays a character map for ANSI and UTF8 encodings (runtime package). "/>
|
||||
<License Value=" See the file COPYING.modifiedLGPL, included in this distribution,
|
||||
for details about the copyright."/>
|
||||
<Version Minor="1"/>
|
||||
<Files>
|
||||
<Item>
|
||||
<Filename Value="source\runtime\charactermapfrm.pas"/>
|
||||
<UnitName Value="CharacterMapFrm"/>
|
||||
</Item>
|
||||
</Files>
|
||||
<i18n>
|
||||
<EnableI18N Value="True"/>
|
||||
<OutDir Value="languages"/>
|
||||
<EnableI18NForLFM Value="True"/>
|
||||
</i18n>
|
||||
<RequiredPkgs>
|
||||
<Item>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<UseFileFilters Value="True"/>
|
||||
</PublishOptions>
|
||||
</Package>
|
||||
</CONFIG>
|
15
components/charactermap/charactermappkg.pas
Normal file
@ -0,0 +1,15 @@
|
||||
{ This file was automatically created by Lazarus. Do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
}
|
||||
|
||||
unit charactermappkg;
|
||||
|
||||
{$warn 5023 off : no warning about unused units}
|
||||
interface
|
||||
|
||||
uses
|
||||
CharacterMapFrm;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
BIN
components/charactermap/demo/charactermap_demo.ico
Normal file
After Width: | Height: | Size: 83 KiB |
85
components/charactermap/demo/charactermap_demo.lpi
Normal file
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="12"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<Title Value="charactermap_demo"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes>
|
||||
<Item Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<UseFileFilters Value="True"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
</RunParams>
|
||||
<RequiredPackages>
|
||||
<Item>
|
||||
<PackageName Value="charactermappkg"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item>
|
||||
</RequiredPackages>
|
||||
<Units>
|
||||
<Unit>
|
||||
<Filename Value="charactermap_demo.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="CharacterMap_Demo"/>
|
||||
</Unit>
|
||||
<Unit>
|
||||
<Filename Value="main.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="MainForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Main"/>
|
||||
</Unit>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="charactermap_demo"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf3"/>
|
||||
</Debugging>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions>
|
||||
<Item>
|
||||
<Name Value="EAbort"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
25
components/charactermap/demo/charactermap_demo.lpr
Normal file
@ -0,0 +1,25 @@
|
||||
program CharacterMap_Demo;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}
|
||||
cthreads,
|
||||
{$ENDIF}
|
||||
{$IFDEF HASAMIGA}
|
||||
athreads,
|
||||
{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Main
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Scaled:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TMainForm, MainForm);
|
||||
Application.Run;
|
||||
end.
|
||||
|
BIN
components/charactermap/demo/charactermap_demo.res
Normal file
29
components/charactermap/demo/main.lfm
Normal file
@ -0,0 +1,29 @@
|
||||
object MainForm: TMainForm
|
||||
Left = 256
|
||||
Height = 237
|
||||
Top = 130
|
||||
Width = 320
|
||||
Caption = 'MainForm'
|
||||
ClientHeight = 237
|
||||
ClientWidth = 320
|
||||
LCLVersion = '2.3.0.0'
|
||||
object Memo1: TMemo
|
||||
Left = 8
|
||||
Height = 191
|
||||
Top = 9
|
||||
Width = 302
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 205
|
||||
Width = 113
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoSize = True
|
||||
Caption = 'Character map...'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
68
components/charactermap/demo/main.pas
Normal file
@ -0,0 +1,68 @@
|
||||
unit Main;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLType, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
CharacterMapFrm;
|
||||
|
||||
type
|
||||
|
||||
{ TMainForm }
|
||||
|
||||
TMainForm = class(TForm)
|
||||
Button1: TButton;
|
||||
Memo1: TMemo;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
private
|
||||
procedure CharacterMapHelpHandler(Sender: TObject);
|
||||
procedure InsertCharacterHandler(const C: TUTF8Char);
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
MainForm: TMainForm;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TMainForm }
|
||||
|
||||
procedure TMainForm.Button1Click(Sender: TObject);
|
||||
begin
|
||||
if CharacterMapForm = nil then
|
||||
begin
|
||||
CharacterMapForm := TCharacterMapForm.Create(Application);
|
||||
CharacterMapForm.OnInsertCharacter := @InsertCharacterHandler;
|
||||
CharacterMapForm.OnShowHelp := @CharacterMapHelpHandler;
|
||||
end;
|
||||
CharacterMapForm.Show;
|
||||
end;
|
||||
|
||||
procedure TMainForm.CharacterMapHelpHandler(Sender: TObject);
|
||||
begin
|
||||
ShowMessage('Clicking on a character cell inserts the associated character into the editor text.');
|
||||
end;
|
||||
|
||||
procedure TMainForm.InsertCharacterHandler(const C: TUTF8Char);
|
||||
var
|
||||
txt: String;
|
||||
p: Integer;
|
||||
begin
|
||||
p := Memo1.SelStart;
|
||||
txt := Memo1.Lines.Text;
|
||||
if Memo1.SelLength > 0 then
|
||||
Delete(txt, p+1, Memo1.SelLength);
|
||||
Insert(C, txt, p+1);
|
||||
Memo1.Lines.Text := txt;
|
||||
Memo1.SelStart := p + Length(C);
|
||||
Memo1.SelLength := 0;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
BIN
components/charactermap/images/charactermap_icon.ico
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
components/charactermap/images/charactermap_icon_128.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
components/charactermap/images/charactermap_icon_256.png
Normal file
After Width: | Height: | Size: 9.5 KiB |
BIN
components/charactermap/images/charmap_sortalphabetically.png
Normal file
After Width: | Height: | Size: 545 B |
After Width: | Height: | Size: 855 B |
After Width: | Height: | Size: 960 B |
8
components/charactermap/images/imagelist.txt
Normal file
@ -0,0 +1,8 @@
|
||||
charactermap_icon_128.png
|
||||
charactermap_icon_256.png
|
||||
charmap_sortalphabetically.png
|
||||
charmap_sortalphabetically_150.png
|
||||
charmap_sortalphabetically_200.png
|
||||
menu_charmap.png
|
||||
menu_charmap_150.png
|
||||
menu_charmap_200.png
|
2
components/charactermap/images/make_res.bat
Normal file
@ -0,0 +1,2 @@
|
||||
rem dir /b /l /on *.png > imagelist.txt
|
||||
..\..\..\tools\lazres.exe ..\charactermap_images.res @imagelist.txt
|
BIN
components/charactermap/images/menu_charmap.png
Normal file
After Width: | Height: | Size: 609 B |
BIN
components/charactermap/images/menu_charmap_150.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
components/charactermap/images/menu_charmap_200.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
36
components/charactermap/languages/charactermapfrm.de.po
Normal file
@ -0,0 +1,36 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 3.2\n"
|
||||
|
||||
#: charactermapfrm.lischaractermap
|
||||
msgid "Character Map"
|
||||
msgstr "Zeichentabelle"
|
||||
|
||||
#: charactermapfrm.lischarsize
|
||||
msgid "Character Size"
|
||||
msgstr "Zeichengröße"
|
||||
|
||||
#: charactermapfrm.liscodepage
|
||||
msgid "Code Page"
|
||||
msgstr "Code-Seite"
|
||||
|
||||
#: charactermapfrm.lisinsertcharacter
|
||||
msgid "Insert from Character Map..."
|
||||
msgstr "Aus der Zeichentabelle einfügen ..."
|
||||
|
||||
#: charactermapfrm.lisrange
|
||||
msgid "Range"
|
||||
msgstr "Bereich"
|
||||
|
||||
#: charactermapfrm.lissortunicoderangelistalphabetically
|
||||
msgid "Sort Unicode range list alphabetically"
|
||||
msgstr "Unicode-Liste alphabetisch sortieren"
|
27
components/charactermap/languages/charactermapfrm.pot
Normal file
@ -0,0 +1,27 @@
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||
|
||||
#: charactermapfrm.lischaractermap
|
||||
msgid "Character Map"
|
||||
msgstr ""
|
||||
|
||||
#: charactermapfrm.lischarsize
|
||||
msgid "Character Size"
|
||||
msgstr ""
|
||||
|
||||
#: charactermapfrm.liscodepage
|
||||
msgid "Code Page"
|
||||
msgstr ""
|
||||
|
||||
#: charactermapfrm.lisinsertcharacter
|
||||
msgid "Insert from Character Map..."
|
||||
msgstr ""
|
||||
|
||||
#: charactermapfrm.lisrange
|
||||
msgid "Range"
|
||||
msgstr ""
|
||||
|
||||
#: charactermapfrm.lissortunicoderangelistalphabetically
|
||||
msgid "Sort Unicode range list alphabetically"
|
||||
msgstr ""
|
||||
|
108
components/charactermap/source/designtime/charactermap_reg.pas
Normal file
@ -0,0 +1,108 @@
|
||||
unit charactermap_reg;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLType, Forms, SynEdit,
|
||||
MenuIntf, IDECommands, IDEHelpIntf, SrcEditorIntf,
|
||||
CharacterMapFrm;
|
||||
|
||||
type
|
||||
|
||||
{ TCharacterMapDialog }
|
||||
|
||||
TCharacterMapDialog = class(TCharacterMapForm)
|
||||
private
|
||||
procedure HelpButtonClick(Sender: TObject);
|
||||
procedure InsertCharacter(const C: TUTF8Char);
|
||||
protected
|
||||
procedure Activate; override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
var
|
||||
CharacterMapDialog: TCharacterMapDialog = nil;
|
||||
|
||||
procedure ShowCharacterMapProc(ASender: TObject);
|
||||
begin
|
||||
if CharacterMapDialog = nil then
|
||||
Application.CreateForm(TCharacterMapDialog, CharacterMapDialog);
|
||||
CharacterMapDialog.Show;
|
||||
end;
|
||||
|
||||
{ TCharacterMapDialog }
|
||||
|
||||
constructor TCharacterMapDialog.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
OnInsertCharacter := @InsertCharacter;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.Activate;
|
||||
begin
|
||||
OnShowHelp := @HelpButtonClick;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.HelpButtonClick(Sender: TObject);
|
||||
begin
|
||||
LazarusHelp.ShowHelpForIDEControl(Self);
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.InsertCharacter(const C: TUTF8Char);
|
||||
var
|
||||
FActiveEdit: TSourceEditorInterface;
|
||||
synEdit: TSynEdit;
|
||||
begin
|
||||
FActiveEdit := SourceEditorManagerIntf.ActiveSourceWindow.ActiveEditor;
|
||||
if Assigned(FActiveEdit) then
|
||||
begin
|
||||
if FActiveEdit.ReadOnly then Exit;
|
||||
if (FActiveEdit.EditorControl is TSynEdit) then
|
||||
TSynEdit(FActiveEdit.EditorControl).InsertTextAtCaret(C);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{ Registration }
|
||||
|
||||
procedure Register;
|
||||
const
|
||||
cmdInsertCharName = 'cmdInsertCharacter';
|
||||
mnuInsertCharName = 'mnuInsertCharacter';
|
||||
var
|
||||
shortcut: TIDEShortCut;
|
||||
category: TIDECommandCategory;
|
||||
cmdSP: TIDECommand;
|
||||
begin
|
||||
shortCut := CleanIDEShortCut;
|
||||
|
||||
category := IDECommandList.FindIDECommand(ecMultiPaste).Category;
|
||||
cmdSP := RegisterIDECommand(
|
||||
category,
|
||||
cmdInsertCharName, // Name of command
|
||||
lisInsertCharacter, // Description of command
|
||||
shortcut, // Shortcut
|
||||
nil, // OnExecuteMethod
|
||||
@ShowCharacterMapProc // OnExecuteProc
|
||||
);
|
||||
RegisterIDEMenuCommand(
|
||||
itmEditInsertions, // Parent
|
||||
mnuInsertCharName, // Name
|
||||
lisInsertCharacter, // Caption
|
||||
nil, // OnClickMethod
|
||||
@ShowCharacterMapProc, // OnClickProc
|
||||
cmdSP, // Command
|
||||
'menu_charmap' // ResourceName of the menu icon
|
||||
);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
2966
components/charactermap/source/runtime/charactermapfrm.lfm
Normal file
11
components/charactermap/source/runtime/charactermapfrm.lrj
Normal file
@ -0,0 +1,11 @@
|
||||
{"version":1,"strings":[
|
||||
{"hash":201000061,"name":"tcharactermapform.caption","sourcebytes":[67,104,97,114,97,99,116,101,114,77,97,112,70,111,114,109],"value":"CharacterMapForm"},
|
||||
{"hash":206546421,"name":"tcharactermapform.pgunicode.caption","sourcebytes":[85,110,105,99,111,100,101],"value":"Unicode"},
|
||||
{"hash":36719020,"name":"tcharactermapform.unicodecharinfolabel.caption","sourcebytes":[85,110,105,99,111,100,101,67,104,97,114,73,110,102,111,76,97,98,101,108],"value":"UnicodeCharInfoLabel"},
|
||||
{"hash":5801173,"name":"tcharactermapform.rangelabel.caption","sourcebytes":[82,97,110,103,101],"value":"Range"},
|
||||
{"hash":47054645,"name":"tcharactermapform.unisizelabel.caption","sourcebytes":[67,104,97,114,97,99,116,101,114,32,83,105,122,101],"value":"Character Size"},
|
||||
{"hash":287609,"name":"tcharactermapform.pgansi.caption","sourcebytes":[65,78,83,73],"value":"ANSI"},
|
||||
{"hash":111300396,"name":"tcharactermapform.ansicharinfolabel.caption","sourcebytes":[65,110,115,105,67,104,97,114,73,110,102,111,76,97,98,101,108],"value":"AnsiCharInfoLabel"},
|
||||
{"hash":175582597,"name":"tcharactermapform.codepagelabel.caption","sourcebytes":[67,111,100,101,32,112,97,103,101],"value":"Code page"},
|
||||
{"hash":47054645,"name":"tcharactermapform.ansisizelabel.caption","sourcebytes":[67,104,97,114,97,99,116,101,114,32,83,105,122,101],"value":"Character Size"}
|
||||
]}
|
@ -30,7 +30,7 @@
|
||||
Dialog for character map.
|
||||
}
|
||||
|
||||
unit CharacterMapDlg;
|
||||
unit CharacterMapFrm;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
@ -41,20 +41,21 @@ uses
|
||||
Classes, SysUtils, Math,
|
||||
// LCL
|
||||
Controls, Graphics, Dialogs, Buttons, StdCtrls, Forms,
|
||||
LCLType, LCLUnicodeData, Grids, ButtonPanel, ComCtrls, Spin,
|
||||
LCLType, LCLUnicodeData, Grids, ButtonPanel, ComCtrls, Spin, ImgList,
|
||||
// LazUtils
|
||||
GraphType, LazUTF8, LConvEncoding,
|
||||
GraphType, LazUTF8, LConvEncoding;
|
||||
{,
|
||||
// IdeIntf
|
||||
IDEHelpIntf, IDEImagesIntf,
|
||||
// IDE
|
||||
LazarusIDEStrConsts, EditorOptions, EnvironmentOpts;
|
||||
|
||||
}
|
||||
type
|
||||
TOnInsertCharacterEvent = procedure (const C: TUTF8Char) of object;
|
||||
|
||||
{ TCharacterMapDialog }
|
||||
{ TCharacterMapForm }
|
||||
|
||||
TCharacterMapDialog = class(TForm)
|
||||
TCharacterMapForm = class(TForm)
|
||||
ButtonPanel: TButtonPanel;
|
||||
cbCodePage: TComboBox;
|
||||
AnsiCharInfoLabel: TLabel;
|
||||
@ -95,6 +96,7 @@ type
|
||||
procedure UnicodeGridMouseMove(Sender: TObject; {%H-}Shift: TShiftState; X,
|
||||
Y: Integer);
|
||||
private
|
||||
FOnShowHelp: TNotifyEvent;
|
||||
FOnInsertCharacter: TOnInsertCharacterEvent;
|
||||
FUnicodeBlockIndex: Integer;
|
||||
procedure DoStatusAnsiGrid(ACol, ARow: integer);
|
||||
@ -105,43 +107,63 @@ type
|
||||
function UnicodeBlockIndexByName(AName: String): Integer;
|
||||
function UnicodeBlockSelected: Boolean;
|
||||
procedure SelectSystemCP;
|
||||
procedure SetOnShowHelp(AValue: TNotifyEvent);
|
||||
public
|
||||
property OnInsertCharacter: TOnInsertCharacterEvent read FOnInsertCharacter
|
||||
write FOnInsertCharacter;
|
||||
property OnInsertCharacter: TOnInsertCharacterEvent
|
||||
read FOnInsertCharacter write FOnInsertCharacter;
|
||||
property OnShowHelp: TNotifyEvent
|
||||
read FOnShowHelp write SetOnShowHelp;
|
||||
end;
|
||||
|
||||
procedure ShowCharacterMap(AOnInsertChar: TOnInsertCharacterEvent);
|
||||
|
||||
var
|
||||
CharacterMapDialog: TCharacterMapDialog;
|
||||
CharacterMapForm: TCharacterMapForm;
|
||||
|
||||
resourcestring
|
||||
lisCharacterMap = 'Character Map';
|
||||
lisRange = 'Range';
|
||||
lisSortUnicodeRangeListAlphabetically = 'Sort Unicode range list alphabetically';
|
||||
lisInsertCharacter = 'Insert from Character Map...';
|
||||
lisCharSize = 'Character Size';
|
||||
lisCodePage = 'Code Page';
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
{$R ../../charactermap_images.res}
|
||||
|
||||
uses
|
||||
LCLStrConsts;
|
||||
|
||||
const
|
||||
NOT_SELECTED=Low(UnicodeBlocks)-1;
|
||||
|
||||
procedure ShowCharacterMap(AOnInsertChar: TOnInsertCharacterEvent);
|
||||
begin
|
||||
if CharacterMapDialog = nil then
|
||||
Application.CreateForm(TCharacterMapDialog, CharacterMapDialog);
|
||||
if CharacterMapForm = nil then
|
||||
Application.CreateForm(TCharacterMapForm, CharacterMapForm);
|
||||
|
||||
CharacterMapDialog.OnInsertCharacter := AOnInsertChar;
|
||||
CharacterMapDialog.Show;
|
||||
CharacterMapForm.OnInsertCharacter := AOnInsertChar;
|
||||
CharacterMapForm.Show;
|
||||
end;
|
||||
|
||||
{ TCharacterMapDialog }
|
||||
{ TCharacterMapForm }
|
||||
|
||||
procedure TCharacterMapDialog.FormCreate(Sender: TObject);
|
||||
procedure TCharacterMapForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
Caption := lisCharacterMap;
|
||||
RangeLabel.Caption := lisRange;
|
||||
SortUniRangeListButton.Flat:=True;
|
||||
SortUniRangeListButton.Hint:=lisSortUnicodeRangeListAlphabetically;
|
||||
IDEImages.AssignImage(SortUniRangeListButton, 'pkg_sortalphabetically');
|
||||
ButtonPanel.HelpButton.Caption:=lisMenuHelp;
|
||||
ButtonPanel.CloseButton.Caption:=lisBtnClose;
|
||||
UniSizeLabel.Caption := lisCharSize;
|
||||
CodePageLabel.Caption := lisCodePage;
|
||||
AnsiSizeLabel.Caption := lisCharSize;
|
||||
SortUniRangeListButton.Flat := True;
|
||||
SortUniRangeListButton.Hint := lisSortUnicodeRangeListAlphabetically;
|
||||
SortUniRangeListButton.Images := LCLGlyphs;
|
||||
SortUniRangeListButton.ImageIndex := LCLGlyphs.GetImageIndex('charmap_sortalphabetically');
|
||||
ButtonPanel.HelpButton.Caption := rsMbHelp;
|
||||
ButtonPanel.CloseButton.Caption := rsMbClose;
|
||||
ButtonPanel.ShowButtons := [pbClose];
|
||||
|
||||
//EnvironmentOptions.IDEWindowLayoutList.Apply(Self, Name);
|
||||
PageControl1.ActivePageIndex := 0;
|
||||
@ -151,7 +173,7 @@ begin
|
||||
FillAnsiGrid;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.SelectSystemCP;
|
||||
procedure TCharacterMapForm.SelectSystemCP;
|
||||
{$ifdef Windows}
|
||||
var
|
||||
i: Integer;
|
||||
@ -183,9 +205,9 @@ begin
|
||||
cbCodePage.ItemIndex := 0;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.HelpButtonClick(Sender: TObject);
|
||||
procedure TCharacterMapForm.HelpButtonClick(Sender: TObject);
|
||||
begin
|
||||
LazarusHelp.ShowHelpForIDEControl(Self);
|
||||
//LazarusHelp.ShowHelpForIDEControl(Self);
|
||||
end;
|
||||
|
||||
function RoundUp(Value, Divi:integer):integer;
|
||||
@ -196,18 +218,18 @@ begin
|
||||
Result:=(Value div Divi)+1;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.cbCodePageSelect(Sender: TObject);
|
||||
procedure TCharacterMapForm.cbCodePageSelect(Sender: TObject);
|
||||
begin
|
||||
FillAnsiGrid;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.cbUniRangeSelect(Sender: TObject);
|
||||
procedure TCharacterMapForm.cbUniRangeSelect(Sender: TObject);
|
||||
begin
|
||||
FUnicodeBlockIndex:=UnicodeBlockIndexByName(cbUniRange.Text);
|
||||
FillUnicodeGrid;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
procedure TCharacterMapForm.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
if Key=VK_ESCAPE then
|
||||
begin
|
||||
@ -216,14 +238,16 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.FormShow(Sender: TObject);
|
||||
procedure TCharacterMapForm.FormShow(Sender: TObject);
|
||||
var
|
||||
savedFontSize: Integer;
|
||||
begin
|
||||
(* wp
|
||||
AnsiGrid.Font.Name := EditorOpts.EditorFont;
|
||||
UnicodeGrid.Font.Name := EditorOpts.EditorFont;
|
||||
AnsiGrid.Font.Size := seAnsiSize.Value;
|
||||
UnicodeGrid.Font.Size := seUniSize.Value;
|
||||
*)
|
||||
|
||||
// Auto-adjust the width of the AnsiGrid's fixed column. Note that
|
||||
// the font defined in PrepareCanvas is ignored by AutoSizeColumn.
|
||||
@ -237,40 +261,41 @@ begin
|
||||
FUnicodeBlockIndex:=NOT_SELECTED;
|
||||
FillUniRangeList(SortUniRangeListButton.Down);
|
||||
FillUnicodeGrid;
|
||||
cbCodePage.DropDownCount := Math.max(EnvironmentOptions.DropDownCount, 25);
|
||||
cbUniRange.DropDownCount := Math.max(EnvironmentOptions.DropDownCount, 25);
|
||||
// wp
|
||||
//cbCodePage.DropDownCount := Math.max(EnvironmentOptions.DropDownCount, 25);
|
||||
//cbUniRange.DropDownCount := Math.max(EnvironmentOptions.DropDownCount, 25);
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.seAnsiSizeChange(Sender: TObject);
|
||||
procedure TCharacterMapForm.seAnsiSizeChange(Sender: TObject);
|
||||
begin
|
||||
AnsiGrid.Font.Size := seAnsiSize.Value;
|
||||
seUniSize.Value := seAnsiSize.Value;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.seUniSizeChange(Sender: TObject);
|
||||
procedure TCharacterMapForm.seUniSizeChange(Sender: TObject);
|
||||
begin
|
||||
UnicodeGrid.Font.Size := seUniSize.Value;
|
||||
seAnsiSize.Value := seUniSize.Value;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.SortUniRangeListButtonClick(Sender: TObject);
|
||||
procedure TCharacterMapForm.SortUniRangeListButtonClick(Sender: TObject);
|
||||
begin
|
||||
FillUniRangeList(SortUniRangeListButton.Down);
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.AnsiGridSelectCell(Sender: TObject; aCol,
|
||||
procedure TCharacterMapForm.AnsiGridSelectCell(Sender: TObject; aCol,
|
||||
aRow: Integer; var CanSelect: Boolean);
|
||||
begin
|
||||
DoStatusAnsiGrid(aCol, aRow);
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.UnicodeGridSelectCell(Sender: TObject; aCol,
|
||||
procedure TCharacterMapForm.UnicodeGridSelectCell(Sender: TObject; aCol,
|
||||
aRow: Integer; var CanSelect: Boolean);
|
||||
begin
|
||||
DoStatusUnicodeGrid(aCol, aRow);
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.StringGridKeyPress(Sender: TObject; var Key: char);
|
||||
procedure TCharacterMapForm.StringGridKeyPress(Sender: TObject; var Key: char);
|
||||
var
|
||||
sg: TStringGrid;
|
||||
s: string;
|
||||
@ -284,7 +309,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.StringGridMouseDown(Sender: TObject;
|
||||
procedure TCharacterMapForm.StringGridMouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
Row, Col: Integer;
|
||||
@ -300,7 +325,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.DoStatusAnsiGrid(ACol, ARow: integer);
|
||||
procedure TCharacterMapForm.DoStatusAnsiGrid(ACol, ARow: integer);
|
||||
var
|
||||
N: integer;
|
||||
begin
|
||||
@ -308,7 +333,7 @@ begin
|
||||
AnsiCharInfoLabel.Caption := Format('Decimal: %s, Hex: $%s', [IntToStr(N), IntToHex(N, 2)]);
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.AnsiGridMouseMove(Sender: TObject;
|
||||
procedure TCharacterMapForm.AnsiGridMouseMove(Sender: TObject;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
Row, Col: Integer;
|
||||
@ -323,7 +348,7 @@ begin
|
||||
AnsiCharInfoLabel.Caption := '-';
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.GridPrepareCanvas(sender: TObject; aCol,
|
||||
procedure TCharacterMapForm.GridPrepareCanvas(sender: TObject; aCol,
|
||||
aRow: Integer; aState: TGridDrawState);
|
||||
var
|
||||
ts: TTextStyle;
|
||||
@ -337,7 +362,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.DoStatusUnicodeGrid(ACol, ARow: integer);
|
||||
procedure TCharacterMapForm.DoStatusUnicodeGrid(ACol, ARow: integer);
|
||||
var
|
||||
S: Cardinal;
|
||||
tmp, tmp2: String;
|
||||
@ -352,7 +377,7 @@ begin
|
||||
UnicodeCharInfoLabel.Caption:='U+'+inttohex(S,4)+', UTF-8: '+tmp2;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.UnicodeGridMouseMove(Sender: TObject;
|
||||
procedure TCharacterMapForm.UnicodeGridMouseMove(Sender: TObject;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
Row, Col: Integer;
|
||||
@ -367,7 +392,7 @@ begin
|
||||
AnsiCharInfoLabel.Caption := '-';
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.FillAnsiGrid;
|
||||
procedure TCharacterMapForm.FillAnsiGrid;
|
||||
var
|
||||
R, C, p: Integer;
|
||||
cp: String;
|
||||
@ -387,7 +412,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.FillUnicodeGrid;
|
||||
procedure TCharacterMapForm.FillUnicodeGrid;
|
||||
var
|
||||
cnt, x, y: integer;
|
||||
S, E: integer;
|
||||
@ -410,7 +435,7 @@ begin
|
||||
UnicodeGrid.AutoSizeColumns;
|
||||
end;
|
||||
|
||||
procedure TCharacterMapDialog.FillUniRangeList(ASorted: Boolean);
|
||||
procedure TCharacterMapForm.FillUniRangeList(ASorted: Boolean);
|
||||
var
|
||||
BlockIdx: Integer;
|
||||
begin
|
||||
@ -425,7 +450,7 @@ begin
|
||||
cbUniRange.Text:=UnicodeBlocks[FUnicodeBlockIndex].PG;
|
||||
end;
|
||||
|
||||
function TCharacterMapDialog.UnicodeBlockIndexByName(AName: String): Integer;
|
||||
function TCharacterMapForm.UnicodeBlockIndexByName(AName: String): Integer;
|
||||
var
|
||||
BlockIdx: Integer;
|
||||
begin
|
||||
@ -435,10 +460,20 @@ begin
|
||||
Result:=NOT_SELECTED;
|
||||
end;
|
||||
|
||||
function TCharacterMapDialog.UnicodeBlockSelected: Boolean;
|
||||
function TCharacterMapForm.UnicodeBlockSelected: Boolean;
|
||||
begin
|
||||
Result:=(FUnicodeBlockIndex>=Low(UnicodeBlocks)) and (FUnicodeBlockIndex<=High(UnicodeBlocks));
|
||||
end;
|
||||
|
||||
procedure TCharacterMapForm.SetOnShowHelp(AValue: TNotifyEvent);
|
||||
begin
|
||||
FOnShowHelp := AValue;
|
||||
ButtonPanel.HelpButton.OnClick := FOnShowHelp;
|
||||
if FOnShowHelp <> nil then
|
||||
ButtonPanel.ShowButtons := ButtonPanel.ShowButtons + [pbHelp]
|
||||
else
|
||||
ButtonPanel.ShowButtons := ButtonPanel.ShowButtons - [pbHelp];
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -109,7 +109,7 @@ const
|
||||
ecToggleComment = ecFirstLazarus + 65;
|
||||
|
||||
// insert text
|
||||
ecInsertCharacter = ecFirstLazarus + 70;
|
||||
ecInsertCharacter = ecFirstLazarus + 70; // not used, moved to external package
|
||||
ecInsertGUID = ecFirstLazarus + 71;
|
||||
ecInsertFilename = ecFirstLazarus + 72;
|
||||
ecInsertUserName = ecFirstLazarus + 73;
|
||||
|
@ -1,342 +0,0 @@
|
||||
object CharacterMapDialog: TCharacterMapDialog
|
||||
Left = 258
|
||||
Height = 477
|
||||
Top = 197
|
||||
Width = 590
|
||||
BorderStyle = bsSizeToolWin
|
||||
Caption = 'CharacterMapDialog'
|
||||
ClientHeight = 477
|
||||
ClientWidth = 590
|
||||
FormStyle = fsStayOnTop
|
||||
KeyPreview = True
|
||||
OnCreate = FormCreate
|
||||
OnKeyDown = FormKeyDown
|
||||
OnShow = FormShow
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '2.3.0.0'
|
||||
object ButtonPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 26
|
||||
Top = 445
|
||||
Width = 578
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.DefaultCaption = True
|
||||
OKButton.Enabled = False
|
||||
HelpButton.Name = 'HelpButton'
|
||||
HelpButton.DefaultCaption = True
|
||||
HelpButton.OnClick = HelpButtonClick
|
||||
CloseButton.Name = 'CloseButton'
|
||||
CloseButton.DefaultCaption = True
|
||||
CancelButton.Name = 'CancelButton'
|
||||
CancelButton.DefaultCaption = True
|
||||
CancelButton.Enabled = False
|
||||
TabOrder = 1
|
||||
ShowButtons = [pbClose, pbHelp]
|
||||
ShowBevel = False
|
||||
end
|
||||
object PageControl1: TPageControl
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ButtonPanel
|
||||
Left = 6
|
||||
Height = 433
|
||||
Top = 6
|
||||
Width = 578
|
||||
ActivePage = pgAnsi
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Around = 6
|
||||
TabIndex = 1
|
||||
TabOrder = 0
|
||||
object pgUnicode: TTabSheet
|
||||
Caption = 'Unicode'
|
||||
ClientHeight = 405
|
||||
ClientWidth = 570
|
||||
object UnicodeCharInfoLabel: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = cbUniRange
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 351
|
||||
Width = 118
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'UnicodeCharInfoLabel'
|
||||
end
|
||||
object UnicodeGrid: TStringGrid
|
||||
AnchorSideLeft.Control = pgUnicode
|
||||
AnchorSideTop.Control = pgUnicode
|
||||
AnchorSideRight.Control = pgUnicode
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = cbUniRange
|
||||
Left = 0
|
||||
Height = 341
|
||||
Top = 0
|
||||
Width = 570
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
AutoFillColumns = True
|
||||
ColCount = 16
|
||||
DefaultColWidth = 16
|
||||
DefaultDrawing = False
|
||||
FixedCols = 0
|
||||
FixedRows = 0
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goDrawFocusSelected, goSmoothScroll]
|
||||
RowCount = 15
|
||||
TabOrder = 0
|
||||
OnKeyPress = StringGridKeyPress
|
||||
OnMouseDown = StringGridMouseDown
|
||||
OnMouseMove = UnicodeGridMouseMove
|
||||
OnPrepareCanvas = GridPrepareCanvas
|
||||
OnSelectCell = UnicodeGridSelectCell
|
||||
ColWidths = (
|
||||
36
|
||||
36
|
||||
36
|
||||
36
|
||||
36
|
||||
36
|
||||
35
|
||||
35
|
||||
35
|
||||
35
|
||||
35
|
||||
35
|
||||
35
|
||||
35
|
||||
35
|
||||
35
|
||||
)
|
||||
end
|
||||
object cbUniRange: TComboBox
|
||||
AnchorSideTop.Control = UnicodeGrid
|
||||
AnchorSideRight.Control = SortUniRangeListButton
|
||||
AnchorSideBottom.Control = seUniSize
|
||||
Left = 242
|
||||
Height = 23
|
||||
Top = 347
|
||||
Width = 291
|
||||
Anchors = [akRight, akBottom]
|
||||
BorderSpacing.Around = 6
|
||||
DropDownCount = 25
|
||||
ItemHeight = 15
|
||||
OnSelect = cbUniRangeSelect
|
||||
Style = csDropDownList
|
||||
TabOrder = 1
|
||||
end
|
||||
object RangeLabel: TLabel
|
||||
AnchorSideTop.Control = cbUniRange
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = cbUniRange
|
||||
Left = 203
|
||||
Height = 15
|
||||
Top = 351
|
||||
Width = 33
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Range'
|
||||
end
|
||||
object SortUniRangeListButton: TSpeedButton
|
||||
AnchorSideTop.Control = cbUniRange
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = pgUnicode
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = pgUnicode
|
||||
Left = 539
|
||||
Height = 25
|
||||
Top = 346
|
||||
Width = 25
|
||||
AllowAllUp = True
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
GroupIndex = 1
|
||||
OnClick = SortUniRangeListButtonClick
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
end
|
||||
object seUniSize: TSpinEdit
|
||||
AnchorSideLeft.Control = cbUniRange
|
||||
AnchorSideTop.Control = cbCodePage
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = pgUnicode
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 242
|
||||
Height = 23
|
||||
Top = 376
|
||||
Width = 80
|
||||
Alignment = taRightJustify
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
MaxValue = 32
|
||||
MinValue = 8
|
||||
OnChange = seUniSizeChange
|
||||
TabOrder = 2
|
||||
Value = 12
|
||||
end
|
||||
object UniSizeLabel: TLabel
|
||||
AnchorSideTop.Control = seUniSize
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = RangeLabel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 162
|
||||
Height = 15
|
||||
Top = 380
|
||||
Width = 74
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Character Size'
|
||||
FocusControl = seUniSize
|
||||
end
|
||||
end
|
||||
object pgAnsi: TTabSheet
|
||||
Caption = 'ANSI'
|
||||
ClientHeight = 405
|
||||
ClientWidth = 570
|
||||
object AnsiCharInfoLabel: TLabel
|
||||
AnchorSideLeft.Control = pgAnsi
|
||||
AnchorSideTop.Control = cbCodePage
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = pgAnsi
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = pgAnsi
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 351
|
||||
Width = 97
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'AnsiCharInfoLabel'
|
||||
end
|
||||
object AnsiGrid: TStringGrid
|
||||
AnchorSideLeft.Control = pgAnsi
|
||||
AnchorSideTop.Control = pgAnsi
|
||||
AnchorSideRight.Control = pgAnsi
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = cbCodePage
|
||||
Left = 0
|
||||
Height = 341
|
||||
Top = 0
|
||||
Width = 570
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
ColCount = 17
|
||||
DefaultColWidth = 16
|
||||
DefaultDrawing = False
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goDrawFocusSelected, goSmoothScroll]
|
||||
RowCount = 15
|
||||
TabOrder = 0
|
||||
OnKeyPress = StringGridKeyPress
|
||||
OnMouseDown = StringGridMouseDown
|
||||
OnMouseMove = AnsiGridMouseMove
|
||||
OnPrepareCanvas = GridPrepareCanvas
|
||||
OnSelectCell = AnsiGridSelectCell
|
||||
ColWidths = (
|
||||
16
|
||||
34
|
||||
34
|
||||
34
|
||||
34
|
||||
34
|
||||
34
|
||||
34
|
||||
34
|
||||
34
|
||||
34
|
||||
34
|
||||
34
|
||||
34
|
||||
34
|
||||
34
|
||||
40
|
||||
)
|
||||
end
|
||||
object cbCodePage: TComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = pgAnsi
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = seAnsiSize
|
||||
Left = 242
|
||||
Height = 23
|
||||
Top = 347
|
||||
Width = 322
|
||||
Anchors = [akRight, akBottom]
|
||||
BorderSpacing.Around = 6
|
||||
DropDownCount = 25
|
||||
ItemHeight = 15
|
||||
Items.Strings = (
|
||||
'cp1250 - Central and East European Latin'
|
||||
'cp1251 - Cyrillic'
|
||||
'cp1252 - West European Latin'
|
||||
'cp1253 - Greek'
|
||||
'cp1254 - Turkish'
|
||||
'cp1255 - Hebrew'
|
||||
'cp1256 - Arabic'
|
||||
'cp1257 - Baltic'
|
||||
'cp1258 - Vietnamese'
|
||||
'cp437 - Original IBM PC hardware'
|
||||
'cp850 - Latin-1'
|
||||
'cp852 - Latin-2'
|
||||
'cp866 - Belarusian, Russian, Ukrainian'
|
||||
'cp874 - Thai'
|
||||
'cp932 - Japanese'
|
||||
'cp936 - ANSI/OEM Simplified Chinese'
|
||||
'cp949 - Korean'
|
||||
'cp950 - Traditional Chinese'
|
||||
'macintosh - MAC Roman (Western Europe)'
|
||||
'koi8 - Ukrainian, Cyrillic'
|
||||
'iso88591 - ISO Latin-1 (Western Europe)'
|
||||
'iso88592 - ISO Latin-2 (Central and Eastern Europe)'
|
||||
'iso885915 - ISO Latin-9 (Western Europe)'
|
||||
)
|
||||
OnSelect = cbCodePageSelect
|
||||
Style = csDropDownList
|
||||
TabOrder = 1
|
||||
end
|
||||
object CodePageLabel: TLabel
|
||||
AnchorSideLeft.Control = AnsiCharInfoLabel
|
||||
AnchorSideTop.Control = cbCodePage
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = cbCodePage
|
||||
Left = 179
|
||||
Height = 15
|
||||
Top = 351
|
||||
Width = 57
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Code page'
|
||||
end
|
||||
object AnsiSizeLabel: TLabel
|
||||
AnchorSideTop.Control = seAnsiSize
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = CodePageLabel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 162
|
||||
Height = 15
|
||||
Top = 380
|
||||
Width = 74
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Character Size'
|
||||
FocusControl = seAnsiSize
|
||||
end
|
||||
object seAnsiSize: TSpinEdit
|
||||
AnchorSideLeft.Control = cbCodePage
|
||||
AnchorSideTop.Control = cbCodePage
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = pgAnsi
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 242
|
||||
Height = 23
|
||||
Top = 376
|
||||
Width = 80
|
||||
Alignment = taRightJustify
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
MaxValue = 32
|
||||
MinValue = 8
|
||||
OnChange = seAnsiSizeChange
|
||||
TabOrder = 2
|
||||
Value = 12
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -215,7 +215,7 @@ begin
|
||||
P.Sources.AddSrc('buildmanager.pas');
|
||||
P.Sources.AddSrc('buildmodediffdlg.pas');
|
||||
P.Sources.AddSrc('buildprofilemanager.pas');
|
||||
P.Sources.AddSrc('charactermapdlg.pas');
|
||||
// P.Sources.AddSrc('charactermapdlg.pas');
|
||||
P.Sources.AddSrc('checkcompileropts.pas');
|
||||
P.Sources.AddSrc('checklfmdlg.pas');
|
||||
P.Sources.AddSrc('cleandirdlg.pas');
|
||||
|
@ -662,7 +662,7 @@ begin
|
||||
ecSelectWord : Result:= lisMenuSelectWord;
|
||||
ecSelectLine : Result:= lisMenuSelectLine;
|
||||
ecSelectParagraph : Result:= lisMenuSelectParagraph;
|
||||
ecInsertCharacter : Result:= srkmecInsertCharacter;
|
||||
// ecInsertCharacter : Result:= srkmecInsertCharacter;
|
||||
ecInsertGPLNotice : Result:= srkmecInsertGPLNotice;
|
||||
ecInsertGPLNoticeTranslated: Result:= srkmecInsertGPLNoticeTranslated;
|
||||
ecInsertLGPLNotice : Result:= srkmecInsertLGPLNotice;
|
||||
|
@ -5107,11 +5107,6 @@ resourcestring
|
||||
lisAboutOfficial = 'Official:';
|
||||
lisAboutDocumentation = 'Documentation:';
|
||||
|
||||
// character map
|
||||
lisCharacterMap = 'Character Map';
|
||||
lisRange = 'Range';
|
||||
lisSortUnicodeRangeListAlphabetically = 'Sort Unicode range list alphabetically';
|
||||
|
||||
// codetools defines value dialog
|
||||
lisCTDefChooseDirectory = 'Choose Directory';
|
||||
lisCTDefCodeToolsDirectoryValues = 'CodeTools Directory Values';
|
||||
|
@ -2704,7 +2704,6 @@ begin
|
||||
itmEditSortBlock.OnClick:=@mnuEditSortBlockClicked;
|
||||
itmEditTabsToSpacesBlock.OnClick:=@mnuEditTabsToSpacesBlockClicked;
|
||||
itmEditSelectionBreakLines.OnClick:=@mnuEditSelectionBreakLinesClicked;
|
||||
itmEditInsertCharacter.OnClick:=@mnuEditInsertCharacterClicked;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -2942,8 +2941,6 @@ begin
|
||||
itmEditTabsToSpacesBlock.Command:=GetIdeCmdRegToolBtn(ecSelectionTabs2Spaces);
|
||||
itmEditSelectionBreakLines.Command:=GetIdeCmdRegToolBtn(ecSelectionBreakLines);
|
||||
|
||||
itmEditInsertCharacter.Command:=GetIdeCmdRegToolBtn(ecInsertCharacter);
|
||||
|
||||
// search menu
|
||||
itmSearchFind.Command:=GetIdeCmdRegToolBtn(ecFind);
|
||||
itmSearchFindNext.Command:=GetIdeCmdRegToolBtn(ecFindNext);
|
||||
|
@ -129,7 +129,6 @@ type
|
||||
itmEditTabsToSpacesBlock: TIDEMenuCommand;
|
||||
itmEditSelectionBreakLines: TIDEMenuCommand;
|
||||
//itmEditInsertions: TIDEMenuSection;
|
||||
itmEditInsertCharacter: TIDEMenuCommand;
|
||||
|
||||
// search menu
|
||||
//mnuSearch: TIDEMenuSection;
|
||||
|
@ -1024,8 +1024,6 @@ begin
|
||||
|
||||
// *** insert text ***:
|
||||
CreateMenuSeparatorSection(mnuEdit,itmEditInsertions,'itmEditInsertions');
|
||||
ParentMI:=itmEditInsertions;
|
||||
CreateMenuItem(ParentMI,itmEditInsertCharacter,'itmEditInsertCharacter',lisMenuInsertCharacter, 'menu_edit_insertcharacter');
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1472,7 +1470,6 @@ begin
|
||||
|
||||
with MainIDEBar do
|
||||
case AForm.ClassName of
|
||||
'TCharacterMapDialog': Exit(itmEditInsertCharacter.ImageIndex);
|
||||
'TObjectInspectorDlg': Exit(itmViewInspector.ImageIndex);
|
||||
'TSourceNotebook': Exit(itmViewSourceEditor.ImageIndex);
|
||||
'TMessagesView': Exit(itmViewMessage.ImageIndex);
|
||||
|
@ -77,7 +77,7 @@ uses
|
||||
SrcEditHintFrm, etMessagesWnd, etSrcEditMarks, CodeMacroPrompt,
|
||||
CodeTemplatesDlg, CodeToolsOptions, editor_general_options, SortSelectionDlg,
|
||||
EncloseSelectionDlg, EncloseIfDef, InvertAssignTool, SourceEditProcs,
|
||||
SourceMarks, CharacterMapDlg, SearchFrm, MultiPasteDlg, EditorMacroListViewer,
|
||||
SourceMarks, SearchFrm, MultiPasteDlg, EditorMacroListViewer,
|
||||
EditorToolbarStatic, editortoolbar_options, InputhistoryWithSearchOpt,
|
||||
FPDocHints, MainIntf, GotoFrm, BaseDebugManager, Debugger, TransferMacrosIntf;
|
||||
|
||||
@ -4683,7 +4683,7 @@ end;
|
||||
|
||||
procedure TSourceEditor.InsertCharacterFromMap;
|
||||
begin
|
||||
ShowCharacterMap(@SourceNotebook.InsertCharacter);
|
||||
// ShowCharacterMap(@SourceNotebook.InsertCharacter);
|
||||
end;
|
||||
|
||||
procedure TSourceEditor.InsertLicenseNotice(const Notice: string;
|
||||
|