Re: How do you develop you GTK code?



On 4/14/07, Robert Pearce <rob bdt-home demon co uk> wrote:
The other thing to bear in mind is this:
  If you have a row or column of similar widgets, say buttons, then a tool like Glade or BCB requires you to place every one individually. Writing the code by hand lets you do:
     for ( cc=0; cc<10; cc++ )
    {
         MyButtons[cc] = gtk_button_new (......);
         gtk_box_pack_start ( .... );
    }

This is even more relevant if the number of buttons isn't known at design time!

This is a good point. In my app I have functions like (an example)
build_label_entry() which makes a GtkLabel + GtkEntry with layout
following the HIG guidelines. Once you have a few of these set up,
building a dialog from code is really easy. Plus now your layout is
just in one function, so you can change the layout of all label +
entry pairs by just altering a couple of lines of code.

It also depends on the kind of program you are writing. Mine has a
relatively 'small' GUI (most of the code is in the back end) so Glade
would not save me a significant amount of time.

Having said that, most people tell me it has an awful interface, so
maybe you shouldn't listen to me.

John



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]