[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Can you "localize" a dialog?
- From: Christian Wendt <c wendt bigfoot com>
- To: gtk-app-devel-list redhat com
- Subject: Re: Can you "localize" a dialog?
- Date: Wed, 11 Aug 1999 18:29:36 +0200
On Tue, Aug 10, 1999 at 11:22:42AM -0400, John Ringland wrote:
> I'm new to GTK+ and I'm struggling with how to "localize"
> a dialog.
>
> I'd like to write a (C++) DialogBox class that has a constructor
> (or other member-function) which
> pops up a dialog box window, and
> DOESN'T RETURN UNTIL a button in that window has been clicked?
>
> Is this style possible in GTK+? (Or do I have to write separate
> callback functions for each response in the dialog?)
i think you would have to do that in either case
also you could GRAB the Focus to the dialog box window - your app doesn´t
respond to anything but to data passed to the dialog box window
> class DialogBox
> { public:
> DialogBox( const char* text,
> const char* choice1, const char* choice2,
> int& returnvalue);
> };
>
> void some_callback(GtkWidget *widget, gpointer* data)
> {
> int repsonse;
> DialogBox("Do you really mean that?", "Yes", "No", response);
>
> if(response==1) { // do the yes thing }
> else if(response==2) { // do the no thing }
> }
but about that -
I once read you could interleave the gtk_main_loop thingie, this could help
you with creating a blocking function, waiting for a button click
but i´m not sure wether it´s true or what at all %-)
also i´m not aware of the gtk_main_loop() handling in gtk-- , but it should
be worth further investigation.
HTH,
Tschö,
Chris
--
It's hard not to like a man of many qualities, even if most of them are bad.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]