Re: Text Input Box with Xlib
On Mon, Feb 04, 2013 at 06:13:02AM +, Steven Newbury wrote: On Sun, 2013-02-03 at 19:35 -0200, Gabriel Duarte wrote: Hello! 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. Wouldn't it be more beneficial for you to work with XCB? XCB is lower-level than Xlib, lacks virtually all of the functionality which Duarte is looking for. Documentation is... limited. more beneficial obviously means for the developers of XCB - not another prospective user. bye. -- Thomas E. Dickey dic...@invisible-island.net http://invisible-island.net ftp://invisible-island.net signature.asc Description: Digital signature ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com
Re: Text Input Box with Xlib
Hello! 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. 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. Thank you anyway :) I will try this week to build some sketch of the text input box :) Cheers 2013/2/2 Robert Heller hel...@deepsoft.com At Sat, 02 Feb 2013 14:02:04 -0800 Alan Coopersmith alan.coopersm...@oracle.com wrote: On 02/ 2/13 01:56 PM, Gabriel Duarte wrote: I already got window and button widgets working, and now I would like to write a text input box, but I have no idea how to start. If someone out there have advices, example code, etc etc, I would be very glad. The best advice we can give you is to use an existing toolkit. Correctly handling all the different languages, writing systems, accessibility helpers, etc. is a multi-year project to write, debug, and make useful, and one that people have already done for you. And if you are too impatient for that, just use Tcl/Tk. Tcl is a basic scripting language that comes with a basic GUI toolkit. One that you can play with *interactively*. Once you have Tcl/Tk installed (under Linux it is just a matter of # Red Hat flavored (RHEL, CentOS, Scientific Linux, Fedora) yum install tcl tk # Debian flavored (Debian, Ubuntu, Mint, etc.) apt-get install tcl tk ), you can do this ('%'=shell prompt): % wish pack [entry .e] and presto, a text input box. A slightly more exciting example: % wish pack [entry .e] -side left pack [buttom .b \ -text Hit me \ -command {puts You entered: '[.e cget -text]'}] -side right The packages *should* come with man pages. Also: visit http://wiki.tcl.tk/ for lots of fun stuff. -- Robert Heller -- 978-544-6933 / hel...@deepsoft.com Deepwoods Software-- http://www.deepsoft.com/ () ascii ribbon campaign -- against html e-mail /\ www.asciiribbon.org -- against proprietary attachments -- Gabriel Duarte Linux User #471185 Rio de Janeiro / RJ http://genericdev.wordpress.com/ ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com
Re: Text Input Box with Xlib
At Sun, 3 Feb 2013 19:35:41 -0200 Gabriel Duarte confuso...@gmail.com wrote: Hello! 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. 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. Thank you anyway :) I will try this week to build some sketch of the text input box :) One thought: The widgets in Tcl/Tk are layered right on top of XLib -- so looking at the source code for Tk might prove very enlightening... Cheers 2013/2/2 Robert Heller hel...@deepsoft.com At Sat, 02 Feb 2013 14:02:04 -0800 Alan Coopersmith alan.coopersm...@oracle.com wrote: On 02/ 2/13 01:56 PM, Gabriel Duarte wrote: I already got window and button widgets working, and now I would like to write a text input box, but I have no idea how to start. If someone out there have advices, example code, etc etc, I would be very glad. The best advice we can give you is to use an existing toolkit. Correctly handling all the different languages, writing systems, accessibility helpers, etc. is a multi-year project to write, debug, and make useful, and one that people have already done for you. And if you are too impatient for that, just use Tcl/Tk. Tcl is a basic scripting language that comes with a basic GUI toolkit. One that you can play with *interactively*. Once you have Tcl/Tk installed (under Linux it is just a matter of # Red Hat flavored (RHEL, CentOS, Scientific Linux, Fedora) yum install tcl tk # Debian flavored (Debian, Ubuntu, Mint, etc.) apt-get install tcl tk ), you can do this ('%'=shell prompt): % wish pack [entry .e] and presto, a text input box. A slightly more exciting example: % wish pack [entry .e] -side left pack [buttom .b \ -text Hit me \ -command {puts You entered: '[.e cget -text]'}] -side right The packages *should* come with man pages. Also: visit http://wiki.tcl.tk/ for lots of fun stuff. -- Robert Heller -- 978-544-6933 / hel...@deepsoft.com Deepwoods Software-- http://www.deepsoft.com/ () ascii ribbon campaign -- against html e-mail /\ www.asciiribbon.org -- against proprietary attachments -- Robert Heller -- 978-544-6933 / hel...@deepsoft.com Deepwoods Software-- http://www.deepsoft.com/ () ascii ribbon campaign -- against html e-mail /\ www.asciiribbon.org -- against proprietary attachments ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com
Re: Text Input Box with Xlib
Cool :) Thanks for the advice :) I hope it's directly on the top of xlib, not of Xt; i will take a look! Cheers 2013/2/3 Robert Heller hel...@deepsoft.com At Sun, 3 Feb 2013 19:35:41 -0200 Gabriel Duarte confuso...@gmail.com wrote: Hello! 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. 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. Thank you anyway :) I will try this week to build some sketch of the text input box :) One thought: The widgets in Tcl/Tk are layered right on top of XLib -- so looking at the source code for Tk might prove very enlightening... Cheers 2013/2/2 Robert Heller hel...@deepsoft.com At Sat, 02 Feb 2013 14:02:04 -0800 Alan Coopersmith alan.coopersm...@oracle.com wrote: On 02/ 2/13 01:56 PM, Gabriel Duarte wrote: I already got window and button widgets working, and now I would like to write a text input box, but I have no idea how to start. If someone out there have advices, example code, etc etc, I would be very glad. The best advice we can give you is to use an existing toolkit. Correctly handling all the different languages, writing systems, accessibility helpers, etc. is a multi-year project to write, debug, and make useful, and one that people have already done for you. And if you are too impatient for that, just use Tcl/Tk. Tcl is a basic scripting language that comes with a basic GUI toolkit. One that you can play with *interactively*. Once you have Tcl/Tk installed (under Linux it is just a matter of # Red Hat flavored (RHEL, CentOS, Scientific Linux, Fedora) yum install tcl tk # Debian flavored (Debian, Ubuntu, Mint, etc.) apt-get install tcl tk ), you can do this ('%'=shell prompt): % wish pack [entry .e] and presto, a text input box. A slightly more exciting example: % wish pack [entry .e] -side left pack [buttom .b \ -text Hit me \ -command {puts You entered: '[.e cget -text]'}] -side right The packages *should* come with man pages. Also: visit http://wiki.tcl.tk/ for lots of fun stuff. -- Robert Heller -- 978-544-6933 / hel...@deepsoft.com Deepwoods Software-- http://www.deepsoft.com/ () ascii ribbon campaign -- against html e-mail /\ www.asciiribbon.org -- against proprietary attachments -- Robert Heller -- 978-544-6933 / hel...@deepsoft.com Deepwoods Software-- http://www.deepsoft.com/ () ascii ribbon campaign -- against html e-mail /\ www.asciiribbon.org -- against proprietary attachments -- Gabriel Duarte Linux User #471185 Rio de Janeiro / RJ http://genericdev.wordpress.com/ ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com
Re: Text Input Box with Xlib
Gabriel Duarte confuso...@gmail.com writes: Hello! 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. 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. If you only want to handle the simple stuff and isn't going to use this for anything useful, I guess it won't hurt much :) For getting text input from the user, you probably want to look at XIM: http://www.x.org/releases/X11R7.6/doc/libX11/specs/XIM/xim.html There are plenty of gotchas along the way to a working implementation, and in the end there will be issues you quite simply can't fix. Mostly because very few applications use XIM these days, so the XIM backends tend to be more buggy than the Gtk and Qt backends. eirik ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com
Re: Text Input Box with Xlib
On Sun, 2013-02-03 at 19:35 -0200, Gabriel Duarte wrote: Hello! 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. Wouldn't it be more beneficial for you to work with XCB? http://en.wikipedia.org/wiki/Xcb ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com
Text Input Box with Xlib
Hello! I am new in the list and I'm facing the first difficults in using Xlib. I have been playing around Xlib a little and then I decided to write a small set of widgets to make easier the things. I already got window and button widgets working, and now I would like to write a text input box, but I have no idea how to start. If someone out there have advices, example code, etc etc, I would be very glad. If someone want to see what I've already wrote, it's here: https://github.com/gabrield/stk -- Gabriel Duarte Linux User #471185 Rio de Janeiro / RJ http://genericdev.wordpress.com/ ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com
Re: Text Input Box with Xlib
On 02/ 2/13 01:56 PM, Gabriel Duarte wrote: I already got window and button widgets working, and now I would like to write a text input box, but I have no idea how to start. If someone out there have advices, example code, etc etc, I would be very glad. The best advice we can give you is to use an existing toolkit. Correctly handling all the different languages, writing systems, accessibility helpers, etc. is a multi-year project to write, debug, and make useful, and one that people have already done for you. -- -Alan Coopersmith- alan.coopersm...@oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com
Re: Text Input Box with Xlib
At Sat, 02 Feb 2013 14:02:04 -0800 Alan Coopersmith alan.coopersm...@oracle.com wrote: On 02/ 2/13 01:56 PM, Gabriel Duarte wrote: I already got window and button widgets working, and now I would like to write a text input box, but I have no idea how to start. If someone out there have advices, example code, etc etc, I would be very glad. The best advice we can give you is to use an existing toolkit. Correctly handling all the different languages, writing systems, accessibility helpers, etc. is a multi-year project to write, debug, and make useful, and one that people have already done for you. And if you are too impatient for that, just use Tcl/Tk. Tcl is a basic scripting language that comes with a basic GUI toolkit. One that you can play with *interactively*. Once you have Tcl/Tk installed (under Linux it is just a matter of # Red Hat flavored (RHEL, CentOS, Scientific Linux, Fedora) yum install tcl tk # Debian flavored (Debian, Ubuntu, Mint, etc.) apt-get install tcl tk ), you can do this ('%'=shell prompt): % wish pack [entry .e] and presto, a text input box. A slightly more exciting example: % wish pack [entry .e] -side left pack [buttom .b \ -text Hit me \ -command {puts You entered: '[.e cget -text]'}] -side right The packages *should* come with man pages. Also: visit http://wiki.tcl.tk/ for lots of fun stuff. -- Robert Heller -- 978-544-6933 / hel...@deepsoft.com Deepwoods Software-- http://www.deepsoft.com/ () ascii ribbon campaign -- against html e-mail /\ www.asciiribbon.org -- against proprietary attachments ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com