Fresh IDE . Check-in [f9c4765e39]
Not logged in

This repository is a mirror!

The original is located on: https://fresh.flatassembler.net/fossil/repo/fresh
If you want to follow the project, please update your remote-url

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:The xor mask of the caret, moved to [GUI.clTextCaret];
Timelines: family | ancestors | descendants | both | NoCanvasGUI
Files: files | file ages | folders
SHA1:f9c4765e39a275c2738996a643b1a05b23c65ee4
User & Date: johnfound 2017-12-05 12:06:57
Context
2017-12-19
13:25
Work on the TText structures, TAsmEdit control (undo/redo, selections, text editing methods, text navigation methods, caret, etc.), some changes to _real_objects.inc macro library in order to provide arguments hint on method execution in the IDE. Not finished and unstable yet. check-in: bc0fc9c550 user: johnfound tags: NoCanvasGUI
2017-12-05
12:06
The xor mask of the caret, moved to [GUI.clTextCaret]; check-in: f9c4765e39 user: johnfound tags: NoCanvasGUI
11:29
Implemented inverting text caret (instead of semitransparent) because it looks better. Implemented vertical caret support in TAsmEdit. check-in: 13078aacb8 user: johnfound tags: NoCanvasGUI
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to freshlib/gui/TAsmEdit.asm.

497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
...
544
545
546
547
548
549
550

551
552
553
554
555
556
557

        xor     ecx, 1
        mov     ebx, [esi+TAsmEdit._caret_x+4*ecx]
        mov     [esi+TAsmEdit._selection_x+4*ecx], ebx

.selection_ok:

;        OutputValue "CaretX = ", [esi+TAsmEdit._caret_x], 10, -1
;        OutputValue "CaretY = ", [esi+TAsmEdit._caret_y], 10, -1
;        OutputValue "SelectionX = ", [esi+TAsmEdit._selection_x], 10, -1
;        OutputValue "SelectionU = ", [esi+TAsmEdit._selection_y], 10, -1

        exec    esi, TAsmEdit:_AddSelRectangles, edx
        mov     ecx, [edx+TArray.count]
        lea     edi, [edx+TArray.array]

.loop:
        dec     ecx
        js      .freelist
................................................................................
.freelist:
        stdcall FreeMem, edx

.finish:
        popad
        return
endp




method TAsmEdit.SetPosX
.render RECT
begin
        pushad







<
<
<
<
<







 







>







497
498
499
500
501
502
503





504
505
506
507
508
509
510
...
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553

        xor     ecx, 1
        mov     ebx, [esi+TAsmEdit._caret_x+4*ecx]
        mov     [esi+TAsmEdit._selection_x+4*ecx], ebx

.selection_ok:






        exec    esi, TAsmEdit:_AddSelRectangles, edx
        mov     ecx, [edx+TArray.count]
        lea     edi, [edx+TArray.array]

.loop:
        dec     ecx
        js      .freelist
................................................................................
.freelist:
        stdcall FreeMem, edx

.finish:
        popad
        return
endp




method TAsmEdit.SetPosX
.render RECT
begin
        pushad

Changes to freshlib/gui/textcaret.asm.

272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
        jz      .release

        push    ecx edx
        mov     ecx, [Caret.Pos.x]
        mov     edx, [Caret.Pos.y]
        add     ecx, [Caret.xOffs]
        add     edx, [Caret.yOffs]
        stdcall XorRect, ebx, ecx, edx, [Caret.Pos.width], [Caret.Pos.height], $00ffffff
;        stdcall BlendSolidRect, ebx, ecx, edx, [Caret.Pos.width], [Caret.Pos.height], [GUI.clTextCaret]  ; ????????? does not look good this way...
        pop     edx ecx

.release:
        stdcall MutexRelease, Caret.mxLock
.exit:
        pop     ebx







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
        jz      .release

        push    ecx edx
        mov     ecx, [Caret.Pos.x]
        mov     edx, [Caret.Pos.y]
        add     ecx, [Caret.xOffs]
        add     edx, [Caret.yOffs]
        stdcall XorRect, ebx, ecx, edx, [Caret.Pos.width], [Caret.Pos.height], [GUI.clTextCaret]
;        stdcall BlendSolidRect, ebx, ecx, edx, [Caret.Pos.width], [Caret.Pos.height], [GUI.clTextCaret]  ; ????????? does not look good this way...
        pop     edx ecx

.release:
        stdcall MutexRelease, Caret.mxLock
.exit:
        pop     ebx

Changes to freshlib/gui/themes/flat_gui.asm.

67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
clPomegranate = $ffc0392b

iglobal

        NamedArray      GUI,                                           \
\
\ ; Text caret color
                clTextCaret,       HEX, $d0ff0000,              \       ;(clAlizarin and $00ffffff) or $e0000000,                    \
                caretTimes,        NUM, <250, 250>,                    \
\ ; Widgets border colors and width
                clBorderNeutral,   HEX, clTurquoise,                   \
                clBorderLight,     HEX, clTurquoise,                   \
                clBorderDark,      HEX, clTurquoise,                   \
                clBorderNeutralGray, HEX, $ff606060,                   \
                clBorderLightGray, HEX, $ff606060,                     \







|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
clPomegranate = $ffc0392b

iglobal

        NamedArray      GUI,                                           \
\
\ ; Text caret color
                clTextCaret,       HEX, $0000ffff,              \       ;(clAlizarin and $00ffffff) or $e0000000,                    \
                caretTimes,        NUM, <250, 250>,                    \
\ ; Widgets border colors and width
                clBorderNeutral,   HEX, clTurquoise,                   \
                clBorderLight,     HEX, clTurquoise,                   \
                clBorderDark,      HEX, clTurquoise,                   \
                clBorderNeutralGray, HEX, $ff606060,                   \
                clBorderLightGray, HEX, $ff606060,                     \