Esempio n. 1
0
bool	AUPropertyControl::HandleEvent(EventHandlerCallRef inHandlerRef, EventRef event)
{	
	UInt32 eclass = GetEventClass(event);
	UInt32 ekind = GetEventKind(event);
	switch (eclass) {
	case kEventClassControl:
		switch (ekind) {
		case kEventControlValueFieldChanged:
			HandleControlChange();
			return true;	// handled
		}
	}

	return false;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//	AURenderQualityPopup::HandleEvent
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bool	AURenderQualityPopup::HandleEvent(EventRef event)
{	
	UInt32 		eventClass = GetEventClass(event);		// the class of the event
	HICommand	command;
	bool 		result = false;
	
	GetEventParameter (event, kEventParamDirectObject, typeHICommand, NULL, sizeof(HICommand), NULL, &command);
		
	switch(eventClass) {
		case kEventClassCommand:
			if (command.commandID == kChangeRenderQualityCmd)
				SetControl32BitValue(mControl, command.menu.menuItemIndex);
				HandleControlChange();
			break;
	}
	return result;
}