October 18, 2021, 00:12:18

Author Topic: Good Job, Chris! Any chance of better Undo in FLTK?  (Read 610 times)

Offline lettersquash

  • Jr. Member
  • **
  • Posts: 96
    • Lettersquash Blog
Good Job, Chris! Any chance of better Undo in FLTK?
« on: February 08, 2021, 14:47:42 »
Hello again Chris and all at the SmallBASIC forum, I hope you're well.

I've not been around for a while - usually have long breaks from programming - and I see you've been busy. I've just started putting a little utility together (on Windows 7) which is a sort of activity tracker, mainly just using simple 2D graphics. It tracks activities I want to do enough of, or often enough, with a "re-schedule period" for each (like getting exercise, piano practice, car maintenance...), and the display will show me all those upcoming events to the right of the centre line and overdue ones to the left, with a triangle pointing left or right, its length proportional to how many days away it's due or late, so it's a good visual nag-screen to keep me organised.

I've installed the latest (12.20) and this time I've switched to using the FLTK version (sbasici.exe). I don't know if that's been much improved since I tried it (probably round 0.12.14), but I'm blown away by how good it is. It's possible I might have abandoned it in favour of sbasicg.exe last time because I was doing fast graphics stuff, rather than due to difficulties using it, so I haven't tried it much.

It took a while to figure out what the buttons bottom right did (I had it maximized and the hover text doesn't show up with it maximized, btw - the window caption flickers instead), and now I've also remembered how to make the output window a particular size (on directly launching the file from Windows or with 'W' option hiding the editor), my little program looks all set to work in SmallBASIC. That, in case anyone is searching for it, is:
Code: [Select]
option predef grmode 1366x768 (Or whatever x and y you want the window to be; note, it's NumberxNumber - a little ex, not star.)

I would love the Undo function better, if that's something you can fit comfortably into your todo list, Chris. It seems to just toggle the last change, where the sbasicg version reverts each key entered (and Redo, of course).

Thanks again for all your great work.
I'll have you know, I'm coding all the right commands, just not necessarily in the right order.

Offline chrisws

  • Full Member
  • ***
  • Posts: 117
    • SmallBASIC
Re: Good Job, Chris! Any chance of better Undo in FLTK?
« Reply #1 on: February 10, 2021, 03:19:14 »
Thanks for your kind words :)

I could embed the editor in sbasicg.exe into the FLTK version. Then it would have full undo etc, but have the benefit of the remaining FLTK version interface.

Offline lettersquash

  • Jr. Member
  • **
  • Posts: 96
    • Lettersquash Blog
Re: Good Job, Chris! Any chance of better Undo in FLTK?
« Reply #2 on: February 10, 2021, 16:30:41 »
Thanks for your reply, Chris. I've just switched back to the sbasicg.exe version, as it happens. Although speed doesn't matter in this program, there seem to be a few differences in the quality of the display on my system. If I pset a point, it actually sets a couple of pixels, I think, in a diagonal, and the font is different too. I wonder if that makes sense to you.

Embedding the sbasicg.exe editor into the FLTK version sounds like a good idea, but I don't know how it all works. I'm finding it very useful now to edit my program in sbasicg.exe, but I have the FLTK version open as well, mainly for referring to other files I might copy things from, check syntax, etc.

Cheers, John
I'll have you know, I'm coding all the right commands, just not necessarily in the right order.

Offline lettersquash

  • Jr. Member
  • **
  • Posts: 96
    • Lettersquash Blog
Re: Good Job, Chris! Any chance of better Undo in FLTK?
« Reply #3 on: February 11, 2021, 19:07:31 »
Unfortunately, there's a downside to the sbasicg.exe editor (SDK) is that you can't select text then drag it to move it, so everything has to be copied and pasted (but you can do this in FLTK). If it's possible to have the best of both worlds, that would be great.
I'll have you know, I'm coding all the right commands, just not necessarily in the right order.

Offline bplus

  • Full Member
  • ***
  • Posts: 224
Re: Good Job, Chris! Any chance of better Undo in FLTK?
« Reply #4 on: February 11, 2021, 21:53:41 »
Unfortunately, there's a downside to the sbasicg.exe editor (SDK) is that you can't select text then drag it to move it, so everything has to be copied and pasted (but you can do this in FLTK). If it's possible to have the best of both worlds, that would be great.

What? Cut | Copy then Paste does not work? It's right off the Right Click menu. Dragging is such a drag!

Offline lettersquash

  • Jr. Member
  • **
  • Posts: 96
    • Lettersquash Blog
Re: Good Job, Chris! Any chance of better Undo in FLTK?
« Reply #5 on: February 12, 2021, 01:08:28 »
Unfortunately, there's a downside to the sbasicg.exe editor (SDK) is that you can't select text then drag it to move it, so everything has to be copied and pasted (but you can do this in FLTK). If it's possible to have the best of both worlds, that would be great.

What? Cut | Copy then Paste does not work? It's right off the Right Click menu. Dragging is such a drag!
No, cut, copy and paste work. The - to me - more convenient way to move text around is in many cases dragging it. After selecting a section, the second held click on it starts a move, and releasing the mouse drops it. Don't you ever use that? As well as being much quicker, I have a rolling clipboard app collecting everything, which isn't great to fill up with every little bit of text I move around.
I'll have you know, I'm coding all the right commands, just not necessarily in the right order.

Offline bplus

  • Full Member
  • ***
  • Posts: 224
Re: Good Job, Chris! Any chance of better Undo in FLTK?
« Reply #6 on: February 12, 2021, 17:46:19 »
Quote
Don't you ever use that?

No never even imaged it ;)  I think it god sent to have C, C &P from a right mouse popup.

Offline lettersquash

  • Jr. Member
  • **
  • Posts: 96
    • Lettersquash Blog
Re: Good Job, Chris! Any chance of better Undo in FLTK?
« Reply #7 on: February 12, 2021, 18:47:27 »
Ah well, each to their own - I tend to use Ctrl-C, X and V rather than the context menu. But it's not a big deal, and I'd rather have the multiple undo/redo.
I'll have you know, I'm coding all the right commands, just not necessarily in the right order.

Offline chrisws

  • Full Member
  • ***
  • Posts: 117
    • SmallBASIC
Re: Good Job, Chris! Any chance of better Undo in FLTK?
« Reply #8 on: February 14, 2021, 11:23:34 »
Unfortunately, there's a downside to the sbasicg.exe editor (SDK) is that you can't select text then drag it to move it, so everything has to be copied and pasted (but you can do this in FLTK). If it's possible to have the best of both worlds, that would be great.

What? Cut | Copy then Paste does not work? It's right off the Right Click menu. Dragging is such a drag!

Ha! drag and drop is all internal to the FLTK editor widget so I wasn't even aware that was available.

I guess I could add this functionality to the sbasicg editor.




Offline lettersquash

  • Jr. Member
  • **
  • Posts: 96
    • Lettersquash Blog
Re: Good Job, Chris! Any chance of better Undo in FLTK?
« Reply #9 on: February 14, 2021, 12:55:33 »
Ha! drag and drop is all internal to the FLTK editor widget so I wasn't even aware that was available.

I guess I could add this functionality to the sbasicg editor.
Wow, well only if that's not - erm - too much of a drag (and if it is, drop it). :))  It really isn't a massive issue and I felt a bit greedy mentioning it. It always amazes me how differently people use their devices. Once I started using control keys, the context menu seemed awkward. But drag and drop often seems perfect where you just want to move bits a short distance.
I'll have you know, I'm coding all the right commands, just not necessarily in the right order.

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal