the callback function does not work for me, can some one help?
this is my class :
#ifndef Fl_Audio_H
#define Fl_Audio_H
#ifndef Fl_Group_H
#include "Fl_Group.H"
#endif
#include "Fl_Button.H"
#include "Enumerations.H"
#include "Fl_Choice.H"
#include "Fl_Box.H"
#include "Fl_PNG_Image.H"
class FL_EXPORT Fl_Audio : public Fl_Group
{
public:
Fl_Button enreg;
Fl_Choice typea,languea;
Fl_Box box,B1,type,langue;
void enrega_Callback(Fl_Widget* o,void *v)
{
Fl_Button* b=(Fl_Button*)o;
Fl_Group *g = b-> parent();
g->show();
}
Fl_Audio(int x,int y,int w,int h):Fl_Group (x,y,w,h),
type(FL_NO_BOX,w/15,(h/3),(w+h)/30,(w+h)/80,"Type audio"),
langue(FL_NO_BOX,w/15,(h/3)+2*(w+h)/80,(w+h)/30,(w+h)/80,"Format audio"),
enreg((w/2)-(w+h)/30,13*h/16,1,1,"Enregistrer"),
box(_FL_SHADOW_FRAME,w/25,(h/3)-(w+h)/80,(w/10)+(w+h)/30+(2*w+h)/15,5*(w+h)/80,""),
typea((2*w+h)/15,(h/3),(2*w+h)/15,(w+h)/80),
languea((2*w+h)/15,(h/3)+2*(w+h)/80,(2*w+h)/15,(w+h)/80),
B1(FL_BORDER_FRAME,(w/2)-(w+h)/60,(h/10)+64-h/60,(w+h)/30,h/30,"")
{enreg.shortcut('g');
Fl_PNG_Image *im_enreg= new
Fl_PNG_Image("/home/houssem/Desktop/stage/iconpng/noir/save.png");
enreg.image(im_enreg);
enreg.callback(enrega_Callback);
end ();};
~Fl_Audio(){};
};
#endif
/****************************************************** main
*********************************************/
this is my main function :
/*********************************************************************************************************/
#include <cstdlib>
#include <FL/Fl_Window.H>
#include <FL/Fl.H>
#include <FL/Fl_Audio.H>
int main () {
Fl_Window *Win = new Fl_Window(0,0,300,300);
Fl_Audio *audio = new Fl_Audio(0,0,100,100);
Win->end();
Win->show();
return(Fl::run());
}
the problem is : /usr/local/include/FL/Fl_Audio.H:43: error: no matching
function for call to ‘Fl_Button::callback(<unresolved overloaded function
type>)’
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk