Re: GnomeSelectPaper Widget




On Wed, 13 May 1998, Dirk Luetjens wrote:
> 
> while writing my small gpstool app I faced the problem of selecting a
> paper size. So I started to write a GnomeSelectPaper Widget. 
>

Hey, neat. Perhaps the widget should be part of/include a whole "Page
Setup" kind of deal? Stuff like resolution, number of copies, 2-up... I
guess that's an entire app... ;-) The word processor, GLUe, etc. could all
use this.

Anyone know what the Mac or Windows API is for this dialog?
 
> One programming question: It is necessary for libpaper to have a
> paperinit() function call in the beginning and a paperdone() function at
> the end of using it. I though about calling paperinit() in the
> gnome_select_paper_init() function and paperdone() in the destroy handler
> of the widget. 
> 
> 1.) What happens if one opens two gnome_select_paper widgets?
> 2.) Who to write the destroy function handler for a widget?
> 3.) Where should the function calls be placed correctly?
> (Sorry, I'm a beginner in writing widgets myself)
> 

What do the functions do?

Maybe you could keep a count of created widgets, and call paperdone()
whenever it goes from 1 to 0 and paperinit() whenever it goes from 0 to 1.
Or you could require users to call them; what if the main program also
uses libpaper and your widget does paperdone() on it? All depends on how
these functions work, I guess.

Havoc Pennington ==== http://pobox.com/~hp



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