Remove set-model*
parent
c72b6d1886
commit
f668aa692e
|
@ -4,7 +4,6 @@
|
||||||
- empty search list, handle
|
- empty search list, handle
|
||||||
- change file, reload it manually, then reload modules; shouldn't this
|
- change file, reload it manually, then reload modules; shouldn't this
|
||||||
work?
|
work?
|
||||||
- overhaul models, set-model* is crap
|
|
||||||
- variable width word wrap
|
- variable width word wrap
|
||||||
- graphical crossref tool
|
- graphical crossref tool
|
||||||
- http://paste.lisp.org/display/30426
|
- http://paste.lisp.org/display/30426
|
||||||
|
@ -20,6 +19,7 @@
|
||||||
|
|
||||||
+ 0.88:
|
+ 0.88:
|
||||||
|
|
||||||
|
- models: don't do redundant work
|
||||||
- menu Command: quots look dumb
|
- menu Command: quots look dumb
|
||||||
- top level window positioning on ms windows
|
- top level window positioning on ms windows
|
||||||
- crashes:
|
- crashes:
|
||||||
|
|
|
@ -26,10 +26,10 @@ TUPLE: presentation object hook ;
|
||||||
invoke-presentation ;
|
invoke-presentation ;
|
||||||
|
|
||||||
: show-mouse-help ( presentation -- )
|
: show-mouse-help ( presentation -- )
|
||||||
dup find-world [ world-status set-model* ] [ drop ] if* ;
|
dup find-world [ world-status set-model ] [ drop ] if* ;
|
||||||
|
|
||||||
: hide-mouse-help ( presentation -- )
|
: hide-mouse-help ( presentation -- )
|
||||||
find-world [ world-status f swap set-model* ] when* ;
|
find-world [ world-status f swap set-model ] when* ;
|
||||||
|
|
||||||
M: presentation ungraft* ( presentation -- )
|
M: presentation ungraft* ( presentation -- )
|
||||||
dup hide-mouse-help delegate ungraft* ;
|
dup hide-mouse-help delegate ungraft* ;
|
||||||
|
|
|
@ -65,9 +65,6 @@ M: model set-model
|
||||||
[ set-model-value ] keep
|
[ set-model-value ] keep
|
||||||
model-connections [ model-changed ] each ;
|
model-connections [ model-changed ] each ;
|
||||||
|
|
||||||
: set-model* ( value model -- )
|
|
||||||
2dup model-value = [ 2drop ] [ set-model ] if ;
|
|
||||||
|
|
||||||
: ((change-model)) ( model quot -- newvalue model )
|
: ((change-model)) ( model quot -- newvalue model )
|
||||||
over >r >r model-value r> call r> ; inline
|
over >r >r model-value r> call r> ; inline
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ USING: gadgets kernel models namespaces sequences arrays ;
|
||||||
dupd editor-select-next mark>caret ;
|
dupd editor-select-next mark>caret ;
|
||||||
|
|
||||||
: editor-select ( from to editor -- )
|
: editor-select ( from to editor -- )
|
||||||
tuck editor-caret set-model* editor-mark set-model* ;
|
tuck editor-caret set-model editor-mark set-model ;
|
||||||
|
|
||||||
: select-elt ( editor elt -- )
|
: select-elt ( editor elt -- )
|
||||||
over >r
|
over >r
|
||||||
|
|
|
@ -25,7 +25,7 @@ C: document ( -- document )
|
||||||
: remove-loc document-locs delete ;
|
: remove-loc document-locs delete ;
|
||||||
|
|
||||||
: update-locs ( loc document -- )
|
: update-locs ( loc document -- )
|
||||||
document-locs [ set-model* ] each-with ;
|
document-locs [ set-model ] each-with ;
|
||||||
|
|
||||||
: doc-line ( line# document -- str ) model-value nth ;
|
: doc-line ( line# document -- str ) model-value nth ;
|
||||||
|
|
||||||
|
|
|
@ -53,10 +53,10 @@ M: editor model-changed
|
||||||
: change-caret ( editor quot -- )
|
: change-caret ( editor quot -- )
|
||||||
over >r >r dup editor-caret* swap control-model r> call r>
|
over >r >r dup editor-caret* swap control-model r> call r>
|
||||||
[ control-model validate-loc ] keep
|
[ control-model validate-loc ] keep
|
||||||
editor-caret set-model* ; inline
|
editor-caret set-model ; inline
|
||||||
|
|
||||||
: mark>caret ( editor -- )
|
: mark>caret ( editor -- )
|
||||||
dup editor-caret* swap editor-mark set-model* ;
|
dup editor-caret* swap editor-mark set-model ;
|
||||||
|
|
||||||
: change-caret&mark ( editor quot -- )
|
: change-caret&mark ( editor quot -- )
|
||||||
over >r change-caret r> mark>caret ; inline
|
over >r change-caret r> mark>caret ; inline
|
||||||
|
@ -87,7 +87,7 @@ M: editor model-changed
|
||||||
] keep swap 2array ;
|
] keep swap 2array ;
|
||||||
|
|
||||||
: click-loc ( editor model -- )
|
: click-loc ( editor model -- )
|
||||||
>r [ hand-rel ] keep point>loc r> set-model* ;
|
>r [ hand-rel ] keep point>loc r> set-model ;
|
||||||
|
|
||||||
: focus-editor ( editor -- )
|
: focus-editor ( editor -- )
|
||||||
t over set-editor-focused? relayout-1 ;
|
t over set-editor-focused? relayout-1 ;
|
||||||
|
|
|
@ -32,7 +32,7 @@ TUPLE: tool gadget ;
|
||||||
|
|
||||||
: show-tool ( class workspace -- tool )
|
: show-tool ( class workspace -- tool )
|
||||||
[ find-tool swap ] keep workspace-book control-model
|
[ find-tool swap ] keep workspace-book control-model
|
||||||
set-model* ;
|
set-model ;
|
||||||
|
|
||||||
: select-tool ( workspace class -- ) swap show-tool drop ;
|
: select-tool ( workspace class -- ) swap show-tool drop ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue