Change usages of set-gadget-dim to (>>dim)
parent
af1211b890
commit
5fcff67c9c
|
@ -50,7 +50,7 @@ IN: slides
|
||||||
<gadget>
|
<gadget>
|
||||||
T{ gradient f { { 0.25 0.25 0.25 1.0 } { 1.0 1.0 1.0 0.0 } } }
|
T{ gradient f { { 0.25 0.25 0.25 1.0 } { 1.0 1.0 1.0 0.0 } } }
|
||||||
over set-gadget-interior
|
over set-gadget-interior
|
||||||
{ 800 10 } over set-gadget-dim
|
{ 800 10 } over (>>dim)
|
||||||
{ 1 0 } over set-gadget-orientation
|
{ 1 0 } over set-gadget-orientation
|
||||||
gadget.
|
gadget.
|
||||||
] ($block) ;
|
] ($block) ;
|
||||||
|
|
|
@ -338,7 +338,7 @@ CLASS: {
|
||||||
{ "updateFactorGadgetSize:" "void" { "id" "SEL" "id" }
|
{ "updateFactorGadgetSize:" "void" { "id" "SEL" "id" }
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
2drop dup view-dim swap window set-gadget-dim yield
|
2drop dup view-dim swap window (>>dim) yield
|
||||||
] ui-try
|
] ui-try
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,7 @@ M: checkmark-paint draw-interior
|
||||||
: <checkmark> ( -- gadget )
|
: <checkmark> ( -- gadget )
|
||||||
<gadget>
|
<gadget>
|
||||||
dup checkmark-theme
|
dup checkmark-theme
|
||||||
{ 14 14 } over set-gadget-dim ;
|
{ 14 14 } over (>>dim) ;
|
||||||
|
|
||||||
: toggle-model ( model -- )
|
: toggle-model ( model -- )
|
||||||
[ not ] change-model ;
|
[ not ] change-model ;
|
||||||
|
@ -172,7 +172,7 @@ M: radio-paint draw-boundary
|
||||||
: <radio-knob> ( -- gadget )
|
: <radio-knob> ( -- gadget )
|
||||||
<gadget>
|
<gadget>
|
||||||
dup radio-knob-theme
|
dup radio-knob-theme
|
||||||
{ 16 16 } over set-gadget-dim ;
|
{ 16 16 } over (>>dim) ;
|
||||||
|
|
||||||
TUPLE: radio-control < button value ;
|
TUPLE: radio-control < button value ;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ USING: arrays assocs io kernel math models namespaces
|
||||||
prettyprint dlists dequeues sequences threads sequences words
|
prettyprint dlists dequeues sequences threads sequences words
|
||||||
debugger ui.gadgets ui.gadgets.worlds ui.gadgets.tracks
|
debugger ui.gadgets ui.gadgets.worlds ui.gadgets.tracks
|
||||||
ui.gestures ui.backend ui.render continuations init combinators
|
ui.gestures ui.backend ui.render continuations init combinators
|
||||||
hashtables concurrency.flags sets ;
|
hashtables concurrency.flags sets accessors ;
|
||||||
IN: ui
|
IN: ui
|
||||||
|
|
||||||
! Assoc mapping aliens to gadgets
|
! Assoc mapping aliens to gadgets
|
||||||
|
@ -172,7 +172,7 @@ SYMBOL: ui-thread
|
||||||
"UI update" spawn drop ;
|
"UI update" spawn drop ;
|
||||||
|
|
||||||
: open-world-window ( world -- )
|
: open-world-window ( world -- )
|
||||||
dup pref-dim over set-gadget-dim dup relayout graft ;
|
dup pref-dim over (>>dim) dup relayout graft ;
|
||||||
|
|
||||||
: open-window ( gadget title -- )
|
: open-window ( gadget title -- )
|
||||||
f <world> open-world-window ;
|
f <world> open-world-window ;
|
||||||
|
|
|
@ -93,7 +93,7 @@ SYMBOLS: msg-obj class-name-ptr mouse-captured ;
|
||||||
: handle-wm-size ( hWnd uMsg wParam lParam -- )
|
: handle-wm-size ( hWnd uMsg wParam lParam -- )
|
||||||
2nip
|
2nip
|
||||||
[ lo-word ] keep hi-word 2array
|
[ lo-word ] keep hi-word 2array
|
||||||
dup { 0 0 } = [ 2drop ] [ swap window set-gadget-dim ] if ;
|
dup { 0 0 } = [ 2drop ] [ swap window (>>dim) ] if ;
|
||||||
|
|
||||||
: handle-wm-move ( hWnd uMsg wParam lParam -- )
|
: handle-wm-move ( hWnd uMsg wParam lParam -- )
|
||||||
2nip
|
2nip
|
||||||
|
|
|
@ -22,7 +22,7 @@ M: world expose-event nip relayout ;
|
||||||
|
|
||||||
M: world configure-event
|
M: world configure-event
|
||||||
over configured-loc over (>>window-loc)
|
over configured-loc over (>>window-loc)
|
||||||
swap configured-dim over set-gadget-dim
|
swap configured-dim over (>>dim)
|
||||||
! In case dimensions didn't change
|
! In case dimensions didn't change
|
||||||
relayout-1 ;
|
relayout-1 ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue