Hi all,
I am facing another quicktime problem . 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?
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)
END_JUCE_NAMESPACE
using namespace JUCE_NAMESPACE;
@interface JUCEQTMovieViewComponent : QTMovieView
{
}
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent;
- (void)mouseDown:(NSEvent *)theEvent;
- (void) rightMouseDown: (NSEvent*) theEvent;
@end
@implementation JUCEQTMovieViewComponent
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
{
return YES;
}
- (void)mouseDown:(NSEvent *)theEvent
{
NSLog(@"mouseDown");
}
- (void) rightMouseDown: (NSEvent*) ev
{
// will have to handle the events here
NSLog(@"rightMouseDown");
}
@end
BEGIN_JUCE_NAMESPACE
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.
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.