Hello!<div>No, you didn't get the ideia. I do no want to use a toolkit, I'm writing a toolkit. It's an exercise and for fun, not something professional like GTK+, Qt or TK. I have already used GTK+ and Qt, even FLTK for my projects, so using them is not the big deal. I just asked here for someone who had some experience building this kind of stuff and because I'm not so experienced to Xlib.</div>
<div><br></div><div>Build a text input box is challenging and because of this I asked for some advices of how to write it, not use an already done from some other toolkit.</div><div><br></div><div>Thank you anyway :) I will try this week to build some sketch of the text input box :)</div>
<div>Cheers</div><br><div class="gmail_quote">2013/2/2 Robert Heller <span dir="ltr"><<a href="mailto:heller@deepsoft.com" target="_blank">heller@deepsoft.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">At Sat, 02 Feb 2013 14:02:04 -0800 Alan Coopersmith <<a href="mailto:alan.coopersmith@oracle.com">alan.coopersmith@oracle.com</a>> wrote:<br>
<br>
><br>
> On 02/ 2/13 01:56 PM, Gabriel Duarte wrote:<br>
> > I already got window and button widgets working, and now I would like<br>
> > to write a text input box, but I have no idea how to start. If someone out<br>
> > there have advices, example code, etc etc, I would be very glad.<br>
><br>
> The best advice we can give you is to use an existing toolkit.<br>
> Correctly handling all the different languages, writing systems,<br>
> accessibility helpers, etc. is a multi-year project to write, debug,<br>
> and make useful, and one that people have already done for you.<br>
<br>
</div>And if you are too impatient for that, just use Tcl/Tk. Tcl is a basic<br>
scripting language that comes with a basic GUI toolkit. One that you<br>
can play with *interactively*. Once you have Tcl/Tk installed (under<br>
Linux it is just a matter of<br>
<br>
# Red Hat flavored (RHEL, CentOS, Scientific Linux, Fedora)<br>
yum install tcl tk<br>
# Debian flavored (Debian, Ubuntu, Mint, etc.)<br>
apt-get install tcl tk<br>
<br>
), you can do this ('%'=shell prompt):<br>
<br>
% wish<br>
pack [entry .e]<br>
<br>
and presto, a text input box.<br>
<br>
A slightly more exciting example:<br>
<br>
% wish<br>
pack [entry .e] -side left<br>
pack [buttom .b \<br>
-text "Hit me" \<br>
-command {puts "You entered: '[.e cget -text]'"}] -side right<br>
<br>
The packages *should* come with man pages. Also: visit<br>
<a href="http://wiki.tcl.tk/" target="_blank">http://wiki.tcl.tk/</a> for lots of fun stuff.<br>
<br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Robert Heller -- <a href="tel:978-544-6933" value="+559785446933">978-544-6933</a> / <a href="mailto:heller@deepsoft.com">heller@deepsoft.com</a><br>
Deepwoods Software -- <a href="http://www.deepsoft.com/" target="_blank">http://www.deepsoft.com/</a><br>
() ascii ribbon campaign -- against html e-mail<br>
/\ <a href="http://www.asciiribbon.org" target="_blank">www.asciiribbon.org</a> -- against proprietary attachments<br>
<br>
<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Gabriel Duarte</div>Linux User #471185<br>Rio de Janeiro / RJ<br><a href="http://genericdev.wordpress.com/" target="_blank">http://genericdev.wordpress.com/</a><br>