Quicktime Component and Right Click

Hi all,
I am facing another quicktime problem :cry: . On Macintosh I can right click on the quicktimecomponent. I don’t want to show up quicktime popup menu(on right-click), because I intend to show different option in the popup menu with my application’s lookandfeel . Any ideas on how do I do it?

This is snap shot of my application.

I don’t want to show this pop up menu.

I suppose you could try hacking it so that it instead of using QTMovieView, it creates a subclass with an overridden mouseDown: selector… No idea if that’d work, but can’t think of any other way, unless QT has an option to let you turn the menu off. Too busy to investigate myself, but let me know if you figure something out.

I looked for an api to block right click on quicktime, wasn’t successful. I will give your idea a try. I have couple of not too good ideas(bad ideas) in mind but will keep them on hold for a while.

Hi jules,
Finally got it to work partially. It’s not complete yet. It has stopped showing up poup menu . Added this code to juce_mac_QuickTimeMovieComponent.mm and used “JUCEQTMovieViewComponent” instead of “QTMovieView”.

#define JUCEQTMovieViewComponent MakeObjCClassName(JUCEQTMovieViewComponent)

using namespace JUCE_NAMESPACE;

@interface JUCEQTMovieViewComponent    : QTMovieView


- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent;
- (void)mouseDown:(NSEvent *)theEvent;
- (void) rightMouseDown: (NSEvent*) theEvent;

@implementation JUCEQTMovieViewComponent

- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
	return YES;

- (void)mouseDown:(NSEvent *)theEvent

- (void) rightMouseDown: (NSEvent*) ev
   // will have to handle the events here



Ok, that’s interesting. I guess you’d want to remove mouseDown: if you want to allow left-clicks to get through.

First thing first I want to thank you for bailing me out yet again. Yeah I intend to remove [quote]- (void)mouseDown:(NSEvent *)theEvent;[/quote] I was playing with the options available.

I have couple of questions it would be great if you would answer them.

When I first tried to write this code I didn’t put

I got errors stating I have to put objective c calls in global space.

Secondly, What does this macro do.

Yes, you’ve got to be careful with the namespace thing.

The MakeObjCClassName macro creates a class name that contains extra bits on the end, to make it unique. There are threads elsewhere discussing this - it’s basically to avoid cross-linking problems that you get when multiple modules are loaded that all contain classes with the same names.

Thanks Jules.