COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 06-27-2010, 04:16 PM   #1
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default Popup menu control

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
Attached Files
File Type: zip IPopUpMenu_2.zip (1.3 KB, 274 views)
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook

Last edited by olilarkin; 06-28-2010 at 06:00 AM.
olilarkin is offline   Reply With Quote
Old 06-28-2010, 06:26 AM   #2
asenet
Human being with feelings
 
Join Date: Jun 2010
Posts: 9
Default

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, ...).
Attached Files
File Type: zip IPopupControl.zip (2.3 KB, 266 views)
asenet is offline   Reply With Quote
Old 06-28-2010, 06:30 AM   #3
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

great, your one is a bit more advanced than mine.

thankyou for posting it,

oli
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote
Old 07-09-2010, 11:01 AM   #4
junioreq
Human being with feelings
 
junioreq's Avatar
 
Join Date: Aug 2008
Location: Buffalo NY
Posts: 1,091
Default

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.

Last edited by junioreq; 07-09-2010 at 04:19 PM.
junioreq is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.