Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2000-01

ShowCursor

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Weustink
to Shane Miller: Anyone have an idea on this function? How it should be written? can anyone give me a…
Shane wrote
Anyone have an idea on this function?

This is one of the low priority background processes of mine thinking how to solve this. I'll try to express most bits and pieces :-)

How it should be written?

I think the Caret is a part of the GTK implementation of TWinControl (call it csFixed or later csWincontrol), since this is the place were I think it is needed most. All edit capable widgets already have a caret, so if one derives a class from them it has also a Caret.
If one want to derive from another control which has no edit capabilities and want to turn it into a editor, than IMHO it is bad luck. (I can't think of an example why sombody wants to do that, but maybe others ?)

can anyone give me a hint for this? I need to have a procedure (compatable to windows) that will be called to display the flashing cursor in the editor.

That's handled by the winapi, you only have to call the winapi.ShowCaret/SetCaretPos and things like that. This winapi func then in its turn can determin based upon the handle what kind of window it is talking to and can call the appropriate funcs. In case of a edit capable widget, the gtk/gdk funcs and otherwise the caret func, that we have to create somewhere (I prefer winapi, since I'm playing with the idea to move (in the far future) the csWinControl code to the CreateWindow APIfunc)

In windows, there is only one cursor in the entire system so when one window has it, another doesn't The cursor is handled by the OS, not the running program so how do we tap into this under Linux?

I think that not very different. Only [G|S]etCaretPos doesn't take a hWnd as parameter but then again it works only on the window which has focus.

In this way I see a internal api class TAPICaret which gets created when the csWinContol is created (or maybe on some create styles if the exist ??) and handles all caret stuff.

As I said erlier, this was just a background process. I haven't looked how it is handled in gtk internally. So I don't know if caret support already is build in the gtkwidgets or XWidgets or.... who knows.

Marc

Since I'm still struggling with the scrollbar support on a csWinControl I think this problem is pretty close and when I add sb support I might add the basic Caret stuff as well

Reply by email

Shane Miller

Anyone have an idea on this function? How it should be written? can anyone give me a hint for this? I need to have a procedure (compatable to windows) that will be called to display the flashing cursor in the editor. In windows, there is only one cursor in the entire system so when one window has it, another doesn't The cursor is handled by the OS, not the running program so how do we tap into this under Linux?

Shane

>> 01/06/00 05:35PM >>>
Peter Vreman wrote 8 lines
Just to write that the Changes which are made to lazarus are also recorded in a Changes.lazarus file in the logs repository: cvs -z3 co logs And on the ftp site. So mails with the changes doesn't need to be send to the maillinglist.

Nice to know. This way you can see what the recent changes were. It is only a bit unreadable because a LF in the comment is converted to a space (except some comments from Shane ?).

The main reasons for me mailing changes are:

- Notify others what has been done and what has to be done.
- Clearify things
- Pointing at problems (in the hope) to get feedback.

Most of these you don't put in a history log, but if there are people this is a waste of bandwidth I won't mail anymore.

Marc

_________________________________________________________________ To unsubscribe: mail with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus

Reply by email