Frederick J. Harris
February 16th, 2008, 07:55 PM
That little blinking thingy in a text box that indicated the text insertion point for typed characters...
What is the correct name for it in terms of XLib? I'm studying Adrian Nye's XLib tutorial, and I'm confused about terminology. I'm a Windows Api programmer trying to learn a little XLib, and in windows we call the 'I' beam text insertion point (which blinks) a 'caret'. The cursor refers to the mouse pointer.
In Windows I have never had to actually 'create' a caret from scratch as there is an Api function - CreateCaret(HWND hWnd) - for that. I can't seem to find anything like that in XLib, so I'm curious how a caret is actually constructed and how one makes it blink. I'm assumming the blinking would have to work off a system timer/clock of some sort. The actual visible blinking entity itself I'm assuming would have to be a pixmap or something. I'd like to learn how to do it but if anyone could 'flesh out' the concept a little more for me I'd appreciate it. Are there perhaps some pre-existing routines I've overlooked?
At the moment I have materials for teaching myself XLib, Motif/Lesstif/Xt, and GTK+. I've worked more with XLib than the other two. Actually, if I could figure out the blinking caret thing I believe I could satisfactorily make a text box control of my own. If I had a text box control I could make a grid. I'd be well on my way to having made my own toolkit (I need to make buttons too).
I also like Lesstif but there is something wrong with the textbox code, and surprisingly (and unrelated to this question), it concerns the text insertion point caret (if that's what it is called in Linux circles). When you switch focus to a second text box random pixels of the former insertion point remain in the first textbox and it looks really funky! If I knew who to send the info/code/screenshot to I would do that so they could look at it and try to figure out what's wrong. I know I ramble.
Fred
What is the correct name for it in terms of XLib? I'm studying Adrian Nye's XLib tutorial, and I'm confused about terminology. I'm a Windows Api programmer trying to learn a little XLib, and in windows we call the 'I' beam text insertion point (which blinks) a 'caret'. The cursor refers to the mouse pointer.
In Windows I have never had to actually 'create' a caret from scratch as there is an Api function - CreateCaret(HWND hWnd) - for that. I can't seem to find anything like that in XLib, so I'm curious how a caret is actually constructed and how one makes it blink. I'm assumming the blinking would have to work off a system timer/clock of some sort. The actual visible blinking entity itself I'm assuming would have to be a pixmap or something. I'd like to learn how to do it but if anyone could 'flesh out' the concept a little more for me I'd appreciate it. Are there perhaps some pre-existing routines I've overlooked?
At the moment I have materials for teaching myself XLib, Motif/Lesstif/Xt, and GTK+. I've worked more with XLib than the other two. Actually, if I could figure out the blinking caret thing I believe I could satisfactorily make a text box control of my own. If I had a text box control I could make a grid. I'd be well on my way to having made my own toolkit (I need to make buttons too).
I also like Lesstif but there is something wrong with the textbox code, and surprisingly (and unrelated to this question), it concerns the text insertion point caret (if that's what it is called in Linux circles). When you switch focus to a second text box random pixels of the former insertion point remain in the first textbox and it looks really funky! If I knew who to send the info/code/screenshot to I would do that so they could look at it and try to figure out what's wrong. I know I ramble.
Fred