C code to add an Interface Builder created window to an OS X XOP.

Sometimes it is a hard learning curve to add an external window to an XOP. The WindowXOP example supplied in the XOP toolkit is great, but still takes a while to grok.

I was experimenting with Interface Builder as a way to add a window to an XOP. The XOP is responsible for opening and closing the window - IGOR doesn't know about it - and I destroy the window before control returns to IGOR. The attached files show the code that was created using Interface Builder and the C-code required in an XOP to display the window and update it, by drawing text in it.

Please note that it's a basic example, the window doesn't resize and could probably be improved.

To create the window call:
 WindowPtr CreateXOPWindow(void)

and store the WindowPtr somewhere.

to draw text on it at any time call:

 DisplayWindowXOP1Message()

then destroy the window when you've finished with it:

 void DestroyXOPWindow(WindowPtr theWindow)

Archive.zip (8.35 KB)

Forum

Support

Gallery

Igor Pro 9

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More