Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

implementing own editor unde X11

19 views
Skip to first unread message

Jens Kallup

unread,
Apr 19, 2016, 2:19:44 PM4/19/16
to
Hello programmers,

I searched for a way to code an editor component/application with XLib
functions - native, no special window manager.
I can get display, create window, and map it to screen.
The displaying of text (atm: fixed length) is not the problem.
The problem is, to handle the Events correctly.
So, wenn I push a key that the text move to right, or to left, if DEL
is pressed.
And then the mouse (mark text, and copy it to clipboard)
It would be intressting to open a discussion to this:
- how to start,
- what next ...
and so on.

Thanks for helping hands
Jens

Jens Thoms Toerring

unread,
Apr 19, 2016, 4:05:03 PM4/19/16
to
That's much too complex a topic to be covered in a newgroup
posting (and then it would be off-topic to comp.lang.c++).
You'll have to get a book, probably best is Adrian Nye, "Xlib
Programming Manual for Version 11". You'll have to set a mask
for all events you want to receive for a window (and be pre-
pared to deal with not only KeyPress, KeyRelease, ButtonPress,
ButtonRelease and MotionNotify, but also Expose and ResizeRe-
quest events). Then you basically wait in a loop for XEvents
coming in and react to them. The details can be "interesting".

Question: why not use one of the existing libraries (Qt, Gtk
and a lot more) that wrap Xlib (and often many others) and
are much easier to use and tend to be better documented as
well? It's about 20 years since I've written a program just
using bare Xlib...
Best regards, Jens
--
\ Jens Thoms Toerring ___ j...@toerring.de
\__________________________ http://toerring.de
0 new messages