Click here to Skip to main content
15,880,405 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Team,
I want to prepare a Text Editor for unix systems and would like to even program a mouse for moving from One Location to Another location in the editor and also use scroll bars. But can you please tell me how can all this be done in Unix.
Little Hint: Since most of the Unix Users will be accessing the server through Putty, i would like to program my editor in such a way that through putty when ever some one tries to use my editor, mouse should also appear.

Little detailed explanation would be really helpful for me to start this project.

Regards,
Kiran
Posted

Use the ncurses[^] library to make a mouse-controllable character mode program. The server must run gpm[^] for mouse support on text consoles like PuTTY.
 
Share this answer
 
Comments
[no name] 14-Jun-11 4:55am    
Thank you very much,
But can you please suggest me any sites which includes the example source code of how to exactly use the gpm library files in designing the mouse events or trap the mouse events and etc.,

Regards,
Kiran
markkuk 14-Jun-11 5:16am    
You should use the higher-level interface provided by the ncurses library instead of trying to talk directly to gpm. There are several tutorials and examples provided for ncurses, but very little for gpm.
You should try the PuTTY website for information about using X11 like features this way. There are also lots of resources on the internet that will help you write an XTerm emulator.
 
Share this answer
 
Comments
markkuk 14-Jun-11 4:49am    
PuTTY is alreay a XTerm emulator, the OP wants to write a program running inside PuTTY (or other text console), not a PuTTY replacement.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900