Remove world size limitation
parent
cd68cccb2c
commit
af7c4de023
|
@ -1,10 +1,9 @@
|
||||||
! Copyright (C) 2005, 2007 Slava Pestov.
|
! Copyright (C) 2005, 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: arrays ui.gadgets
|
USING: accessors arrays ui.gadgets ui.gadgets.viewports
|
||||||
ui.gadgets.viewports ui.gadgets.frames ui.gadgets.grids
|
ui.gadgets.frames ui.gadgets.grids ui.gadgets.theme
|
||||||
ui.gadgets.theme ui.gadgets.sliders ui.gestures kernel math
|
ui.gadgets.sliders ui.gestures kernel math namespaces sequences
|
||||||
namespaces sequences models combinators math.vectors
|
models combinators math.vectors classes.tuple ;
|
||||||
classes.tuple ;
|
|
||||||
IN: ui.gadgets.scrollers
|
IN: ui.gadgets.scrollers
|
||||||
|
|
||||||
TUPLE: scroller viewport x y follows ;
|
TUPLE: scroller viewport x y follows ;
|
||||||
|
@ -133,3 +132,13 @@ M: scroller focusable-child*
|
||||||
|
|
||||||
M: scroller model-changed
|
M: scroller model-changed
|
||||||
nip f swap set-scroller-follows ;
|
nip f swap set-scroller-follows ;
|
||||||
|
|
||||||
|
TUPLE: limited-scroller dim ;
|
||||||
|
|
||||||
|
: <limited-scroller> ( gadget -- scroller )
|
||||||
|
<scroller>
|
||||||
|
limited-scroller new
|
||||||
|
[ set-gadget-delegate ] keep ;
|
||||||
|
|
||||||
|
M: limited-scroller pref-dim*
|
||||||
|
dim>> ;
|
||||||
|
|
|
@ -48,9 +48,6 @@ M: world request-focus-on ( child gadget -- )
|
||||||
|
|
||||||
M: world hashcode* drop world hashcode* ;
|
M: world hashcode* drop world hashcode* ;
|
||||||
|
|
||||||
M: world pref-dim*
|
|
||||||
delegate pref-dim* [ >fixnum ] map { 1024 768 } vmin ;
|
|
||||||
|
|
||||||
M: world layout*
|
M: world layout*
|
||||||
dup delegate layout*
|
dup delegate layout*
|
||||||
dup world-glass [
|
dup world-glass [
|
||||||
|
|
|
@ -24,19 +24,10 @@ TUPLE: listener-gadget input output stack ;
|
||||||
: <listener-input> ( listener -- gadget )
|
: <listener-input> ( listener -- gadget )
|
||||||
listener-gadget-output <pane-stream> <interactor> ;
|
listener-gadget-output <pane-stream> <interactor> ;
|
||||||
|
|
||||||
TUPLE: input-scroller ;
|
|
||||||
|
|
||||||
: <input-scroller> ( interactor -- scroller )
|
|
||||||
<scroller>
|
|
||||||
input-scroller new
|
|
||||||
[ set-gadget-delegate ] keep ;
|
|
||||||
|
|
||||||
M: input-scroller pref-dim*
|
|
||||||
drop { 0 100 } ;
|
|
||||||
|
|
||||||
: listener-input, ( -- )
|
: listener-input, ( -- )
|
||||||
g <listener-input> g-> set-listener-gadget-input
|
g <listener-input> g-> set-listener-gadget-input
|
||||||
<input-scroller> "Input" <labelled-gadget> f track, ;
|
<limited-scroller> { 0 100 } >>dim
|
||||||
|
"Input" <labelled-gadget> f track, ;
|
||||||
|
|
||||||
: welcome. ( -- )
|
: welcome. ( -- )
|
||||||
"If this is your first time with Factor, please read the " print
|
"If this is your first time with Factor, please read the " print
|
||||||
|
|
|
@ -5,7 +5,7 @@ sequences ui ui.backend ui.tools.debugger ui.gadgets
|
||||||
ui.gadgets.books ui.gadgets.buttons ui.gadgets.labelled
|
ui.gadgets.books ui.gadgets.buttons ui.gadgets.labelled
|
||||||
ui.gadgets.panes ui.gadgets.scrollers ui.gadgets.tracks
|
ui.gadgets.panes ui.gadgets.scrollers ui.gadgets.tracks
|
||||||
ui.gadgets.worlds ui.gadgets.presentations ui.gadgets.status-bar
|
ui.gadgets.worlds ui.gadgets.presentations ui.gadgets.status-bar
|
||||||
ui.commands ui.gestures assocs arrays namespaces ;
|
ui.commands ui.gestures assocs arrays namespaces accessors ;
|
||||||
IN: ui.tools.workspace
|
IN: ui.tools.workspace
|
||||||
|
|
||||||
TUPLE: workspace book listener popup ;
|
TUPLE: workspace book listener popup ;
|
||||||
|
@ -49,7 +49,10 @@ M: gadget tool-scroller drop f ;
|
||||||
get-workspace find-tool nip ;
|
get-workspace find-tool nip ;
|
||||||
|
|
||||||
: help-window ( topic -- )
|
: help-window ( topic -- )
|
||||||
[ <pane> [ [ help ] with-pane ] keep <scroller> ] keep
|
[
|
||||||
|
<pane> [ [ help ] with-pane ] keep
|
||||||
|
<limited-scroller> { 550 700 } >>dim
|
||||||
|
] keep
|
||||||
article-title open-window ;
|
article-title open-window ;
|
||||||
|
|
||||||
: hide-popup ( workspace -- )
|
: hide-popup ( workspace -- )
|
||||||
|
|
Loading…
Reference in New Issue