Paste: twitter client mockup
Author: | zimbatm |
Mode: | factor |
Date: | Sat, 2 May 2009 17:20:12 |
Plain Text |
USING: accessors fry kernel models sequences ui ui.gadgets
ui.gadgets.borders ui.gadgets.buttons ui.gadgets.editors
ui.gadgets.labels ui.gadgets.packs ui.gadgets.scrollers
ui.gadgets.status-bar ui.gadgets.tracks ui.gadgets.worlds
ui.tools.common ;
IN: tweety
TUPLE: tweety-gadget < tool
;
{ 200 400 } tweety-gadget set-tool-dim
: <tweety-user> ( parent -- gadget )
drop
<shelf>
"User infos here" <label> add-gadget
;
: <tweety-list> ( parent -- gadget )
drop
<pile>
"Tweet one here" <label> add-gadget
"Tweet two here" <label> add-gadget
"Tweet three here" <label> add-gadget
"Tweet four here" <label> add-gadget
"Tweet five here" <label> add-gadget
<scroller>
;
: <tweety-submit> ( parent -- gadget )
<shelf>
swap '[ "tweeted: " swap append _ show-status ] <action-field>
15 >>min-cols
15 >>max-cols
add-gadget
"Tweet!" [ drop ] <border-button> add-gadget
;
: <tweety-gadget> ( -- gadget )
vertical tweety-gadget new-track
dup <tweety-user> f track-add
dup <tweety-list> 1.0 track-add
dup <tweety-submit> f track-add
;
: run-tweety ( -- )
[ <tweety-gadget> "Tweety" open-status-window ] with-ui ;
MAIN: run-tweety
Author: | test |
Mode: | factor |
Date: | Fri, 17 Jul 2009 19:38:15 |
Plain Text |
this is a test
New Annotation