AW: [Insight-users] Menu by right-mouse-click using FLTK?

salah salah at gris.uni-tuebingen.de
Mon Jul 26 10:22:44 EDT 2004


Hi Luis, 

As usual, you come exactly to the point. That is exactly what 
I am looking for.

Many Thanks,

Zein

> -----Ursprüngliche Nachricht-----
> Von: Luis Ibanez [mailto:luis.ibanez at kitware.com]
> Gesendet: Monday, July 26, 2004 4:17 PM
> An: salah
> Cc: ITK Users (E-Mail)
> Betreff: Re: [Insight-users] Menu by right-mouse-click using FLTK?
> 
> 
> 
> Hi Zein,
> 
> Using FLTK you can display a menu with the right button
> by managing that event on the "handle()" method.
> 
> 
> You probably want to create a Fl_Menu_Button object
> at that point.
> 
> http://www.fltk.org/documentation.php/doc-1.1/Fl_Menu_Button.h
> tml#Fl_Menu_Button
> 
> Something like
> 
> 
>    handle( int event )
>    {
>     if( event == FL_RIGHT_MOUSE )
>        {
>        Fl_Menu_Button * popup = new Fl_Menu_Button(0,0,400,400);
>        popup->type(Fl_Menu_Button::POPUP3);
>        popup->add("This|is|a popup|menu");
>        }
>    }
> 
> (making popup a member variable of the
>   viewer would be a better option...)
> 
> 
> You will find examples of popup menus in the
> FLTK /test directory. In particular
> 
>     checkers.cxx
>     menubar.cxx
>     subwindow.cxx
> 
> 
> Regards,
> 
> 
>    Luis
> 
> 
> ----------------
> salah wrote:
> 
> > Hello,
> >  
> > I posted this question long age and did not get an answer. 
> Please, if 
> > anybody
> > can help of give ideas.
> >  
> > Thanks,
> > Zein
> >  
> > 
> --------------------------------------------------------------
> -------------------- 
> > 
> > Hello All,
> >  
> > I am trying to implement a menu (using fltk) that appears  
> besides the 
> > mouse pointer when the right mouse
> > buttom is pressed while the mouse pointer is inside the widget of a 
> > GLSliceViewer.
> >  
> > Is there an ITK example/application that uses/implements 
> such a menu?
> >  
> > Thanks in advanced,
> >  
> > Zein
> > 
> > 
> > 
> --------------------------------------------------------------
> ----------
> > 
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
> 
> 
> 
> 


More information about the Insight-users mailing list