-TUPLE: action-editor < editor default-text ;
-
-: <action-editor> ( -- editor )
- action-editor new-editor ;
-
-<PRIVATE
-
-: draw-default-text? ( editor -- ? )
- { [ default-text>> ] [ model>> doc-string empty? ] } 1&& ;
-
-: draw-default-text ( editor -- )
- [ font>> clone line-color >>foreground ]
- [ default-text>> ] bi draw-text ;
-
-PRIVATE>
-
-M: action-editor draw-gadget*
- dup draw-default-text? [
- [ draw-default-text ] [ draw-caret ] bi
- ] [
- call-next-method
- ] if ;
-
-M: action-editor pref-dim*
- dup draw-default-text? [
- [ font>> ] [ default-text>> ] bi text-dim { 1 0 } v+
- ] [
- call-next-method
- ] if ;
-