|
@@ -371,8 +371,13 @@ TYPE
|
|
FUNCTION GetColor (Color: Word): Word;
|
|
FUNCTION GetColor (Color: Word): Word;
|
|
FUNCTION Valid (Command: Word): Boolean; Virtual;
|
|
FUNCTION Valid (Command: Word): Boolean; Virtual;
|
|
FUNCTION GetState (AState: Word): Boolean;
|
|
FUNCTION GetState (AState: Word): Boolean;
|
|
|
|
+{$ifdef FV_UNICODE}
|
|
|
|
+ FUNCTION TextWidth (const Txt: UnicodeString): Sw_Integer;
|
|
|
|
+ FUNCTION CTextWidth (const Txt: UnicodeString): Sw_Integer;
|
|
|
|
+{$else FV_UNICODE}
|
|
FUNCTION TextWidth (const Txt: String): Sw_Integer;
|
|
FUNCTION TextWidth (const Txt: String): Sw_Integer;
|
|
FUNCTION CTextWidth (const Txt: String): Sw_Integer;
|
|
FUNCTION CTextWidth (const Txt: String): Sw_Integer;
|
|
|
|
+{$endif FV_UNICODE}
|
|
FUNCTION MouseInView (Point: TPoint): Boolean;
|
|
FUNCTION MouseInView (Point: TPoint): Boolean;
|
|
FUNCTION CommandEnabled (Command: Word): Boolean;
|
|
FUNCTION CommandEnabled (Command: Word): Boolean;
|
|
FUNCTION OverLapsArea (X1, Y1, X2, Y2: Sw_Integer): Boolean;
|
|
FUNCTION OverLapsArea (X1, Y1, X2, Y2: Sw_Integer): Boolean;
|
|
@@ -1232,6 +1237,23 @@ END;
|
|
{--TView--------------------------------------------------------------------}
|
|
{--TView--------------------------------------------------------------------}
|
|
{ TextWidth -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 25Nov99 LdB }
|
|
{ TextWidth -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 25Nov99 LdB }
|
|
{---------------------------------------------------------------------------}
|
|
{---------------------------------------------------------------------------}
|
|
|
|
+{$ifdef FV_UNICODE}
|
|
|
|
+FUNCTION TView.TextWidth (const Txt: UnicodeString): Sw_Integer;
|
|
|
|
+BEGIN
|
|
|
|
+ TextWidth := Length(Txt); { Calc text length }
|
|
|
|
+END;
|
|
|
|
+
|
|
|
|
+FUNCTION TView.CTextWidth (const Txt: UnicodeString): Sw_Integer;
|
|
|
|
+VAR I: Sw_Integer; S: UnicodeString;
|
|
|
|
+BEGIN
|
|
|
|
+ S := Txt; { Transfer text }
|
|
|
|
+ Repeat
|
|
|
|
+ I := Pos('~', S); { Check for tilde }
|
|
|
|
+ If (I <> 0) Then System.Delete(S, I, 1); { Remove the tilde }
|
|
|
|
+ Until (I = 0); { Remove all tildes }
|
|
|
|
+ CTextWidth := Length(S); { Calc text length }
|
|
|
|
+END;
|
|
|
|
+{$else FV_UNICODE}
|
|
FUNCTION TView.TextWidth (const Txt: String): Sw_Integer;
|
|
FUNCTION TView.TextWidth (const Txt: String): Sw_Integer;
|
|
BEGIN
|
|
BEGIN
|
|
TextWidth := Length(Txt); { Calc text length }
|
|
TextWidth := Length(Txt); { Calc text length }
|
|
@@ -1247,6 +1269,7 @@ BEGIN
|
|
Until (I = 0); { Remove all tildes }
|
|
Until (I = 0); { Remove all tildes }
|
|
CTextWidth := Length(S); { Calc text length }
|
|
CTextWidth := Length(S); { Calc text length }
|
|
END;
|
|
END;
|
|
|
|
+{$endif FV_UNICODE}
|
|
|
|
|
|
{--TView--------------------------------------------------------------------}
|
|
{--TView--------------------------------------------------------------------}
|
|
{ MouseInView -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 12Sep97 LdB }
|
|
{ MouseInView -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 12Sep97 LdB }
|