jes notes Index Gallery . Shaft passers Snap issues

2024-01-25

Last modified: 2024-01-25 20:53:04

< 2024-01-23 2024-01-29 >

G-code sender

I've got about an hour to work on this. I want to do:

Mostly straightforward. I don't know if I should be using some config file library, but I just wrote my own for now.

Opening a system file browser is easy with https://pkg.go.dev/gioui.org/x/explorer but not obvious how to make it a modal, and long-term I want my own file selector that is more keyboard-friendly.

OK, I've got another hour this evening. The main things before I can actually use it are:

Fixing keyboard jogging is going to take some though.

The other 2 need me to work out how I'm going to lay out the UI. I definitely want to be able to see & set the overrides while a job is running. But while a job is running I'm going to want to see the G-code view, and definitely the toolpath view.

It kind of feels like instead of making the UI totally modal like vim, I should just have everything visible at once, but let the keyboard shortcuts decide which panel is active?

So the overrides panel can go just underneath the DRO one.

The g-code view can probably go in the middle, because I don't think I need the toolpath view to be this wide. The middle panel can be used for g-code view or serial console depending on the mode.

Where is MDI history going to be drawn?

Let's make the MDI only be at the bottom of the middle panel, instead of spanning the full width, and then when we're in MDI mode we can split the middle panel in half and draw the MDI history in the bottom half?

So the plan for now is:

I'm trying to put an "MDI>" label next to the MDI, but...

The input box has a padding around it, which sets the size of the horizontal layout that the label and the input box are in, but the label ties itself to the top of that area instead of the middle. Maybe I put a panel around the label as well, but with an invisible border? That does work, but then the padding all adds up to too much. I really need to stop using UniformInset and allow different amounts of spacing in different directions.

OK, UniformInset() just returns an Inset struct, which does allow setting the values individually. So I'll change my Panel to take an Inset instead of a single number.

Well I got as far as scrolling the history with the arrow keys, except some of the events go missing, seems to depend on the caret position, so I think the material editor may be stealing them, not sure.

< 2024-01-23 2024-01-29 >