Permalink
Browse files

editors.ui: Make the editors ui its own thing.

  • Loading branch information...
erg committed Jul 12, 2018
1 parent cd2b8ee commit b21f9ed3eb27abe57d730bd214871dfcbbd20db9
Showing with 16 additions and 0 deletions.
  1. +16 −0 basis/editors/ui/ui.factor
@@ -0,0 +1,16 @@
! Copyright (C) 2018 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors editors fry kernel sequences ui ui.gadgets
ui.gadgets.borders ui.gadgets.buttons ui.gadgets.packs
ui.gadgets.scrollers ui.tools.listener vocabs.loader ;
IN: editors.ui
: <reload-editor-button> ( editor -- button )
dup '[ drop [ _ reload ] \ run call-listener ] <border-button> ;
: <editor-reloader> ( -- gadget )
<filled-pile> { 2 2 } >>gap available-editors
[ <reload-editor-button> add-gadget ] each ;
MAIN-WINDOW: editor-window { { title "Editors" } }
<editor-reloader> { 2 2 } <border> <scroller> >>gadgets ;

0 comments on commit b21f9ed

Please sign in to comment.