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

Can you "localize" a dialog?



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?)

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 }
}



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