Objects that are derived from CP_Object inherit the ability to provide for registration of signal and slots by names so you can later find the signal or slot by identifier.
So for example, you need to connect to a buttons clicked signal, you would do the following:
// push button viewLocation.Set( 10, 20 ); viewSize.Set( 150, 20 ); title = "Pushbutton"; pushButtonOne = CP_new CPLAT_MacOS::CP_PushButton( returnView, viewLocation, viewSize, title, kCP_PushButtonClickedCommand ); pushButtonOne->FindSignal( kCP_Signal_Clicked )->connect( CPLAT_MacOS::CP_SigSlot::slot(this, &CP_UIClasses_Application::ControlClicked) );
This example, taken from the CP_UIClasses demo shows the creation of a Push Button, and then a slot to be called whenever the user clicks on the button is connected by finding the buttons Clicked signal. You can see this in action by running the CP_UIClasses demo.