13 preset_list
: LINKED_LIST
[PRESET
]
20 put_preset_list(l
: LINKED_LIST
[PRESET
]) is
23 sl
: LINKED_LIST
[STRING]
26 it
:= l
.get_new_iterator
30 sl
.add_last(it
.item
.name
)
34 preset_lb
.put_list(sl
)
49 !COMMAND_ACTIVATE
!c
.make(Current)
50 b
.put_command(c
, b
.signal_activate
)
51 add_widget(b
, 30, 175)
55 !COMMAND_CANCEL
!c
.make(Current)
56 b
.put_command(c
, b
.signal_activate
)
57 add_widget(b
, 100, 175)
63 !COMMAND_PRESET_CHANGE
!c
.make(Current)
64 preset_lb
.put_command(c
, preset_lb
.signal_change
)
65 preset_lb
.put_size(70, 16)
66 add_widget(preset_lb
, 70, 10)
72 !COMMAND_CUSTOM_CHANGE
!c
.make(Current)
73 width_tb
.put_command(c
, width_tb
.signal_change
)
74 width_tb
.put_size(40, 16)
75 add_widget(width_tb
, 70, 30)
81 !COMMAND_CUSTOM_CHANGE
!c
.make(Current)
82 height_tb
.put_command(c
, height_tb
.signal_change
)
83 height_tb
.put_size(40, 16)
84 add_widget(height_tb
, 70, 50)
90 !COMMAND_CUSTOM_CHANGE
!c
.make(Current)
91 wrap_cb
.put_command(c
, wrap_cb
.signal_change
)
92 wrap_cb
.put_size(12, 12)
93 add_widget(wrap_cb
, 75, 75)
99 preset_lb
.put_string("Custom")
106 --TODO: see if list_i = list.upper
107 if preset_lb
.string.is_equal("Custom") then
108 put_info(Void
, custom
)
110 p
:= get_preset(preset_lb
.string)
111 put_info(p
, p
.setting
)
115 --TODO: repeated code; make new PRESET_TABLE class
116 get_preset(s
: STRING) : PRESET
is
118 it
: ITERATOR
[PRESET
]
120 it
:= preset_list
.get_new_iterator
124 if it
.item
.name
.is_equal(s
) then
131 put_info(p
: PRESET
; s
: SETTING
) is
135 preset_lb
.put_string("Custom")
137 preset_lb
.put_string(p
.name
)
139 wrap_cb
.put_value(s
.wrap
)
140 width_tb
.put_string(s
.width
.to_string
)
141 height_tb
.put_string(s
.height
.to_string
)
149 if preset
= Void
then
151 setting
.put_wrap(wrap_cb
.value
)
155 i
:= setting
.clip_width(s
.to_integer
)
159 s
:= height_tb
.string
161 i
:= setting
.clip_height(s
.to_integer
)
162 setting
.put_height(i
)
165 setting
:= preset
.setting