<div dir="ltr">Thanks for the replies.<div><br></div><div>I think I'll try both drawing to the main window and using a window-per-widget and see which one I like.<br><br>I was considering using Cairo, but there's even less documentation on Cairo than there is on XCB, so I'll probably hold off on learning that.</div>
<div><br></div><div>If I would like to load a pixmap from a file to be the background of the button, how would I do that?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Sep 7, 2013 at 1:33 AM, Bart Massey <span dir="ltr"><<a href="mailto:bart@cs.pdx.edu" target="_blank">bart@cs.pdx.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Don't let what "modern toolkits" do dissuade you from a<br>
window-per-widget approach, though: it works fine, and is worlds<br>
easier in most ways.<br>
<br>
You probably want to write your toolkit output mostly atop Cairo, BTW;<br>
the harder part is input handling. I don't have a great example lying<br>
around, I'm afraid...<br>
<br>
--Bart<br>
<div><div class="h5"><br>
On Fri, Sep 6, 2013 at 7:52 PM, Josh Triplett <<a href="mailto:josh@joshtriplett.org">josh@joshtriplett.org</a>> wrote:<br>
> On Fri, Sep 06, 2013 at 09:24:32PM -0400, Gulshan Singh wrote:<br>
>> Hi, I'm new with XCB. Are there any examples of making UI elements such as<br>
>> buttons or input boxes? Would each UI element just be a xcb_window_t so it<br>
>> can listen for events?<br>
><br>
> Modern toolkits normally don't use an X Window for each widget; they<br>
> just draw directly to the main window, and the event loop checks events<br>
> against the bounds of the various widgets.<br>
><br>
> - Josh Triplett<br>
</div></div>> _______________________________________________<br>
> Xcb mailing list<br>
> <a href="mailto:Xcb@lists.freedesktop.org">Xcb@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/xcb" target="_blank">http://lists.freedesktop.org/mailman/listinfo/xcb</a><br>
</blockquote></div><br></div>