If you want to have several different objects that you can click on for a context menu unique to that item, is the context menu suppose to be part of that object (in the class definition)?

Are the actions also part of the object? Or can you only have actions created in main()?