PDA

View Full Version : OSX popup menu


olilarkin
06-27-2010, 04:16 PM
thanks to swell i have a very basic popup menu control working on osx [and windows]. Just add the contents of the swell folder from the swell example project, and point it an an enum param, e.g

GetParam(kType)->InitEnum("Type", 0, 2);
GetParam(kType)->SetDisplayText(0, "positive");
GetParam(kType)->SetDisplayText(1, "negative");

pGraphics->AttachControl(new IPopUpMenu(this, &IRECT(10, 10, 150, 150), kType));


EDIT - updated it so now it's cross platform

oli

asenet
06-28-2010, 06:26 AM
Since a long time I also wanted to contribute some code the the IPlug community. I really like this framework a lot and its currently actively used in some of the products I am working on.

Since there is a high demand for popup controls I will post parts of the code I am using to create the menus within Windows and OSX.

Have fun using it and maybe you can enhance it a lot further (e.g. item selection, grey out, ...).

olilarkin
06-28-2010, 06:30 AM
great, your one is a bit more advanced than mine.

thankyou for posting it,

oli

junioreq
07-09-2010, 11:01 AM
ok, I've added the lines in .h and put the sample into .cpp What else needs to be done to get this to show up?

Not sure how to do the equivelent of this "pGraphics->AttachControl(new IPopUpMenu(this, &IRECT(10, 10, 150, 150), kType));" with the new code by asenet.

Oillarken, using yours, seems to be more "iplugish" :) Very simple. But whats with the white square that you have o click on?

~Rob.