How do I call a class?

Hi everyone,
I have a class with some buttons in it, when I click the button “a”, I call a function and what I want know is to call a class everytime I enter that function. Hope someone can help me on this.

Thanks in advance.