2009-06-20 20:54:09 +00:00
|
|
|
{
|
|
|
|
wsrichmemo.pas
|
|
|
|
|
|
|
|
Author: Dmitry 'skalogryz' Boyarintsev
|
|
|
|
|
|
|
|
*****************************************************************************
|
|
|
|
* *
|
|
|
|
* This file is part of the Lazarus Component Library (LCL) *
|
|
|
|
* *
|
|
|
|
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
|
|
|
|
* for details about the copyright. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
|
|
|
* *
|
|
|
|
*****************************************************************************
|
|
|
|
}
|
|
|
|
|
2009-06-04 19:38:39 +00:00
|
|
|
unit WSRichMemo;
|
|
|
|
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
Classes, SysUtils,
|
|
|
|
|
|
|
|
Graphics, Controls,
|
|
|
|
|
|
|
|
WSStdCtrls;
|
|
|
|
|
|
|
|
type
|
2009-06-13 12:00:11 +00:00
|
|
|
|
|
|
|
TIntFontParams = record
|
|
|
|
Name : String;
|
|
|
|
Size : Integer;
|
|
|
|
Color : TColor;
|
|
|
|
Style : TFontStyles;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2009-06-04 19:38:39 +00:00
|
|
|
{ TWSCustomRichMemo }
|
|
|
|
|
|
|
|
TWSCustomRichMemo = class(TWSCustomMemo)
|
|
|
|
published
|
2009-06-12 20:46:34 +00:00
|
|
|
class function GetStyleRange(const AWinControl: TWinControl; TextStart: Integer; var RangeStart, RangeLen: Integer): Boolean; virtual;
|
|
|
|
class function GetTextAttributes(const AWinControl: TWinControl; TextStart: Integer;
|
2009-06-13 12:00:11 +00:00
|
|
|
var Params: TIntFontParams): Boolean; virtual;
|
2009-06-04 19:38:39 +00:00
|
|
|
class procedure SetTextAttributes(const AWinControl: TWinControl; TextStart, TextLen: Integer;
|
2009-08-18 05:21:51 +00:00
|
|
|
const Params: TIntFontParams); virtual;
|
|
|
|
class procedure InDelText(const AWinControl: TWinControl; const TextUTF8: String; DstStart, DstLen: Integer); virtual;
|
2009-06-04 19:38:39 +00:00
|
|
|
class procedure SetHideSelection(const AWinControl: TWinControl; AHideSelection: Boolean); virtual;
|
2009-06-10 10:32:00 +00:00
|
|
|
class function LoadRichText(const AWinControl: TWinControl; Source: TStream): Boolean; virtual;
|
|
|
|
class function SaveRichText(const AWinControl: TWinControl; Dest: TStream): Boolean; virtual;
|
2009-06-04 19:38:39 +00:00
|
|
|
end;
|
|
|
|
TWSCustomRichMemoClass = class of TWSCustomRichMemo;
|
2009-06-10 10:32:00 +00:00
|
|
|
|
2009-06-04 19:38:39 +00:00
|
|
|
|
|
|
|
function WSRegisterCustomRichMemo: Boolean; external name 'WSRegisterCustomRichMemo';
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
{ TWSCustomRichMemo }
|
|
|
|
|
2009-06-12 20:46:34 +00:00
|
|
|
class function TWSCustomRichMemo.GetStyleRange(const AWinControl: TWinControl;
|
|
|
|
TextStart: Integer; var RangeStart, RangeLen: Integer): Boolean;
|
|
|
|
begin
|
|
|
|
RangeStart :=-1;
|
|
|
|
RangeLen := -1;
|
|
|
|
Result := false;
|
|
|
|
end;
|
|
|
|
|
2009-06-04 19:38:39 +00:00
|
|
|
class function TWSCustomRichMemo.GetTextAttributes(const AWinControl: TWinControl;
|
2009-06-13 12:00:11 +00:00
|
|
|
TextStart: Integer; var Params: TIntFontParams): Boolean;
|
2009-06-04 19:38:39 +00:00
|
|
|
begin
|
|
|
|
Result := false;
|
|
|
|
end;
|
|
|
|
|
|
|
|
class procedure TWSCustomRichMemo.SetTextAttributes(const AWinControl: TWinControl;
|
|
|
|
TextStart, TextLen: Integer;
|
2009-06-13 12:00:11 +00:00
|
|
|
{Mask: TTextStyleMask;} const Params: TIntFontParams);
|
2009-06-04 19:38:39 +00:00
|
|
|
begin
|
|
|
|
end;
|
|
|
|
|
2009-08-18 05:21:51 +00:00
|
|
|
class procedure TWSCustomRichMemo.InDelText(const AWinControl: TWinControl; const TextUTF8: String; DstStart, DstLen: Integer);
|
|
|
|
begin
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
2009-06-04 19:38:39 +00:00
|
|
|
class procedure TWSCustomRichMemo.SetHideSelection(const AWinControl: TWinControl; AHideSelection: Boolean);
|
|
|
|
begin
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
2009-06-10 10:32:00 +00:00
|
|
|
class function TWSCustomRichMemo.LoadRichText(const AWinControl: TWinControl; Source: TStream): Boolean;
|
|
|
|
begin
|
|
|
|
Result := false;
|
|
|
|
end;
|
|
|
|
|
|
|
|
class function TWSCustomRichMemo.SaveRichText(const AWinControl: TWinControl; Dest: TStream): Boolean;
|
|
|
|
begin
|
|
|
|
Result := false;
|
|
|
|
end;
|
|
|
|
|
2009-06-04 19:38:39 +00:00
|
|
|
end.
|
|
|
|
|