Hi, this question is for anyone who knows Motif & GTK+.
In Motif I've something like this to attache widgets relative to other
ones:

#define ATTACHE(XmCote, widget, n) 
   if (widget==_parent) { 
      XtSetArg( args[n], XmCote,  XmATTACH_FORM ); n++;  
   } else
   if (widget!=(Widget)NULL)
      {
      XtSetArg( args[n], XmCote,  XmATTACH_WIDGET ); n++;
      if (XmCote==XmNtopAttachment)
        XtSetArg( args[n], XmNtopWidget, widget);
      else
      if (XmCote==XmNleftAttachment)
        XtSetArg( args[n], XmNleftWidget, widget);
      else
      if (XmCote==XmNrightAttachment)
        XtSetArg( args[n], XmNrightWidget, widget);
      else
      if (XmCote==XmNbottomAttachment)
        XtSetArg( args[n], XmNbottomWidget, widget);
      n++;
      }
          


void Class::Attache( Widget top, Widget left, Widget bottom, Widget
right)
{
 
 
        Arg     args[8];
        int     n;
 
  if( _widget == NULL ) return;
 
  n = 0;
 
  ATTACHE( XmNtopAttachment,     top,   n)
  ATTACHE( XmNbottomAttachment,  bottom,    n)
  ATTACHE( XmNrightAttachment,   right, n)
  ATTACHE( XmNleftAttachment,    left, n)
 
  XtSetValues( _widget, args, n);
 
} // Attache() 


Is there anyway to make something similar in GTK+?



Thanks,

Ignacio Nodal

_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to