Re: Resource parser



Adrian Likins wrote:
> 
> On 02-May-97 Richard D. Jackson wrote:
> >Now that we have a list spicificly for GTK it is time to use it....
> >
> >I'm starting work on a new fvwm module in particular a new button bar
> >using the notebook widget. One of the things I want is to be able to use
> >a single resource file for it versas two, one for gtk and one for my
> >app.
> >
> 
> >What does everyone think about this? I would realy like to have it
> >included in the base lib.
> >
> 
>         Sounds like a very cool idea. I think this would addres alot of the issu
> es involved in making a good command pallete for The GIMP as it is a similar ide
> a (runtime-configurable button bar). Being able to load and save a config file
> would be very important. I am thinking about possibly trying to start on the com
> mand pallete idea, but not sure if my programming skills are up to par.
>         Sounds like the two ideas could potentially share a lot of code. It woul
> d also make a nice mega-widget for possible inclusion in other projects. Oh well
> , just a few thoughts.
> 
> Adrian Likins
> ********************************************************************************

Seems we have simular ideas. Not only do I want application resources I
would like configuable button bars as well. Here are some of my ideas on
how to do it...

Preregister internal application functions that can be called by a
button bar/menu or what ever. with something like this:

gtk_func_register( function_pointer, "resource name", "description")

The resource name is the string that will be used in the resource file
and the function_pointer is what would be called for that resource. The
description would be used by GUI configuration utilities so the user
knows what a given funciton does.

The only minor draw back is functions would need to be registerd before
the resource file was parsed. 

The button/menu bar side would be the easy part. During the bar creation
phase you attach  these functions to the buttons for the varios events. 

Now once that is done how much harder would it be to define the actual
interface in the resource file? See where I'm heading? Esentialy I want
to unbind the UI as much as possible from the code. That way if I want
to change something or try something out all I would have to do is
modify the resource file and rerun the program no recompile needed.
Right now this is a dream but it is what I would like in the future. 

later
Richard D. Jackson
rjackson@bga.com

--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null



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