|
@@ -7,7 +7,7 @@ interface
|
|
|
|
|
|
uses
|
|
uses
|
|
Classes, SysUtils, LazPaintType, BGRABitmap, BGRABitmapTypes, BGRALayers, LCVectorialFill,
|
|
Classes, SysUtils, LazPaintType, BGRABitmap, BGRABitmapTypes, BGRALayers, LCVectorialFill,
|
|
- Menus, Forms, Controls, fgl,
|
|
|
|
|
|
+ Menus, Forms, Controls, fgl, LCLType,
|
|
|
|
|
|
LazPaintMainForm, UMainFormLayout,
|
|
LazPaintMainForm, UMainFormLayout,
|
|
|
|
|
|
@@ -240,7 +240,7 @@ type
|
|
procedure ColorToFChooseColor; override;
|
|
procedure ColorToFChooseColor; override;
|
|
procedure ExitColorEditor; override;
|
|
procedure ExitColorEditor; override;
|
|
function ColorEditorActive: boolean; override;
|
|
function ColorEditorActive: boolean; override;
|
|
- procedure FChooseColorSimpleRedraw; override;
|
|
|
|
|
|
+ procedure NotifyColorBinding; override;
|
|
function ShowSaveOptionDlg({%H-}AParameters: TVariableSet; AOutputFilenameUTF8: string;
|
|
function ShowSaveOptionDlg({%H-}AParameters: TVariableSet; AOutputFilenameUTF8: string;
|
|
ASkipOptions: boolean; AExport: boolean): boolean; override;
|
|
ASkipOptions: boolean; AExport: boolean): boolean; override;
|
|
function ShowColorIntensityDlg(AParameters: TVariableSet): TScriptResult; override;
|
|
function ShowColorIntensityDlg(AParameters: TVariableSet): TScriptResult; override;
|
|
@@ -290,15 +290,16 @@ type
|
|
procedure UpdateEditPicture(ADelayed: boolean); override;
|
|
procedure UpdateEditPicture(ADelayed: boolean); override;
|
|
procedure AddColorToPalette(AColor: TBGRAPixel); override;
|
|
procedure AddColorToPalette(AColor: TBGRAPixel); override;
|
|
procedure RemoveColorFromPalette(AColor: TBGRAPixel); override;
|
|
procedure RemoveColorFromPalette(AColor: TBGRAPixel); override;
|
|
- function GetDigitFromColorsBindToKey(const AColor: TBGRAPixel): string; override;
|
|
|
|
|
|
+ function GetKeyAssociatedToColor(const AColor: TBGRAPixel): string; override;
|
|
property Initialized: boolean read GetInitialized;
|
|
property Initialized: boolean read GetInitialized;
|
|
procedure SendKeyDownEventToMainForm(var Key: Word; Shift: TShiftState); override;
|
|
procedure SendKeyDownEventToMainForm(var Key: Word; Shift: TShiftState); override;
|
|
procedure SendKeyUpEventToMainForm(var Key: Word; Shift: TShiftState); override;
|
|
procedure SendKeyUpEventToMainForm(var Key: Word; Shift: TShiftState); override;
|
|
|
|
+ procedure SendUTF8KeyPressEventToMainForm(var UTF8Key: TUTF8Char); override;
|
|
end;
|
|
end;
|
|
|
|
|
|
implementation
|
|
implementation
|
|
|
|
|
|
-uses LCLType, Types, Dialogs, FileUtil, StdCtrls, LCLIntf, BGRAUTF8, UTranslation,
|
|
|
|
|
|
+uses Types, Dialogs, FileUtil, StdCtrls, LCLIntf, BGRAUTF8, UTranslation,
|
|
|
|
|
|
URadialBlur, UMotionBlur, UEmboss, UTwirl, UWaveDisplacement,
|
|
URadialBlur, UMotionBlur, UEmboss, UTwirl, UWaveDisplacement,
|
|
unewimage, uresample, UPixelate, unoisefilter, ufilters,
|
|
unewimage, uresample, UPixelate, unoisefilter, ufilters,
|
|
@@ -1985,7 +1986,7 @@ begin
|
|
else result := false;
|
|
else result := false;
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TLazPaintInstance.FChooseColorSimpleRedraw;
|
|
|
|
|
|
+procedure TLazPaintInstance.NotifyColorBinding;
|
|
begin
|
|
begin
|
|
if Assigned(FChooseColor) then FChooseColor.SimpleRedraw;
|
|
if Assigned(FChooseColor) then FChooseColor.SimpleRedraw;
|
|
end;
|
|
end;
|
|
@@ -2204,11 +2205,11 @@ begin
|
|
if Assigned(FMain) then FMain.Layout.RemoveColorFromPalette(AColor);
|
|
if Assigned(FMain) then FMain.Layout.RemoveColorFromPalette(AColor);
|
|
end;
|
|
end;
|
|
|
|
|
|
-function TLazPaintInstance.GetDigitFromColorsBindToKey(const AColor: TBGRAPixel): string;
|
|
|
|
|
|
+function TLazPaintInstance.GetKeyAssociatedToColor(const AColor: TBGRAPixel): string;
|
|
begin
|
|
begin
|
|
if Assigned(FMain) and
|
|
if Assigned(FMain) and
|
|
Assigned(FMain.Layout) and
|
|
Assigned(FMain.Layout) and
|
|
- Assigned(FMain.Layout.PaletteToolbar) then Result := FMain.Layout.PaletteToolbar.GetDigitFromColorsBindToKey(AColor)
|
|
|
|
|
|
+ Assigned(FMain.Layout.PaletteToolbar) then Result := FMain.Layout.PaletteToolbar.GetKeyAssociatedToColor(AColor)
|
|
else Result := '';
|
|
else Result := '';
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -2222,5 +2223,10 @@ begin
|
|
if Assigned(FMain) then FMain.FormKeyUp(FMain, key, Shift);
|
|
if Assigned(FMain) then FMain.FormKeyUp(FMain, key, Shift);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TLazPaintInstance.SendUTF8KeyPressEventToMainForm(var UTF8Key: TUTF8Char);
|
|
|
|
+begin
|
|
|
|
+ if Assigned(FMain) then FMain.FormUTF8KeyPress(FMain, UTF8Key);
|
|
|
|
+end;
|
|
|
|
+
|
|
end.
|
|
end.
|
|
|
|
|