root/widgets/field.r

Revision 112, 0.7 kB (checked in by ashley, 8 months ago)

Added pill.r
Scroller fixes
Major color / theme management changes (in progress)

Line 
1field: make rebface [
2        tip:    {
3                USAGE:
4                        field
5                        field -1 "String"
6
7                DESCRIPTION:
8                        Editable text field with no text wrapping.
9
10                OPTIONS:
11                        'info specifies read-only
12        }
13        size:   50x5
14        text:   ""
15        color:  colors/page
16        edge:   theme-edge
17        font:   default-font
18        para:   default-para
19        feel:   edit/feel
20        rebind: make function! [] [color: colors/page]
21        init:   make function! [] [
22                if find options 'info [
23                        feel: none
24                        all [color = colors/page color: colors/outline-light]
25                ]
26                para: make para [] ; avoid shared para object for scrollable input widget
27                all [negative? size/x size/x: 10000 size/x: 4 + first size-text self]
28        ]
29        esc:    none
30        caret:  none
31        undo:   copy []
32]
Note: See TracBrowser for help on using the browser.