lazarus-ccr/components/richmemo/richmemofactory.pas
skalogryz 3f1fc5e502 richmemo: * added tabstops support for the RichMemo and Win32Implementation
* added initialization to factory unit to prevent a warning on package compilation 
* clean up uses for richedit helpers
* code cleanup (removing empty lines)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4040 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-16 17:41:08 +00:00

61 lines
1.9 KiB
ObjectPascal

unit RichMemoFactory;
{$mode objfpc}{$H+}
interface
{$define NoRichMemo}
{$ifdef LCLWin32}{$undef NoRichMemo}{$endif}
{$ifdef LCLCarbon}{$undef NoRichMemo}{$endif}
{$ifdef LCLGtk2}{$undef NoRichMemo}{$endif}
{$ifdef LCLCocoa}{$undef NoRichMemo}{$endif}
{$ifdef LCLQt}{$undef NoRichMemo}{$endif}
uses
WSLCLClasses,
RichMemo
{$ifdef NoRichMemo},WSRichMemo{$endif}
{$ifdef LCLWin32},Win32RichMemo{$endif}
{$ifdef LCLCarbon},CarbonRichMemo{$endif}
{$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}
{$ifdef LCLCocoa},CocoaRichMemo{$endif}
{$ifdef LCLQt},QtRichMemo{$endif}
;
function RegisterCustomRichMemo: Boolean;
implementation
function RegisterCustomRichMemo: Boolean; alias : 'WSRegisterCustomRichMemo';
begin
Result := True;
{$ifdef LCLWin32}RegisterWSComponent(TCustomRichMemo, TWin32WSCustomRichMemo);{$endif}
{$ifdef LCLCarbon}RegisterWSComponent(TCustomRichMemo, TCarbonWSCustomRichMemo);{$endif}
{$ifdef LCLGtk2}
RegisterWSComponent(TCustomRichMemo, TGtk2WSCustomRichMemo);
{$ifndef RichMemoNoDefaultRTFLoader}
RegisterRTFLoader;
RegisterRTFSaver;
{$endif}
{$endif}
{$ifdef LCLCocoa}RegisterWSComponent(TCustomRichMemo, TCocoaWSCustomRichMemo);{$endif}
{$ifdef LCLQt}RegisterWSComponent(TCustomRichMemo, TQtWSCustomRichMemo);{$endif}
{$ifdef NoRichMemo}RegisterWSComponent(TCustomRichMemo, TWSCustomRichMemo);{$endif}
end;
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
end.