Commit 8e0ac13e authored by Denis Budyak's avatar Denis Budyak

Курсор вроде теперь показывает раскладку

parent ed1062dd
TFPETUCS32.Open WMEditors.Mod WMTextView.Mod ~
TFPETUCS32.Open WMInputMethods.Mod WMEditors.Mod WMTextView.Mod ~
TFPETUCS32.Open WMGraphics.Mod SkinEngine.Mod Commands.Mod ~
SkinEngine.ВклВыклПодчЛат ~
......
......@@ -136,11 +136,15 @@ TYPE
(* the switch is called to let the owner of the switch know, that the IME has been switched *)
IMToolSwitchCallback* = PROCEDURE;
(* Пр-ра из WMTextView, к-рая будет перерисовывать текущий курсор *)
WMTextViewSwitchCallback* = PROCEDURE;
VAR
defaultIME- : IME;
activeIME- : IME;
toolSwitch* : IMToolSwitchCallback;
aVMTextViewSwitchCallback* : WMTextViewSwitchCallback;
None- : IMEInterface;
(* Returns the installer procedure of the desired IME *)
......@@ -181,6 +185,10 @@ BEGIN
toolSwitch;
END;
IF aVMTextViewSwitchCallback # NIL THEN
aVMTextViewSwitchCallback;
END;
(* return the currently active IME *)
RETURN activeIME
END SwitchIME;
......
......@@ -6,7 +6,7 @@ IMPORT
WMStandardComponents, Strings, WMDropTarget, Raster,
WMRectangles, WMWindowManager, WMProperties,
Commands, FileHandlers, Streams, WMPopups, FP1616,
WMPieMenu, WMEvents, WMInputMethods, UnicodeBidirectionality, PositionDebugging, ContextualDependency, D := Debugging;
WMPieMenu, WMEvents, WMInputMethods, UnicodeBidirectionality, PositionDebugging, ContextualDependency;
CONST
TraceRenderOptimize = 0;
......@@ -477,6 +477,10 @@ TYPE
onChanged(SELF, NIL);
END;
END SetCurrentVisibility;
PROCEDURE Refresh;
BEGIN onChanged(SELF, NIL); END Refresh;
PROCEDURE GetArea(x, y, ascent : SIZE) : WMRectangles.Rectangle;
BEGIN
......@@ -2654,7 +2658,7 @@ TYPE
END RenderAboveTextMarkers;
PROCEDURE DrawBackground*(canvas : WMGraphics.Canvas);
VAR la, lb, i, top, b : SIZE; t: SIZE; rect, clip : WMRectangles.Rectangle; cstate : WMGraphics.CanvasState;
VAR la, lb, i, top : SIZE; t: SIZE; rect, clip : WMRectangles.Rectangle; cstate : WMGraphics.CanvasState;
BEGIN
canvas.GetClipRect(clip);
IF WMRectangles.RectEmpty(clip) THEN RETURN END;
......@@ -4420,6 +4424,15 @@ BEGIN
NEW(e); RETURN e
END GenTextView;
(* Процедура будет вызвана при включении/выключении IME *)
PROCEDURE IMESwitched;
VAR c : Cursor;
BEGIN
IF currentTextView # NIL THEN
c := currentTextView.cursor;
IF c # NIL THEN
c.Refresh() END END END IMESwitched;
BEGIN
NEW(cursorBlinker);
......@@ -4428,4 +4441,5 @@ BEGIN
InitStrings;
InitPrototypes;
manager := WMWindowManager.GetDefaultManager();
WMInputMethods.aVMTextViewSwitchCallback := IMESwitched;
END WMTextView.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment