2009-06-04 19:38:39 +00:00
|
|
|
unit RichMemoFactory;
|
|
|
|
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
2010-05-20 12:21:17 +00:00
|
|
|
{$define NoRichMemo}
|
|
|
|
{$ifdef LCLWin32}{$undef NoRichMemo}{$endif}
|
|
|
|
{$ifdef LCLCarbon}{$undef NoRichMemo}{$endif}
|
|
|
|
{$ifdef LCLGtk2}{$undef NoRichMemo}{$endif}
|
2014-11-19 05:27:26 +00:00
|
|
|
{$ifdef LCLCocoa}{$undef NoRichMemo}{$endif}
|
2014-11-22 04:38:00 +00:00
|
|
|
{$ifdef LCLQt}{$undef NoRichMemo}{$endif}
|
2017-04-30 02:29:35 +00:00
|
|
|
{$ifdef LCLQt5}{$undef NoRichMemo}{$endif}
|
2009-06-04 19:38:39 +00:00
|
|
|
|
|
|
|
uses
|
|
|
|
WSLCLClasses,
|
2010-05-20 12:21:17 +00:00
|
|
|
RichMemo
|
|
|
|
{$ifdef NoRichMemo},WSRichMemo{$endif}
|
2009-06-05 17:04:00 +00:00
|
|
|
{$ifdef LCLWin32},Win32RichMemo{$endif}
|
|
|
|
{$ifdef LCLCarbon},CarbonRichMemo{$endif}
|
2014-11-19 06:00:34 +00:00
|
|
|
|
|
|
|
{$ifdef LCLGtk2}
|
|
|
|
//Since Gtk doesn't have a native RTF loader, RichMemo provides
|
|
|
|
//a widgetset independent loader. It's registered by default for
|
|
|
|
//Gtk. The registration can be prevented by compiling
|
|
|
|
//with RichMemoNoDefaultRTFLoader defined.
|
|
|
|
//or setting RTFLoadStream to nil (or any other routine) in runtime.
|
|
|
|
,RichMemoRTF, Gtk2RichMemo
|
|
|
|
{$endif}
|
2014-11-19 05:27:26 +00:00
|
|
|
{$ifdef LCLCocoa},CocoaRichMemo{$endif}
|
2014-11-22 04:38:00 +00:00
|
|
|
{$ifdef LCLQt},QtRichMemo{$endif}
|
2017-04-30 02:29:35 +00:00
|
|
|
{$ifdef LCLQt5},Qt5RichMemo{$endif}
|
2009-06-04 19:38:39 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
function RegisterCustomRichMemo: Boolean;
|
2010-04-13 12:05:58 +00:00
|
|
|
|
2009-06-04 19:38:39 +00:00
|
|
|
implementation
|
|
|
|
|
|
|
|
function RegisterCustomRichMemo: Boolean; alias : 'WSRegisterCustomRichMemo';
|
|
|
|
begin
|
2010-04-13 12:05:58 +00:00
|
|
|
Result := True;
|
2010-05-20 10:27:49 +00:00
|
|
|
{$ifdef LCLWin32}RegisterWSComponent(TCustomRichMemo, TWin32WSCustomRichMemo);{$endif}
|
|
|
|
{$ifdef LCLCarbon}RegisterWSComponent(TCustomRichMemo, TCarbonWSCustomRichMemo);{$endif}
|
2014-11-19 06:00:34 +00:00
|
|
|
{$ifdef LCLGtk2}
|
|
|
|
RegisterWSComponent(TCustomRichMemo, TGtk2WSCustomRichMemo);
|
|
|
|
{$ifndef RichMemoNoDefaultRTFLoader}
|
|
|
|
RegisterRTFLoader;
|
2014-11-27 06:16:24 +00:00
|
|
|
RegisterRTFSaver;
|
2014-11-19 06:00:34 +00:00
|
|
|
{$endif}
|
|
|
|
{$endif}
|
2014-11-19 05:27:26 +00:00
|
|
|
{$ifdef LCLCocoa}RegisterWSComponent(TCustomRichMemo, TCocoaWSCustomRichMemo);{$endif}
|
2014-11-22 04:38:00 +00:00
|
|
|
{$ifdef LCLQt}RegisterWSComponent(TCustomRichMemo, TQtWSCustomRichMemo);{$endif}
|
2017-04-30 02:29:35 +00:00
|
|
|
{$ifdef LCLQt5}RegisterWSComponent(TCustomRichMemo, TQtWSCustomRichMemo);{$endif}
|
2010-05-20 10:27:49 +00:00
|
|
|
{$ifdef NoRichMemo}RegisterWSComponent(TCustomRichMemo, TWSCustomRichMemo);{$endif}
|
2009-06-04 19:38:39 +00:00
|
|
|
end;
|
|
|
|
|
2015-03-16 17:41:08 +00:00
|
|
|
initialization
|
|
|
|
// initialization is here just to prevent compiler warning about not being used
|
|
|
|
// the unit is actually used by providing an implementation for WSREgisterCustomRichMemo class
|
|
|
|
// thus it shouldn't be smart-linked out by a smartlinker. hmm
|
2009-06-04 19:38:39 +00:00
|
|
|
|
|
|
|
end.
|
|
|
|
|