|
@@ -11,6 +11,73 @@
|
|
|
|
|
|
**********************************************************************}
|
|
**********************************************************************}
|
|
|
|
|
|
|
|
+{ TEnhancedVideoCell }
|
|
|
|
+
|
|
|
|
+function TEnhancedVideoCell.GetAttribute: Byte;
|
|
|
|
+begin
|
|
|
|
+ GetAttribute := Byte(FAttributes);
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure TEnhancedVideoCell.SetAttribute(Attr: Byte);
|
|
|
|
+begin
|
|
|
|
+ FAttributes := (FAttributes and $FF00) or Attr;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+function TEnhancedVideoCell.GetExtendedGraphemeCluster: WideString;
|
|
|
|
+begin
|
|
|
|
+ if (FAttributes and $8000) = 0 then
|
|
|
|
+ GetExtendedGraphemeCluster := EGC_SingleChar
|
|
|
|
+ else
|
|
|
|
+ GetExtendedGraphemeCluster := WideString(EGC_WideStr);
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure TEnhancedVideoCell.SetExtendedGraphemeCluster(const AExtendedGraphemeCluster: WideString);
|
|
|
|
+begin
|
|
|
|
+ if Length(AExtendedGraphemeCluster) = 1 then
|
|
|
|
+ begin
|
|
|
|
+ if (FAttributes and $8000) <> 0 then
|
|
|
|
+ begin
|
|
|
|
+ FAttributes := FAttributes and $7FFF;
|
|
|
|
+ WideString(EGC_WideStr) := '';
|
|
|
|
+ end;
|
|
|
|
+ EGC_SingleChar := AExtendedGraphemeCluster[1];
|
|
|
|
+ end
|
|
|
|
+ else
|
|
|
|
+ begin
|
|
|
|
+ if (FAttributes and $8000) = 0 then
|
|
|
|
+ begin
|
|
|
|
+ FAttributes := FAttributes or $8000;
|
|
|
|
+ EGC_WideStr := nil;
|
|
|
|
+ end;
|
|
|
|
+ WideString(EGC_WideStr) := AExtendedGraphemeCluster;
|
|
|
|
+ end;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+class operator TEnhancedVideoCell.Initialize(var evc: TEnhancedVideoCell);
|
|
|
|
+begin
|
|
|
|
+ evc.FAttributes := 0;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+class operator TEnhancedVideoCell.Finalize(var evc: TEnhancedVideoCell);
|
|
|
|
+begin
|
|
|
|
+ if (evc.FAttributes and $8000) <> 0 then
|
|
|
|
+ WideString(evc.EGC_WideStr) := '';
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure fpc_WideStr_Incr_Ref(var S: Pointer); external name 'FPC_WIDESTR_INCR_REF';
|
|
|
|
+
|
|
|
|
+class operator TEnhancedVideoCell.AddRef(var evc: TEnhancedVideoCell);
|
|
|
|
+begin
|
|
|
|
+ if (evc.FAttributes and $8000) <> 0 then
|
|
|
|
+ fpc_WideStr_Incr_Ref(evc.EGC_WideStr);
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+class operator TEnhancedVideoCell.Copy(constref aSrc: TEnhancedVideoCell; var aDst: TEnhancedVideoCell);
|
|
|
|
+begin
|
|
|
|
+ aDst.ExtendedGraphemeCluster := aSrc.ExtendedGraphemeCluster;
|
|
|
|
+ aDst.FAttributes := aSrc.FAttributes;
|
|
|
|
+end;
|
|
|
|
+
|
|
Const
|
|
Const
|
|
LockUpdateScreen : Integer = 0;
|
|
LockUpdateScreen : Integer = 0;
|
|
|
|
|