Re: [gtk-list] Re: A simpler guile-gtk interface
- From: Tim Janik <timj gtk org>
 
- To: gtk-list redhat com
 
- Subject: Re: [gtk-list] Re: A simpler guile-gtk interface
 
- Date: Fri, 19 Jun 1998 00:02:25 +0200 (CEST)
 
On 18 Jun 1998, Sascha Ziemann wrote:
> lutterdc@cs.purdue.edu (David Lutterkort) writes:
> 
> | > As an example, the new code to create a top-level window with a label in it is 
> | > as follows:
> | >   (gtk-widget-show
> | >    (gtk-top-level
> | >     ((title "Top-level title"))
> | >     (gtk-label "here is a label")))
> 
> | This is really cool ! The big advantage of using gtk with guile over
> | vanilla C right now is that it is _much_ easier to get something going in
> | guile than in C.
> 
> I am thinking about a gtk-built-widget-tree function. This will be
> once again a bit simpler. The gui building could look like this:
> 
> (gtk-build-widget-tree
>  `(window :type toplevel
>:title "Top-level title"
> 	  (button :label "Say Hello"
>:signal clicked ,(lambda ()
> 				     (display "Hello\n")))))
> 
except for the possibilities to put lisp evaluations in this code,
you are getting dangerously close to GLE's tree dump formats.
test snippet:
      (GtkHBox "Window.VBox.VBox.Button.HBox"
        (generic-gle-name)
        (arg "GtkContainer::border_width" 2)
        (arg "GtkWidget::visible" true)
        (GtkLabel "Window.VBox.VBox.Button.HBox.Label"
          (generic-gle-name)
          (arg "GtkLabel::label" "Pixmap\ntest")
          (arg "GtkWidget::visible" true)
          (child-arg "GtkBox::position" 1))
        (GtkPixmap "Window.VBox.VBox.Button.HBox.Pixmap"
          (generic-gle-name)
          (arg "GtkWidget::visible" true)))
> This function has to be created from gtk.defs.
hm, i can tell you, you'll need slightly more logic for such
a "function"! ;)
> I am still brain storming ;-)
> 
---
ciaoTJ
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]