mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-10 09:19:49 +02:00
added overridable TCarbonMemo creation options
git-svn-id: trunk@20451 -
This commit is contained in:
parent
fde74a01fe
commit
610acd9c4d
@ -173,6 +173,7 @@ type
|
||||
procedure CreateWidget(const AParams: TCreateParams); override;
|
||||
procedure DestroyWidget; override;
|
||||
procedure GetLineOffset(AIndex: Integer; out AStart, AEnd: TXNOffset);
|
||||
function GetCreationOptions: TXNFrameOptions; virtual;
|
||||
public
|
||||
procedure TextDidChange; override;
|
||||
function GetTextObject: TXNObject;
|
||||
@ -1387,15 +1388,10 @@ end;
|
||||
procedure TCarbonMemo.CreateWidget(const AParams: TCreateParams);
|
||||
var
|
||||
Control: ControlRef;
|
||||
Options: OptionBits;
|
||||
R: HIRect;
|
||||
begin
|
||||
Options := kTXNMonostyledTextMask // disable more font styles
|
||||
or kTXNDontDrawSelectionWhenInactiveMask // hide selection, when inactive
|
||||
or kOutputTextInUnicodeEncodingMask;
|
||||
|
||||
R := ParamsToHIRect(AParams);
|
||||
if OSError(HITextViewCreate(@R, 0, Options, Control),
|
||||
if OSError(HITextViewCreate(@R, 0, GetCreationOptions, Control),
|
||||
Self, SCreateWidget, 'HITextViewCreate') then RaiseCreateWidgetError(LCLObject);
|
||||
|
||||
Widget := Control;
|
||||
@ -1489,6 +1485,13 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCarbonMemo.GetCreationOptions: TXNFrameOptions;
|
||||
begin
|
||||
Result := kTXNMonostyledTextMask // disable more font styles
|
||||
or kTXNDontDrawSelectionWhenInactiveMask // hide selection, when inactive
|
||||
or kOutputTextInUnicodeEncodingMask
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCarbonMemo.TextDidChange
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user