More work on the workspace UI
parent
ab786bf132
commit
edeb988b5f
|
|
@ -1,6 +1,5 @@
|
|||
+ 0.84:
|
||||
|
||||
- default font should not be monospaced
|
||||
- new browser:
|
||||
- show currently selected vocab & words
|
||||
- scroll to existing won't work
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
! Copyright (C) 2005, 2006 Kevin Reid.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: cocoa compiler gadgets gadgets-browser
|
||||
USING: cocoa compiler gadgets gadgets-browser gadgets-help
|
||||
gadgets-listener gadgets-search kernel memory objc objc-classes
|
||||
sequences strings words ;
|
||||
sequences strings words io ;
|
||||
IN: cocoa
|
||||
|
||||
! -------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -93,4 +93,5 @@ M: button-paint draw-boundary
|
|||
swap [ swap >r = r> set-button-selected? ] curry <control> ;
|
||||
|
||||
: <radio-box> ( model assoc -- gadget )
|
||||
[ first2 <radio-control> ] map-with make-shelf ;
|
||||
[ first2 <radio-control> ] map-with
|
||||
make-shelf dup highlight-theme ;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
! Copyright (C) 2006 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
IN: new-browser
|
||||
IN: gadgets-browser
|
||||
USING: arrays sequences kernel gadgets-panes definitions
|
||||
prettyprint gadgets-tiles gadgets-theme gadgets-borders gadgets
|
||||
generic gadgets-scrolling math io words models styles
|
||||
|
|
@ -88,6 +88,5 @@ M: browser gadget-title drop "Browser" <model> ;
|
|||
|
||||
: browser-tool [ browser? ] [ <browser> ] [ browse ] ;
|
||||
|
||||
M: word show browser-tool call-tool ;
|
||||
|
||||
M: vocab-link show browser-tool call-tool ;
|
||||
\ word 1 "Browse" [ browser-tool call-tool ] define-operation
|
||||
vocab-link 1 "Browse" [ browser-tool call-tool ] define-operation
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@ help-gadget {
|
|||
gadget get help-gadget-history [ help ] <pane-control> ;
|
||||
|
||||
C: help-gadget ( -- gadget )
|
||||
f <history> over set-help-gadget-history {
|
||||
T{ link f "handbook" } <history>
|
||||
over set-help-gadget-history {
|
||||
{ [ gadget get <toolbar> ] f f @top }
|
||||
{ [ <help-pane> <scroller> ] f f @center }
|
||||
} make-frame* ;
|
||||
|
|
|
|||
|
|
@ -1,22 +1,23 @@
|
|||
! Copyright (C) 2006 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
IN: gadgets-workspace
|
||||
USING: gadgets-listener gadgets-walker gadgets-help
|
||||
gadgets-walker ;
|
||||
USING: arrays gadgets gadgets-listener gadgets-buttons
|
||||
gadgets-walker gadgets-help gadgets-walker sequences
|
||||
gadgets-books gadgets-frames kernel models namespaces ;
|
||||
|
||||
TUPLE: workspace model ;
|
||||
|
||||
: workspace-tabs
|
||||
{
|
||||
{ "Listener" [ <listener-gadget> ] }
|
||||
{ "Walker" [ <walker-gadget> ] }
|
||||
{ "Dictionary" [ "Hello" <label> ] }
|
||||
{ "Documentation" [ <help-gadget> ] }
|
||||
{ "Listener" listener-gadget [ <listener-gadget> ] }
|
||||
{ "Walker" walker-gadget [ <walker-gadget> ] }
|
||||
{ "Dictionary" browser [ <browser> ] }
|
||||
{ "Documentation" help-gadget [ <help-gadget> ] }
|
||||
} ;
|
||||
|
||||
: <workspace-book> ( workspace -- book )
|
||||
workspace-model
|
||||
workspace-tabs [ second ] map <book-control> ;
|
||||
workspace-tabs [ third ] map <book-control> ;
|
||||
|
||||
: <workspace-tabs> ( workspace -- tabs )
|
||||
workspace-model
|
||||
|
|
@ -27,4 +28,4 @@ C: workspace
|
|||
0 <model> over set-workspace-model {
|
||||
{ [ gadget get <workspace-tabs> ] f f @top }
|
||||
{ [ gadget get <workspace-book> ] f f @center }
|
||||
} make-frame*
|
||||
} make-frame* ;
|
||||
|
|
|
|||
Loading…
Reference in New Issue