Skip to content

V UI Examples & Sokol Problems On Linux #26831

@Wajinn

Description

@Wajinn

Attempted to run V UI examples on a Linux box and the list of notices and errors were staggering.

Among examples tried:

  1. users_box_layout.v
  2. demo_files_droped_listbox.v

V 0.5.1 fa62773
Ubuntu 22.04.5 LTS
8 cpus, 64bit, little endian, 12th Gen Intel(R) Core(TM) i5-12450HX

test/v/vlib/sokol/sapp/sapp_x11_linux.v:522:22: notice: unused parameter: display
520 | }
521 |
522 | fn x11_error_handler(display &C.Display, event voidptr) int {
| ~~~~~~~
523 | // XErrorEvent.error_code is at a known offset
524 | // For simplicity, just set a non-zero error code
test/v/vlib/sokol/sapp/sapp_x11_linux.v:522:42: notice: unused parameter: event
520 | }
521 |
522 | fn x11_error_handler(display &C.Display, event voidptr) int {
| ~~~~~
523 | // XErrorEvent.error_code is at a known offset
524 | // For simplicity, just set a non-zero error code
test/v/vlib/sokol/sapp/sapp_x11_linux.v:1288:29: notice: unused parameter: str
1286 | // === Clipboard ===
1287 |
1288 | fn x11_set_clipboard_string(str &char) {
| ~~~
1289 | if !g_sapp_state.clipboard.enabled || g_sapp_state.clipboard.buffer == unsafe { nil } {
1290 | return
test/.vmodules/ui/src/button.v:229:44: notice: unused parameter: window
227 | }
228 |
229 | fn btn_key_down(mut b Button, e &KeyEvent, window &Window) {
| ~~~~~~
230 | // println('key down $e <$e.key> <$e.codepoint> <$e.mods>')
231 | // println('key down key=<$e.key> code=<$e.codepoint> mods=<$e.mods>')
test/.vmodules/ui/src/button.v:254:43: notice: unused parameter: window
252 | }
253 |
254 | fn btn_click(mut b Button, e &MouseEvent, window &Window) {
| ~~~~~~
255 | $if btn_click ? {
256 | println('btn_click ${b.id} movable ${b.movable} focused ${b.is_focused} top_widget ${b.ui.window.is_top_widget(b,
test/.vmodules/ui/src/button.v:291:48: notice: unused parameter: window
289 | }
290 |
291 | fn btn_mouse_down(mut b Button, e &MouseEvent, window &Window) {
| ~~~~~~
292 | $if btn_md ? {
293 | println('btn_mouse_down ${b.id} movable ${b.movable} top_widget ${b.ui.window.is_top_widget(b,
test/.vmodules/ui/src/button.v:316:46: notice: unused parameter: window
314 | }
315 |
316 | fn btn_mouse_up(mut b Button, e &MouseEvent, window &Window) {
| ~~~~~~
317 | $if btn_mu ? {
318 | println('btn_mu ${b.id}')
test/.vmodules/ui/src/button.v:329:52: notice: unused parameter: window
327 | }
328 |
329 | fn btn_mouse_move(mut b Button, e &MouseMoveEvent, window &Window) {
| ~~~~~~
330 | // println('btn_click for window=$window.title')
331 | if b.hidden {
test/.vmodules/ui/src/chunkview.v:117:28: notice: unused parameter: cv
115 | }
116 |
117 | fn (mut c ImageChunk) init(cv &ChunkView) {}
| ~~
118 |
119 | fn (mut c ImageChunk) draw_device(mut d DrawDevice, cv &ChunkView, offset Offset) {
test/.vmodules/ui/src/chunkview.v:119:39: notice: unused parameter: d
117 | fn (mut c ImageChunk) init(cv &ChunkView) {}
118 |
119 | fn (mut c ImageChunk) draw_device(mut d DrawDevice, cv &ChunkView, offset Offset) {
| ^
120 | }
121 |
test/.vmodules/ui/src/chunkview.v:119:53: notice: unused parameter: cv
117 | fn (mut c ImageChunk) init(cv &ChunkView) {}
118 |
119 | fn (mut c ImageChunk) draw_device(mut d DrawDevice, cv &ChunkView, offset Offset) {
| ~~
120 | }
121 |
test/.vmodules/ui/src/chunkview.v:119:68: notice: unused parameter: offset
117 | fn (mut c ImageChunk) init(cv &ChunkView) {}
118 |
119 | fn (mut c ImageChunk) draw_device(mut d DrawDevice, cv &ChunkView, offset Offset) {
| ~~~~~~
120 | }
121 |
test/.vmodules/ui/src/chunkview.v:122:43: notice: unused parameter: cv
120 | }
121 |
122 | fn (mut c ImageChunk) update_bounding_box(cv &ChunkView, offset Offset) {
| ~~
123 | }
124 |
test/.vmodules/ui/src/chunkview.v:122:58: notice: unused parameter: offset
120 | }
121 |
122 | fn (mut c ImageChunk) update_bounding_box(cv &ChunkView, offset Offset) {
| ~~~~~~
123 | }
124 |
test/.vmodules/ui/src/chunkview.v:141:27: notice: unused parameter: cv
139 | }
140 |
141 | fn (mut c DrawChunk) init(cv &ChunkView) {}
| ~~
142 |
143 | fn (mut c DrawChunk) draw_device(mut d DrawDevice, cv &ChunkView, offset Offset) {
test/.vmodules/ui/src/chunkview.v:143:38: notice: unused parameter: d
141 | fn (mut c DrawChunk) init(cv &ChunkView) {}
142 |
143 | fn (mut c DrawChunk) draw_device(mut d DrawDevice, cv &ChunkView, offset Offset) {
| ^
144 | }
145 |
test/.vmodules/ui/src/chunkview.v:143:52: notice: unused parameter: cv
141 | fn (mut c DrawChunk) init(cv &ChunkView) {}
142 |
143 | fn (mut c DrawChunk) draw_device(mut d DrawDevice, cv &ChunkView, offset Offset) {
| ~~
144 | }
145 |
test/.vmodules/ui/src/chunkview.v:143:67: notice: unused parameter: offset
141 | fn (mut c DrawChunk) init(cv &ChunkView) {}
142 |
143 | fn (mut c DrawChunk) draw_device(mut d DrawDevice, cv &ChunkView, offset Offset) {
| ~~~~~~
144 | }
145 |
test/.vmodules/ui/src/chunkview.v:146:42: notice: unused parameter: cv
144 | }
145 |
146 | fn (mut c DrawChunk) update_bounding_box(cv &ChunkView, offset Offset) {
| ~~
147 | }
148 |
test/.vmodules/ui/src/chunkview.v:146:57: notice: unused parameter: offset
144 | }
145 |
146 | fn (mut c DrawChunk) update_bounding_box(cv &ChunkView, offset Offset) {
| ~~~~~~
147 | }
148 |
test/.vmodules/ui/src/chunkview.v:576:45: notice: unused parameter: cv
574 | }
575 |
576 | fn (mut c VerticalAlignChunk) update_chunks(cv &ChunkView) {
| ~~
577 | c.update_clipping()
578 | max_line_width := c.width - 10 // c.container?.inner_size()
test/.vmodules/ui/src/dropdown.v:243:46: notice: unused parameter: zzz
241 | }
242 |
243 | fn dd_key_down(mut dd Dropdown, e &KeyEvent, zzz voidptr) {
| ~~~
244 | if dd.hidden || !dd.is_focused {
245 | return
test/.vmodules/ui/src/dropdown.v:280:45: notice: unused parameter: zzz
278 | }
279 |
280 | fn dd_click(mut dd Dropdown, e &MouseEvent, zzz voidptr) {
| ~~~
281 | $if dd_click ? {
282 | println('${dd.id} click ${dd.hidden} ${dd.is_focused} ${dd.z_index}')
test/.vmodules/ui/src/dropdown.v:307:50: notice: unused parameter: zzz
305 | }
306 |
307 | fn dd_mouse_down(mut dd Dropdown, e &MouseEvent, zzz voidptr) {
| ~~~
308 | if dd.hidden {
309 | return
test/.vmodules/ui/src/dropdown.v:319:54: notice: unused parameter: zzz
317 | }
318 |
319 | fn dd_mouse_move(mut dd Dropdown, e &MouseMoveEvent, zzz voidptr) {
| ~~~
320 | if dd.hidden {
321 | return
test/.vmodules/ui/src/interface_scrollable.v:802:43: notice: unused parameter: e
800 | }
801 |
802 | fn scrollview_mouse_up(mut sv ScrollView, e &MouseEvent, _ voidptr) {
| ^
803 | if !sv.is_active() {
804 | return
test/.vmodules/ui/src/layout_box.v:458:55: notice: unused parameter: start
456 | }
457 |
458 | fn (b BoxLayout) ids_repl(re regex.RE, in_txt string, start int, end int) string {
| ~~~~~
459 | id := re.get_group_by_id(in_txt, 0)
460 | field := re.get_group_by_id(in_txt, 1)
test/.vmodules/ui/src/layout_box.v:458:66: notice: unused parameter: end
456 | }
457 |
458 | fn (b BoxLayout) ids_repl(re regex.RE, in_txt string, start int, end int) string {
| ~~~
459 | id := re.get_group_by_id(in_txt, 0)
460 | field := re.get_group_by_id(in_txt, 1)
test/.vmodules/ui/src/layout_box.v:484:54: notice: unused parameter: i
482 | }
483 |
484 | fn (mut b BoxLayout) preprocess_child_box_expression(i int, id string) {
| ^
485 | // TODO: extract first the @id, replace by unsafe value in the expression
486 | // the new bounding string is then evaluated to generate b.child_box[i]
test/.vmodules/ui/src/layout_canvas.v:317:60: notice: unused parameter: window
315 | }
316 |
317 | fn canvas_layout_delegate(mut c CanvasLayout, e &gg.Event, window &Window) {
| ~~~~~~
318 | if !c.point_inside(e.mouse_x / c.ui.window.dpi_scale, e.mouse_y / c.ui.window.dpi_scale) {
319 | return
test/.vmodules/ui/src/layout_canvas.v:326:59: notice: unused parameter: window
324 | }
325 |
326 | fn canvas_layout_click(mut c CanvasLayout, e &MouseEvent, window &Window) {
| ~~~~~~
327 | $if cl_click ? {
328 | if c.point_inside(e.x, e.y) {
test/.vmodules/ui/src/layout_canvas.v:355:64: notice: unused parameter: window
353 | }
354 |
355 | fn canvas_layout_mouse_down(mut c CanvasLayout, e &MouseEvent, window &Window) {
| ~~~~~~
356 | if c.hidden {
357 | return
test/.vmodules/ui/src/layout_canvas.v:374:62: notice: unused parameter: window
372 | }
373 |
374 | fn canvas_layout_mouse_up(mut c CanvasLayout, e &MouseEvent, window &Window) {
| ~~~~~~
375 | if c.hidden {
376 | return
test/.vmodules/ui/src/layout_canvas.v:390:68: notice: unused parameter: window
388 | }
389 |
390 | fn canvas_layout_mouse_move(mut c CanvasLayout, e &MouseMoveEvent, window &Window) {
| ~~~~~~
391 | if c.hidden {
392 | return
test/.vmodules/ui/src/layout_canvas.v:430:61: notice: unused parameter: window
428 | }
429 |
430 | fn canvas_layout_scroll(mut c CanvasLayout, e &ScrollEvent, window &Window) {
| ~~~~~~
431 | if c.scroll_fn != unsafe { CanvasLayoutScrollFn(0) } {
432 | e2 := ScrollEvent{
test/.vmodules/ui/src/layout_canvas.v:442:60: notice: unused parameter: window
440 | }
441 |
442 | fn canvas_layout_key_down(mut c CanvasLayout, e &KeyEvent, window &Window) {
| ~~~~~~
443 | // println('key down $c.id $c.hidden $e')
444 | if c.hidden {
test/.vmodules/ui/src/layout_canvas.v:455:56: notice: unused parameter: window
453 | }
454 |
455 | fn canvas_layout_char(mut c CanvasLayout, e &KeyEvent, window &Window) {
| ~~~~~~
456 | // println('key down $e')
457 | if c.hidden {
test/.vmodules/ui/src/layout_group.v:201:22: notice: unused parameter: width
199 | }
200 |
201 | fn (g &Group) resize(width int, height int) {
| ~~~~~
202 | }
203 |
test/.vmodules/ui/src/layout_group.v:201:33: notice: unused parameter: height
199 | }
200 |
201 | fn (g &Group) resize(width int, height int) {
| ~~~~~~
202 | }
203 |
test/.vmodules/ui/src/layout_group.v:209:43: notice: unused parameter: u
207 | }
208 |
209 | fn (mut g Group) set_adjusted_size(i int, u &UI) {
| ^
210 | mut h, mut w := 0, 0
211 | for mut child in g.children {
test/.vmodules/ui/src/listbox.v:608:45: notice: unused parameter: window
606 | }
607 |
608 | fn on_change(mut lb ListBox, e &MouseEvent, window &Window) {
| ~~~~~~
609 | // println("onclick $e.action ${int(e.action)}")
610 | if lb.hidden {
test/.vmodules/ui/src/listbox.v:656:49: notice: unused parameter: window
654 | }
655 |
656 | fn lb_mouse_down(mut lb ListBox, e &MouseEvent, window &Window) {
| ~~~~~~
657 | $if lb_md ? {
658 | println('lb_mouse_down ${lb.id} top_widget ${lb.ui.window.is_top_widget(lb, events.on_mouse_down)}')
test/.vmodules/ui/src/listbox.v:682:32: notice: unused parameter: e
680 | }
681 |
682 | fn lb_mouse_up(mut lb ListBox, e &MouseEvent, window &Window) {
| ^
683 | // println('lb_mu')
684 | if lb.hidden {
test/.vmodules/ui/src/listbox.v:682:47: notice: unused parameter: window
680 | }
681 |
682 | fn lb_mouse_up(mut lb ListBox, e &MouseEvent, window &Window) {
| ~~~~~~
683 | // println('lb_mu')
684 | if lb.hidden {
test/.vmodules/ui/src/listbox.v:699:53: notice: unused parameter: window
697 | }
698 |
699 | fn lb_mouse_move(mut lb ListBox, e &MouseMoveEvent, window &Window) {
| ~~~~~~
700 | // println('lb move $lb.id')
701 | if lb.hidden {
test/.vmodules/ui/src/listbox.v:744:52: notice: unused parameter: window
742 | }
743 |
744 | fn on_files_dropped(mut lb ListBox, e &MouseEvent, window &Window) {
| ~~~~~~
745 | // println("on_files_dropped")
746 | if lb.hidden {
test/.vmodules/ui/src/listbox.v:766:43: notice: unused parameter: window
764 |
765 | // Up and Down keys work on the list when it's is_focused
766 | fn lb_key_up(mut lb ListBox, e &KeyEvent, window &Window) {
| ~~~~~~
767 | if lb.hidden {
768 | return
test/.vmodules/ui/src/menu.v:193:42: notice: unused parameter: window
191 | }
192 |
193 | fn menu_click(mut m Menu, e &MouseEvent, window &Window) {
| ~~~~~~
194 | if m.hidden {
195 | return
test/.vmodules/ui/src/menu.v:230:51: notice: unused parameter: window
228 | }
229 |
230 | fn menu_mouse_move(mut m Menu, e &MouseMoveEvent, window &Window) {
| ~~~~~~
231 | if m.hidden {
232 | return
test/.vmodules/ui/src/picture.v:153:46: notice: unused parameter: window
151 | }
152 |
153 | fn pic_click(mut pic Picture, e &MouseEvent, window &Window) {
| ~~~~~~
154 | if pic.hidden {
155 | return
test/.vmodules/ui/src/picture.v:166:51: notice: unused parameter: window
164 | }
165 |
166 | fn pic_mouse_down(mut pic Picture, e &MouseEvent, window &Window) {
| ~~~~~~
167 | if pic.hidden {
168 | return
test/.vmodules/ui/src/radio.v:159:45: notice: unused parameter: window
157 | // }
158 |
159 | fn radio_key_down(mut r Radio, e &KeyEvent, window &Window) {
| ~~~~~~
160 | // println('key down $e <$e.key> <$e.codepoint> <$e.mods>')
161 | // println('key down key=<$e.key> code=<$e.codepoint> mods=<$e.mods>')
test/.vmodules/ui/src/radio.v:183:44: notice: unused parameter: window
181 | }
182 |
183 | fn radio_click(mut r Radio, e &MouseEvent, window &Window) {
| ~~~~~~
184 | if r.hidden {
185 | return
test/.vmodules/ui/src/slider.v:279:47: notice: unused parameter: zzz
277 | }
278 |
279 | fn slider_key_down(mut s Slider, e &KeyEvent, zzz voidptr) {
| ~~~
280 | if s.hidden {
281 | return
test/.vmodules/ui/src/slider.v:370:46: notice: unused parameter: zzz
368 | }
369 |
370 | fn slider_click(mut s Slider, e &MouseEvent, zzz voidptr) {
| ~~~
371 | if s.hidden {
372 | return
test/.vmodules/ui/src/slider.v:384:51: notice: unused parameter: zzz
382 | }
383 |
384 | fn slider_mouse_down(mut s Slider, e &MouseEvent, zzz voidptr) {
| ~~~
385 | if s.hidden {
386 | return
test/.vmodules/ui/src/slider.v:395:34: notice: unused parameter: e
393 | }
394 |
395 | fn slider_mouse_up(mut s Slider, e &MouseEvent, zzz voidptr) {
| ^
396 | // println('slider touchup NO MORE DRAGGING')
397 | s.dragging = false
test/.vmodules/ui/src/slider.v:395:49: notice: unused parameter: zzz
393 | }
394 |
395 | fn slider_mouse_up(mut s Slider, e &MouseEvent, zzz voidptr) {
| ~~~
396 | // println('slider touchup NO MORE DRAGGING')
397 | s.dragging = false
test/.vmodules/ui/src/slider.v:400:55: notice: unused parameter: zzz
398 | }
399 |
400 | fn slider_mouse_move(mut s Slider, e &MouseMoveEvent, zzz voidptr) {
| ~~~
401 | // println("slider: $s.dragging ${e.mouse_button} ${int(e.mouse_button)}")
402 | if s.ui.btn_down[0] { // int(e.mouse_button) == 0 {
test/.vmodules/ui/src/slider.v:416:55: notice: unused parameter: zzz
414 | }
415 |
416 | fn slider_touch_move(mut s Slider, e &MouseMoveEvent, zzz voidptr) {
| ~~~
417 | if s.hidden {
418 | return
test/.vmodules/ui/src/stack.v:1306:25: notice: unused parameter: width
1304 | }
1305 |
1306 | fn (mut s Stack) resize(width int, height int) {
| ~~~~~
1307 | s.init_size()
1308 | s.update_pos()
test/.vmodules/ui/src/stack.v:1306:36: notice: unused parameter: height
1304 | }
1305 |
1306 | fn (mut s Stack) resize(width int, height int) {
| ~~~~~~
1307 | s.init_size()
1308 | s.update_pos()
test/.vmodules/ui/src/subwindow.v:141:50: notice: unused parameter: window
139 | }
140 |
141 | fn sw_mouse_down(mut s SubWindow, e &MouseEvent, window &Window) {
| ~~~~~~
142 | // println("sw_md: $s.id -&gt; ${window.point_inside_receivers(events.on_mouse_down)}")
143 | if s.hidden {
test/.vmodules/ui/src/subwindow.v:163:33: notice: unused parameter: e
161 | }
162 |
163 | fn sw_mouse_up(mut s SubWindow, e &MouseEvent, window &Window) {
| ^
164 | if s.hidden {
165 | return
test/.vmodules/ui/src/subwindow.v:163:48: notice: unused parameter: window
161 | }
162 |
163 | fn sw_mouse_up(mut s SubWindow, e &MouseEvent, window &Window) {
| ~~~~~~
164 | if s.hidden {
165 | return
test/.vmodules/ui/src/subwindow.v:172:54: notice: unused parameter: window
170 | }
171 |
172 | fn sw_mouse_move(mut s SubWindow, e &MouseMoveEvent, window &Window) {
| ~~~~~~
173 | // println('btn_click for window=$window.title')
174 | if s.hidden {
test/.vmodules/ui/src/subwindow.v:249:40: notice: unused parameter: u
247 | }
248 |
249 | fn (mut s SubWindow) set_adjusted_size(u &UI) {
| ^
250 | }
251 |
test/.vmodules/ui/src/switch.v:157:43: notice: unused parameter: window
155 | }
156 |
157 | fn sw_key_down(mut s Switch, e &KeyEvent, window &Window) {
| ~~~~~~
158 | // println('key down $e <$e.key> <$e.codepoint> <$e.mods>')
159 | // println('key down key=<$e.key> code=<$e.codepoint> mods=<$e.mods>')
test/.vmodules/ui/src/switch.v:183:42: notice: unused parameter: w
181 | }
182 |
183 | fn sw_click(mut s Switch, e &MouseEvent, w &Window) {
| ^
184 | if s.hidden {
185 | return
test/.vmodules/ui/src/textbox.v:554:45: notice: unused parameter: window
552 | }
553 |
554 | fn tb_key_down(mut tb TextBox, e &KeyEvent, window &Window) {
| ~~~~~~
555 | $if tb_keydown ? {
556 | println('tb_keydown id:${tb.id} -> hidden:${tb.hidden} focused:${tb.is_focused}')
test/.vmodules/ui/src/textbox.v:731:41: notice: unused parameter: window
729 | }
730 |
731 | fn tb_char(mut tb TextBox, e &KeyEvent, window &Window) {
| ~~~~~~
732 | // println('key down $e <$e.key> <$e.codepoint> <$e.mods>')
733 | // println('key down key=<$e.key> code=<$e.codepoint> mods=<$e.mods>')
test/.vmodules/ui/src/textbox.v:876:61: notice: unused parameter: key
874 | }
875 |
876 | fn (mut tb TextBox) set_sel(sel_start_i int, sel_end_i int, key Key) {
| ~~~
877 | if tb.sel_direction == .right_to_left {
878 | tb.sel_start = sel_start_i
test/.vmodules/ui/src/textbox.v:954:49: notice: unused parameter: zzz
952 | }
953 |
954 | fn tb_mouse_down(mut tb TextBox, e &MouseEvent, zzz voidptr) {
| ~~~
955 | // println("mouse first $tb.id")
956 | if tb.hidden {
test/.vmodules/ui/src/textbox.v:1021:53: notice: unused parameter: zzz
1019 | }
1020 |
1021 | fn tb_mouse_move(mut tb TextBox, e &MouseMoveEvent, zzz voidptr) {
| ~~~
1022 | if tb.hidden {
1023 | return
test/.vmodules/ui/src/textbox.v:1054:47: notice: unused parameter: zzz
1052 | }
1053 |
1054 | fn tb_mouse_up(mut tb TextBox, e &MouseEvent, zzz voidptr) {
| ~~~
1055 | if tb.hidden {
1056 | return
test/.vmodules/ui/src/tool_calculate.v:28:45: notice: unused parameter: start
26 | }
27 |
28 | fn compute_repl(re regex.RE, in_txt string, start int, end int) string {
| ~~~~~
29 | left := re.get_group_by_id(in_txt, 0)
30 | op := re.get_group_by_id(in_txt, 1)
test/.vmodules/ui/src/tool_calculate.v:28:56: notice: unused parameter: end
26 | }
27 |
28 | fn compute_repl(re regex.RE, in_txt string, start int, end int) string {
| ~~~
29 | left := re.get_group_by_id(in_txt, 0)
30 | op := re.get_group_by_id(in_txt, 1)
test/.vmodules/ui/src/transition.v:89:28: notice: unused parameter: x
87 | }
88 |
89 | fn (t &Transition) set_pos(x int, y int) {
| ^
90 | }
91 |
test/.vmodules/ui/src/transition.v:89:35: notice: unused parameter: y
87 | }
88 |
89 | fn (t &Transition) set_pos(x int, y int) {
| ^
90 | }
91 |
test/.vmodules/ui/src/transition.v:92:33: notice: unused parameter: w
90 | }
91 |
92 | fn (t &Transition) propose_size(w int, h int) (int, int) {
| ^
93 | return 0, 0
94 | }
test/.vmodules/ui/src/transition.v:92:40: notice: unused parameter: h
90 | }
91 |
92 | fn (t &Transition) propose_size(w int, h int) (int, int) {
| ^
93 | return 0, 0
94 | }
test/.vmodules/ui/src/transition.v:104:39: notice: unused parameter: d
102 | }
103 |
104 | fn (mut t Transition) draw_device(mut d DrawDevice) {
| ^
105 | if t.animated_value == 0 {
106 | return
test/.vmodules/ui/src/transition.v:143:32: notice: unused parameter: state
141 | }
142 |
143 | fn (t &Transition) set_visible(state bool) {
| ~~~~~
144 | }
145 |
test/.vmodules/ui/src/transition.v:146:33: notice: unused parameter: x
144 | }
145 |
146 | fn (t &Transition) point_inside(x f64, y f64) bool {
| ^
147 | return false
148 | }
test/.vmodules/ui/src/transition.v:146:40: notice: unused parameter: y
144 | }
145 |
146 | fn (t &Transition) point_inside(x f64, y f64) bool {
| ^
147 | return false
148 | }
test/.vmodules/ui/src/widget_checkbox.v:134:46: notice: unused parameter: window
132 | // }
133 |
134 | fn cb_key_down(mut cb CheckBox, e &KeyEvent, window &Window) {
| ~~~~~~
135 | // println('key down $e <$e.key> <$e.codepoint> <$e.mods>')
136 | // println('key down key=<$e.key> code=<$e.codepoint> mods=<$e.mods>')
test/.vmodules/ui/src/widget_checkbox.v:159:45: notice: unused parameter: window
157 | }
158 |
159 | fn cb_click(mut cb CheckBox, e &MouseEvent, window &Window) {
| ~~~~~~
160 | if cb.hidden {
161 | return
test/.vmodules/ui/src/widget_checkbox.v:262:33: notice: unused parameter: e
260 | }
261 |
262 | fn (mut cb CheckBox) mouse_move(e MouseEvent) {
| ^
263 | }
264 |
test/.vmodules/ui/src/window.v:757:18: notice: unused parameter: event
755 | }
756 |
757 | fn window_resize(event gg.Event, u &UI) {
| ~~~~~
758 | mut window := u.window
759 | if !window.resizable {
test/.vmodules/ui/src/window.v:1008:22: notice: unused parameter: event
1006 | }
1007 |
1008 | fn window_touch_down(event gg.Event, u &UI) {
| ~~~~~
1009 | mut window := u.window
1010 | e := MouseEvent{
test/.vmodules/ui/src/window.v:1022:22: notice: unused parameter: event
1020 | }
1021 |
1022 | fn window_touch_move(event gg.Event, u &UI) {
| ~~~~~
1023 | window := u.window
1024 | e := MouseMoveEvent{
test/.vmodules/ui/src/window.v:1035:20: notice: unused parameter: event
1033 | }
1034 |
1035 | fn window_touch_up(event gg.Event, u &UI) {
| ~~~~~
1036 | window := u.window
1037 | e := MouseEvent{
test/.vmodules/ui/src/window.v:1074:24: notice: unused parameter: event
1072 | }
1073 |
1074 | fn window_touch_scroll(event gg.Event, u &UI) {
| ~~~~~
1075 | mut window := u.window
1076 | // println('title =$window.title')
GUI_VUI_users_box_layout.v:215:34: notice: unused parameter: b
213 | }
214 | */
215 | fn (mut app State) btn_add_click(b &ui.Button) {
| ^
216 | // println('nr users=$app.users.len')
217 | // ui.notify('user', 'done')
test/.vmodules/ui/src/chunkview.v:83:28: error: cv is immutable, declare it with mut to make it mutable
81 |
82 | fn (mut c TextChunk) draw_device(mut d DrawDevice, cv &ChunkView, offset Offset) {
83 | mut dtw := DrawTextWidget(cv)
| ~~
84 | dtw.draw_device_styled_text(d, cv.x + offset.x + c.x, cv.y + offset.y + c.y, c.text, id: c.style)
85 | }
test/.vmodules/ui/src/chunkview.v:88:28: error: cv is immutable, declare it with mut to make it mutable
86 |
87 | fn (mut c TextChunk) update_bounding_box(cv &ChunkView, offset Offset) {
88 | mut dtw := DrawTextWidget(cv)
| ~~
89 | cv.load_style(c.style)
90 | // c.bb.w, c.bb.h = dtw.text_size(c.text)
test/.vmodules/ui/src/chunkview.v:213:28: error: cv is immutable, declare it with mut to make it mutable
211 |
212 | fn (mut c ParaChunk) update_line_height(cv &ChunkView) {
213 | mut dtw := DrawTextWidget(cv)
| ~~
214 | mut lh := 0
215 | mut style, mut left := '', ''
test/.vmodules/ui/src/chunkview.v:237:28: error: cv is immutable, declare it with mut to make it mutable
235 | // max_line_width, _ := c.container?.inner_size()
236 | // println("max_line_width=${max_line_width}")
237 | mut dtw := DrawTextWidget(cv)
| ~~
238 | // convert content to chunks
239 | mut chunks := []ChunkContent{}
test/.vmodules/ui/src/chunkview.v:493:28: error: cv is immutable, declare it with mut to make it mutable
491 |
492 | fn (mut c VerticalAlignChunk) update_line_height(cv &ChunkView) {
493 | mut dtw := DrawTextWidget(cv)
| ~~
494 | mut lh := 0
495 | mut style, mut left := '', ''
test/.vmodules/ui/src/chunkview.v:514:28: error: cv is immutable, declare it with mut to make it mutable
512 | // only once in init
513 | fn (mut c VerticalAlignChunk) init_line_chunks(cv &ChunkView) {
514 | mut dtw := DrawTextWidget(cv)
| ~~
515 | // split c.content into the lines 'br' being the separator
516 | mut contents := [][]string{}
test/.vmodules/ui/src/chunkview.v:801:22: error: cannot use &ui.ChunkView as &&ui.ChunkView in argument 1 to scrollview_add
799 | }
800 | if p.scrollview {
801 | scrollview_add(mut cv)
| ~~
802 | }
803 | return cv
test/.vmodules/ui/src/chunkview.v:821:28: error: cv is immutable, declare it with mut to make it mutable
819 |
820 | fn (cv &ChunkView) load_style(style string) {
821 | mut dtw := DrawTextWidget(cv)
| ~~
822 | dtw.set_current_style(id: style) // to update style for text_width_additive
823 | dtw.load_style()
test/.vmodules/ui/src/chunkview.v:894:28: error: cannot use &ui.ChunkView as &&ui.ChunkView in argument 1 to scrollview_draw_begin
892 | offset_end(mut cv)
893 | }
894 | scrollview_draw_begin(mut cv, d)
| ~~
895 | defer {
896 | scrollview_draw_end(cv, d)
test/.vmodules/ui/src/draw_device_print.v:24:23: error: d is immutable, declare it with mut to make it mutable
22 | fn draw_device_draw_print(filename string, mut w Window) {
23 | d := draw_device_print(id: 'test', filename: filename)
24 | mut dd := DrawDevice(d)
| ^
25 | dd.draw_window(mut w)
26 | }
test/.vmodules/ui/src/interface_drag_drop.v:24:9: error: infix expr: cannot use &ui.Draggable (right expression) as ui.Draggable
22 | pub fn (w Draggable) active() bool {
23 | d := w.get_window().dragger
24 | return w == d.widget
| ~~~~~~~~~~~~~
25 | }
26 |
test/.vmodules/ui/src/layout_box.v:130:22: error: cannot use &ui.BoxLayout as &&ui.BoxLayout in argument 1 to scrollview_add
128 | }
129 | if c.scrollview {
130 | scrollview_add(mut b)
| ^
131 | }
132 | return b
test/.vmodules/ui/src/layout_box.v:585:28: error: cannot use &ui.BoxLayout as &&ui.BoxLayout in argument 1 to scrollview_draw_begin
583 | clipping_end(b, mut d, cstate)
584 | }
585 | scrollview_draw_begin(mut b, d)
| ^
586 | defer {
587 | scrollview_draw_end(b, d)
test/.vmodules/ui/src/layout_canvas.v:178:22: error: cannot use &ui.CanvasLayout as &&ui.CanvasLayout in argument 1 to scrollview_add
176 | canvas.style_params.style = c.theme
177 | if c.scrollview {
178 | scrollview_add(mut canvas)
| ~~~~~~
179 | }
180 | return canvas
test/.vmodules/ui/src/layout_canvas.v:703:28: error: cannot use &ui.CanvasLayout as &&ui.CanvasLayout in argument 1 to scrollview_draw_begin
701 | // c.scrollview.children_to_update = false
702 | // }
703 | scrollview_draw_begin(mut c, d)
| ^
704 | defer {
705 | scrollview_draw_end(c, d)
test/.vmodules/ui/src/layout_canvas.v:876:28: error: c is immutable, declare it with mut to make it mutable
874 | // TODO: documentation
875 | pub fn (c &CanvasLayout) draw_device_text(d DrawDevice, x int, y int, text string) {
876 | mut dtw := DrawTextWidget(c)
| ^
877 | // println("dt $x + $c.x + $c.offset_x, $y + $c.y + $c.offset_y, $text")
878 | dtw.draw_device_text(d, x + c.x + c.offset_x, y + c.y + c.offset_y, text)
test/.vmodules/ui/src/layout_canvas.v:883:28: error: c is immutable, declare it with mut to make it mutable
881 | // TODO: documentation
882 | pub fn (c &CanvasLayout) draw_styled_text(x int, y int, text string, ts TextStyleParams) {
883 | mut dtw := DrawTextWidget(c)
| ^
884 | dtw.draw_device_styled_text(c.ui.dd, x + c.x + c.offset_x, y + c.y + c.offset_y, text,
885 | ts)
test/.vmodules/ui/src/layout_canvas.v:890:28: error: c is immutable, declare it with mut to make it mutable
888 | // TODO: documentation
889 | pub fn (c &CanvasLayout) draw_device_styled_text(d DrawDevice, x int, y int, text string, ts TextStyleParams) {
890 | mut dtw := DrawTextWidget(c)
| ^
891 | dtw.draw_device_styled_text(d, x + c.x + c.offset_x, y + c.y + c.offset_y, text, ts)
892 | }
test/.vmodules/ui/src/listbox.v:131:22: error: cannot use &ui.ListBox as &&ui.ListBox in argument 1 to scrollview_add
129 | }
130 | if c.scrollview {
131 | scrollview_add(mut list)
| ~~~~
132 | }
133 | return list
test/.vmodules/ui/src/listbox.v:532:28: error: cannot use &ui.ListBox as &&ui.ListBox in argument 1 to scrollview_draw_begin
530 | }
531 | }
532 | scrollview_draw_begin(mut lb, d)
| ~~
533 | defer {
534 | scrollview_draw_end(lb, d)
test/.vmodules/ui/src/listbox.v:1063:28: error: lb is immutable, declare it with mut to make it mutable
1061 | lb.y + lb.text_offset_y, width - 2 * listbox_text_offset_x, lb.item_height, col)
1062 |
1063 | mut dtw := DrawTextWidget(lb)
| ~~
1064 | dtw.draw_device_styled_text(d, li.x + li.offset_x + lb.x + listbox_text_offset_x,
1065 | li.y + li.offset_y + lb.y + lb.text_offset_y, if lb.has_scrollview {
test/.vmodules/ui/src/stack.v:166:22: error: cannot use &ui.Stack as &&ui.Stack in argument 1 to scrollview_add
164 | }
165 | if c.scrollview {
166 | scrollview_add(mut s)
| ^
167 | // to restrict drawing to visible children
168 | }
test/.vmodules/ui/src/stack.v:1156:28: error: cannot use &ui.Stack as &&ui.Stack in argument 1 to scrollview_draw_begin
1154 | }
1155 | }
1156 | scrollview_draw_begin(mut s, d)
| ^
1157 | defer {
1158 | scrollview_draw_end(s, d)
test/.vmodules/ui/src/textbox.v:216:22: error: cannot use &ui.TextBox as &&ui.TextBox in argument 1 to scrollview_add
214 | }
215 | if c.scrollview && tb.is_multiline {
216 | scrollview_add(mut tb)
| ~~
217 | }
218 | return tb
test/.vmodules/ui/src/textbox.v:310:29: error: tb is immutable, declare it with mut to make it mutable
308 | return tb.tv.size()
309 | } else {
310 | mut dtw := DrawTextWidget(tb)
| ~~
311 | dtw.load_style()
312 | mut w, mut h := dtw.text_size(tb.text)
test/.vmodules/ui/src/textbox.v:372:28: error: cannot use &ui.TextBox as &&ui.TextBox in argument 1 to scrollview_draw_begin
370 | offset_end(mut tb)
371 | }
372 | scrollview_draw_begin(mut tb, d)
| ~~
373 | defer {
374 | scrollview_draw_end(tb, d)
test/.vmodules/ui/src/textbox.v:1100:25: error: cannot use &ui.TextBox as &&ui.TextBox in argument 1 to scrollview_reset
1098 | }
1099 | if (active_x && !tb.scrollview.active_x) || (active_y && !tb.scrollview.active_y) {
1100 | scrollview_reset(mut tb)
| ~~
1101 | }
1102 | } else {
test/.vmodules/ui/src/textbox.v:1137:28: error: tb is immutable, declare it with mut to make it mutable
1135 |
1136 | pub fn (tb &TextBox) text_xminmax_from_pos(text string, x1 int, x2 int) (int, int) {
1137 | mut dtw := DrawTextWidget(tb)
| ~~
1138 | dtw.load_style()
1139 | ustr := text.runes()
test/.vmodules/ui/src/textbox.v:1160:28: error: tb is immutable, declare it with mut to make it mutable
1158 | return 0
1159 | }
1160 | mut dtw := DrawTextWidget(tb)
| ~~
1161 | dtw.load_style()
1162 | mut prev_width := 0
test/.vmodules/ui/src/textbox_textview.v:421:23: error: cannot use &ui.TextBox as &&ui.TextBox in argument 1 to scrollview_reset
419 | mut tb := tv.tb
420 | // Only if scrollview become inactive, reset the scrollview
421 | scrollview_reset(mut tb)
| ~~
422 | tv.cancel_selection()
423 | }
test/.vmodules/ui/src/textbox_textview.v:1138:28: error: tv is immutable, declare it with mut to make it mutable
1136 |
1137 | fn (tv &TextView) draw_device_styled_text(d DrawDevice, x int, y int, text string, ts TextStyleParams) {
1138 | mut dtw := DrawTextWidget(tv.tb)
| ~~
1139 | dtw.draw_device_styled_text(d, x, y, tv.fix_tab_char(text), ts)
1140 | }
test/.vmodules/ui/src/textbox_textview.v:1166:28: error: tv is immutable, declare it with mut to make it mutable
1164 |
1165 | pub fn (tv &TextView) update_style(ts TextStyleParams) {
1166 | mut dtw := DrawTextWidget(tv.tb)
| ~~
1167 | dtw.update_style(ts)
1168 | }
test/.vmodules/ui/src/textbox_textview.v:1172:28: error: tv is immutable, declare it with mut to make it mutable
1170 | // Not called automatically as it is in gg
1171 | pub fn (tv &TextView) load_style() {
1172 | mut dtw := DrawTextWidget(tv.tb)
| ~~
1173 | dtw.load_style()
1174 | }

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions