No caret/text cursor?

Jacob Hammeken <[email protected]> Thu, 23 May 2002 00:49:16 +0200
Newsgroups gmane.comp.kde.look
Message-ID <[email protected]>
Hi.

I am new to KDE and Linux in general and from what I can tell, 
there does not seem to be any functionality for drawing and 
updating a caret (text cursor) in QT or the KDE libraries, 
except for doing it explicitly by drawing and updating an icon. 
At least that is the impression I got from reading message 5 in 
the following (I also tried to find it in the documentation and 
elsewhere):
http://lists.trolltech.com/qt-interest/1995-06/msg00046.html

Is this really the case? If so, I think having functionality for 
this in KDE would have the advantage of making it easier to use 
a caret which look and feels identically across applications. 
Here are a few differences I have noticed regarding carets:

- The caret seems to blink in most programs because the QT 
widgets do this. However, in a lot of Mandrake programs, the 
caret does not blink. Even if this is because the Mandrake 
programs do not use KDE, it would still be nice to know what the 
blink rate is when you develop a KDE application if you cannot 
use the KDE widgets.

- In OpenOffice, the caret is hidden when you select a menu. 
However, in KDevelop the caret keeps on blinking when you select 
a menu (to me this implies that the window still has the 
keyboard focus although it does not).

- In OpenOffice, the caret looks like a vertical line. However, 
in KDevelop, the caret consists of two horisontal and one 
vertical line.

- In Mozilla, the caret is drawn when you click in the location 
bar, even if the caret is hidden and would not move to a 
different location on the screen. However, in OpenOffice and 
KDevelop, the caret is not drawn if it is hidden unless the 
caret moves to a different location on the screen (instead, it 
keeps on blinking).

Additionally, if there is no such functionality in the QT or KDE 
libraries, adding it would make it possible for a user to change 
the blink rate for all programs (in the KDE Control Center, for 
instance) rather than change it on a per program basis.

I am not suggesting that all programs necessarily need to do this 
identically but having functionality for this (at the very least 
in the form of configuration data containing the default blink 
rate and an icon, and some mention of how carets should behave 
in the style guidelines) would make it possible to do it.

I apologize if there is already such functionality and I just 
missed it. Even if this is the case, I think it would still be 
worth considering whether the caret is really supposed to blink 
in KDevelop when the editor window does not have the keyboard 
focus, such as when selecting a menu.

Jacob Hammeken