!tabby - a tabbed container app
Pip Ahrens (8995) 18 posts |
Apologies if this is a stupid comment but I was having a play with this earlier and noticed something a bit odd going on with the resize handle. |
Gavin Cawley (8462) 70 posts |
Hi Fred, I’ll look into that, although from what I have seen so far implementing a module task in C may not be all that straight forward, but I can see it is a useful enough thing to be worth learning how it’s done. I suspect this may be why David Ruck’s WindOpen module runs as a module task, as that presumably works by sending messages to wimp tasks. Jean-Michel – thanks for the update to !diderot, as at least two people (perhaps soon to be three) use it with !tabby it ought to be a program I use for testing. |
Gavin Cawley (8462) 70 posts |
Hi Pip, which application generated the window that is being captured? I’m happy to investigate if it is easily available. Tabby tries to prevent the user from directly manipulating the window by hiding the title bar and the adjust size icon. However the application may bring itself to the top of the window stack through other means (e.g. when using compiler message throwback with !SrcEdit). Tabby monitors the captured window and reopens itself above the captured window when this happens, but it may not get it right all the time. Tabby does rely a bit on the captured window not doing things that are too unexpected – I am a relative novice at WIMP programming (!tabby is my first WIMP program intended to be actually useful) and it seems tasks do lots of things I wasn’t expecting! ;o) Your screen capture reminds me I must find a way of copying the default adjust size icon on the user’s system. |
Paolo Fabio Zaino (28) 1882 posts |
@ Jean
Thanks! :)
That’s a perfect test for my Launchpad “Launch Groups” (a feature that allows a user to group a set of Apps as a single icon and launch them all at once with a single click) |
Paolo Fabio Zaino (28) 1882 posts |
@ Fred
C, BBCBASIC and ObjASM (ObjASM is ok, not too bad, while C and BBCB it really goes funky)
My understanding is, if I change a mode then I should store it in the User defined modes right? Should I rename it too? Like PaoloC or something or should I leave it with the original name? Also, the other problem that can be really annoying is, when I mover through the code with the arrow keys and then delete 1 character on the left, instead of doing what I meant to (delete the character just next to the blinking cursor) it delete the character under the cursor. Any help for this one? Thanks for your help Fred! :) |
Pip Ahrens (8995) 18 posts |
@ Gavin. I had packman and plingstore (catalogue window) in tabby at the time so should be easy enough to replicate. |
Gavin Cawley (8462) 70 posts |
@Pip, I see what you mean, the lag on my machine (I am using rpcemu on a fairly good laptop) is barely noticeable, but on a real RiscPC it is likely to be rather worse. Unfortunately it is probably unavoidable. Unlike a pane, the captured window and !tabby are moved by different applications, so there is a limit to how closely they can be synchronised. In my original implementation, the captured window controlled it’s own resizing and !tabby monitored the window and adapted itself to suit, but that gave an unacceptable delay in redrawing !tabby over the top of the moving window. The new approach maintains an additional window that hovers over the adjust size icon, and when that is dragged, the !tabby window moves with it, and the captured window is requested to re-open with a new size underneath the !tabby window. This seems the most efficient approach, but there will always be a delay as we have to wait until the task owning the window acts on the message to reopen the tab. I’m just learning about sprites at the moment, and I think it will be possible for !tabby to copy the adjust size icon from the local theme and use that in a future version, so that will be a little less out of place. |
Fred Graute (114) 645 posts |
@ Paolo Firstly my apologies, I was a bit incomplete in just mentioning auto-indent. StrongED actually has to forms of indentation: auto-indent which simply copies the indent of the previous line, and smart-indent which increases or decreases the previous indent based on the code on the previous/current line.
C and BBCBASIC going strange I can understand as they use smart-indent but ObjASM only uses auto-indent so that surprises me. Do you have an example of this? For C and BBCBASIC coding style is a factor. In BASIC having constructs start and end on the same line is a problem, eg
It might be possible to improve this by tweaking the smart indent algorithm, which is based on an idea by Anders Lund (one of Kate’s developers). It’s controlled by expressions in the ModeFile.
Yes, but StrongED can do that itself automatically. When you edit a ModeFile and it’s located inside !StrongED.Defaults then StrongED will prompt you upon saving, asking you where you’d like to save the file: Defaults or UserPrefs. Unless you have a very good reason (or you’re me :) you should always choose to save to UserPrefs. This ensures the file is saved to StrED_cfg.UserPrefs where it’s safe from updates to StrongED. After you’ve edited and saved the ModeFile then new behaviour/functionality should be available immediately, no need to restart StrongED. To access a ModeFile, click Adjust on the iconbar icon. Find to mode to edit and click on it with Shift held down. A Ctrl-click will open the ModeWhen file (which decides which files are loaded into this mode).
Leaving the original name should be fine. You can create a new mode based on the original one but that’s a lot more work. |
Ieva Jaciute (9210) 1 post |
Hello! |
Pip Ahrens (8995) 18 posts |
@Gavin – its entirely useable and a really useful thing (for reference my system is on a Pi4 rather than a “real” RISC PC), just thought you might like to know about it :) |
Gavin Cawley (8462) 70 posts |
@Pip, no problem, glad you are finding it useful, and feedback to make it better is very welcome! |
Paolo Fabio Zaino (28) 1882 posts |
@ Fred Thanks a lot, disabled the “ReindentText(Line,Force)” in the ModeFile for both BASIC and C and it seems to be working fine now, finally! :) |
Fred Graute (114) 645 posts |
@ Paolo Glad to hear that your indent problem is now sorted. Regarding the Delete key: StrongED’s default configuration has Backspace set up to delete to the character left of the cursor and Delete to the delete the character on the right (or under) the cursor. If you want Delete to delete the character on the left then you’ll need to change its binding in the BaseMode ModeFile. Click Ctrl-Adjust on the iconbar icon to load the BaseMode ModeFile. Click the LoF icon on the toolbar (fourth from the right) to get a list of sections defined in the ModeFile. In the LoF, Adjust-click on the line that just reads ‘KeyList’. This will take you to the main KeyList (and closes the LoF). In the KeyList find the line that sets up the Delete keybinding:
Change ‘DeleteRight’ to ‘DeleteLeft’ then save the ModeFile. Delete should now delete the character to the left of the cursor. |
Jean-Michel BRUCK (3009) 359 posts |
I just found a bug in my adaptation of !Diderot for !Tabby. Some files no longer want to open from !Diderot, for example Draw files. Sorry. I updated “!Diderot”: https://jeanmichelb.riscos.fr/Dev.html |
Gavin Cawley (8462) 70 posts |
@Jean-Michel – sorry about that, I’ve pushed a new version up to Github that hopefully fixes the problem. I’ll upload it to my website tomorrow morning. |
Paolo Fabio Zaino (28) 1882 posts |
@ Fred
Sorry, I think I have described the problem not correctly. It’s not a case os PC Delete vs Acorn Delete etc… it’s a problem with the way StrongEd does things at the cursor position after I have used the arrow keys. For instance, I use the arrow key to move down 1 or 2 lines and then press space bar to insert a space in place of the cursor, the space appears before (or sometimes after) the place it was supposed to appear (which is in place of the cursor). It’s a behavior that feels like a bug Fred, I can probably make a video of it and put it on my youtube for you if that helps. No idea why SE does it, I remember using SE years ago and never had an issue with it. |
Steve Pampling (1551) 8170 posts |
That sounds to me like you’re moving down (or up) in a set of wrapped text, and that where SE is visually placing the cursor is not where it is logically placed. Hence, the placement of new characters being variably before or after. See if you can reproduce the effect in both wrapped text and non-wrapped text |
Paolo Fabio Zaino (28) 1882 posts |
Shows exact same problem in wrapped and non-wrapped text. |
Fred Graute (114) 645 posts |
@ Paolo
Sorry, that’s what it sounded like.
No need, it’s a known limitation of the current outline font support. Bitmap fonts and monospaced outline fonts should be fine but proportional fonts are not. The reason for this is that StrongED was designed for bitmap fonts where each character has the same width. To move up/down only the y position needs to be adjusted because boundaries between characters are all lined up. This is not true for proportional outline fonts where going straight up/down may place the cursor in the middle of a character. To properly move the cursor requires a horizontal adjustment that moves the cursor to the nearest character boundary. Outline font support was aimed at printing initially to allow printing in graphics mode as many modern printers lack support for text mode printing. However as printing on RISC OS is very similar to screen redraw I decided to try using outline fonts for redraw too. It worked surprisingly well but it’s not without issues. Some, such as cursor placement, seem solvable but others are more difficult to fix. Block editing being one of the hard ones. The ‘fix’ for now is to use a bitmap font or a monospaced outline font. If you want to stay with a proportional font then move the cursor left/right after a vertical move to align it with a character boundary. I’d also recommend using a bar caret as this makes it easier to see the exact position.
Maybe because StrongED didn’t support outline fonts back then? |
Paolo Fabio Zaino (28) 1882 posts |
@ Fred
Thanks for let me know, appreciate it. The font I am using is DejaVuSans.Mono (and it looks monospaced, but I am not an expert so I leave the judgment to you). StrongEd looks absolutely gorgeous (IMHO) using DejaVuSans.Mono, really good on the eye and monospaced to format code nicely. But, if it’s causing the issue, I’ll move back to whatever works. Thanks! |
Fred Graute (114) 645 posts |
@ Paolo
Thanks… and yes, DejaVuSans.Mono is a very nice monospaced font.
I’ve looking at this (hence the delay in replying) and it seems SE 4.69f11 was not as good as I thought it was with monospaced outline fonts. It does indeed have the problem you’ve described. Some of the improvements in 4.70a14 have now been backported to 4.69f12 and cursor movement should be better. Drop me an email (address is in the StrongED manual) and I’ll send you an updated RunImage to try. |
Paolo Fabio Zaino (28) 1882 posts |
Nice! Thanks a lot Fred, can’t wait to get 4.69f12 then. some nice RISC OS IDE is coming up together with Diderot and Tabby :D |
Jean-Michel BRUCK (3009) 359 posts |
@Gavin @Fred @Paolo |
Paolo Fabio Zaino (28) 1882 posts |
@ Jean
Sounds really interesting. It’s another thing that RISC OS lack at the moment, I remember using Draw back in the days to do flowcharting, it worked, but I think now people need more specialised tools for the job, so great idea! :) |
Andrew Conroy (370) 740 posts |
We had DiagramIt from Dalriada which allowed you to make flowcharts. I used it to draw out a few pieces of software I wrote before writing the code. |