You've already forked lazarus-ccr
richmemo: moving clipboard operations onto widgetsetlevel
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1210 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -53,7 +53,12 @@ type
|
||||
function GetContStyleLength(TextStart: Integer): Integer;
|
||||
|
||||
procedure SetSelText(const SelTextUTF8: string); override;
|
||||
|
||||
public
|
||||
procedure CopyToClipboard; override;
|
||||
procedure CutToClipboard; override;
|
||||
procedure PasteFromClipboard; override;
|
||||
|
||||
procedure SetTextAttributes(TextStart, TextLen: Integer; const TextParams: TFontParams); virtual;
|
||||
function GetTextAttributes(TextStart: Integer; var TextParams: TFontParams): Boolean; virtual;
|
||||
function GetStyleRange(CharOfs: Integer; var RangeStart, RangeLen: Integer): Boolean; virtual;
|
||||
@@ -248,6 +253,24 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomRichMemo.CopyToClipboard;
|
||||
begin
|
||||
if HandleAllocated then
|
||||
TWSCustomRichMemoClass(WidgetSetClass).CopyToClipboard(Self);
|
||||
end;
|
||||
|
||||
procedure TCustomRichMemo.CutToClipboard;
|
||||
begin
|
||||
if HandleAllocated then
|
||||
TWSCustomRichMemoClass(WidgetSetClass).CutToClipboard(Self);
|
||||
end;
|
||||
|
||||
procedure TCustomRichMemo.PasteFromClipboard;
|
||||
begin
|
||||
if HandleAllocated then
|
||||
TWSCustomRichMemoClass(WidgetSetClass).PasteFromClipboard(Self);
|
||||
end;
|
||||
|
||||
procedure TCustomRichMemo.SetRangeColor(TextStart, TextLength: Integer; FontColor: TColor);
|
||||
begin
|
||||
SetRangeParams(TextStart, TextLength, [tmm_Color], '', 0, FontColor, [], []);
|
||||
|
||||
Reference in New Issue
Block a user