Hi,
I’m a new guy using JUCE which is great c++ library.
I’ve written a simple program using toolbar,I want the program call buttonClicked(Button * button) when some ToolbarButton be clicked on my toolbar, unfortunately the method buttonClicked never be executed.
My code is here:
class MyToolBar : public Toolbar,
public ButtonListener
{
public:
MyToolBar()
{
this->addDefaultItems(m_factory);
this->getItemComponent(MyToolbarItemFactory ::tb_setting)->addListener(this);
}
~MyToolBar()
{
}
void buttonClicked(Button * button)
{
// do something
}
private:
MyToolbarItemFactory m_factory;
};
Can somebody tell me why,thanks.