On Thursday, 25 October 2012 at 22:27:52 UTC, Jens Mueller wrote:
5. setting the contents of the title bar
The title bar of what?

Here's how you do it on xterm:

writefln("\033]0;%s\007", title);

On Windows it is an api function:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms686050%28v=vs.85%29.aspx

6. supporting cut/paste

Don't know how to do this? Anybody a starting point?

I wouldn't worry about it up front, the system will give simple stuff for you and getting it right is a bit of a pain because you have to bring in other api calls (on both Windows and Linux; linux will need some X11 calls I believe.)

7. getting no-echo raw input

Tried this but couldn't make it work yet. This is useful for passwords prompts, right?


Here's a brief example for unix:

http://arsdnet.net/dcode/input.d

On Windows I'm almost certain it is actually easier but I haven't done that for a while and don't remember it right now.


The reason my code there puts it in a struct is so it is automatically put back to the previous mode when you go out of scope.


8. setting the size of the cursor
The size of the cursor? Why should I want to change its size?

There's a way to do this on windows i'm pretty sure and it is hit and miss on linux - sometimes works, sometimes doesn't.

But a reason you might want it is to visually indicate the difference between insert and overwrite mode.

In a text editor for instance, a short cursor means insert. If you press the insert key on the keyboard, you switch to replace mode, and a taller cursor can show that.



Jens


Reply via email to