Re: Gnomified: Options, Paragraph, Font Dialogs


Subject: Re: Gnomified: Options, Paragraph, Font Dialogs
From: Justin Bradford (justin@ukans.edu)
Date: Tue Apr 04 2000 - 19:26:12 CDT


On Tue, 4 Apr 2000, John Tunison wrote:

> One question: is there a nice way to make runModal reside mostly in
> _UnixDialog_*? The only reason it needs to reappear in _UnixGnomeDialog_*
> is that the line 'GtkWidget * cf = constructWindow();' needs to point to
> the correct version of constructWindow. The niceness of having one
> runModal function becomes very clear in places like
> xap_UnixGnomeDlg_FontChooser.cpp.

Perhaps I'm not understanding your problem completely, but can't you just
make constructWindow a virtual class in the gtk level?

so for gtk
GTK
{
  void runModal() {
    GtkWidget* cf = constructWindow();
  }
  virtual GtkWidget* constructWindow() {
    return gtk_new_widget();
  }
}

and for gnome:

GNOME
{
  GtkWidget* constructWindow() {
    return gnome_new_widget();
  }
}

Calling runModal on a GNOME object will result
in the GNOME version of constructWindow() being
called. That's what virtual'ing functions does.

Or is this not the problem you're having?

Justin



This archive was generated by hypermail 2b25 : Tue Apr 04 2000 - 19:26:25 CDT