| @@ -248,7 +248,7 @@ struct AAXClasses | |||||
| } | } | ||||
| } | } | ||||
| virtual AAX_Result GetViewSize (AAX_Point* const viewSize) const | |||||
| virtual AAX_Result GetViewSize (AAX_Point* viewSize) const | |||||
| { | { | ||||
| if (component != nullptr) | if (component != nullptr) | ||||
| { | { | ||||
| @@ -215,8 +215,7 @@ void setNativeHostWindowSize (void* nsWindow, Component* component, int newWidth | |||||
| JUCE_AUTORELEASEPOOL | JUCE_AUTORELEASEPOOL | ||||
| #if JUCE_64BIT | #if JUCE_64BIT | ||||
| NSView* hostView = (NSView*) nsWindow; | |||||
| if (hostView != nil) | |||||
| if (NSView* hostView = (NSView*) nsWindow) | |||||
| { | { | ||||
| // xxx is this necessary, or do the hosts detect a change in the child view and do this automatically? | // xxx is this necessary, or do the hosts detect a change in the child view and do this automatically? | ||||
| [hostView setFrameSize: NSMakeSize ([hostView frame].size.width + (newWidth - component->getWidth()), | [hostView setFrameSize: NSMakeSize ([hostView frame].size.width + (newWidth - component->getWidth()), | ||||
| @@ -224,9 +223,8 @@ void setNativeHostWindowSize (void* nsWindow, Component* component, int newWidth | |||||
| } | } | ||||
| #else | #else | ||||
| HIViewRef dummyView = (HIViewRef) (void*) (pointer_sized_int) | |||||
| component->getProperties() ["dummyViewRef"].toString().getHexValue64(); | |||||
| if (dummyView != 0) | |||||
| if (HIViewRef dummyView = (HIViewRef) (void*) (pointer_sized_int) | |||||
| component->getProperties() ["dummyViewRef"].toString().getHexValue64()) | |||||
| { | { | ||||
| HIRect frameRect; | HIRect frameRect; | ||||
| HIViewGetFrame (dummyView, &frameRect); | HIViewGetFrame (dummyView, &frameRect); | ||||
| @@ -37,7 +37,7 @@ class Component; | |||||
| You can add a key listener to a component to be informed when that component | You can add a key listener to a component to be informed when that component | ||||
| gets key events. See the Component::addListener method for more details. | gets key events. See the Component::addListener method for more details. | ||||
| @see KeyPress, Component::addKeyListener, KeyPressMappingManager | |||||
| @see KeyPress, Component::addKeyListener, KeyPressMappingSet | |||||
| */ | */ | ||||
| class JUCE_API KeyListener | class JUCE_API KeyListener | ||||
| { | { | ||||
| @@ -35,7 +35,7 @@ | |||||
| E.g. a KeyPress might represent CTRL+C, SHIFT+ALT+H, Spacebar, Escape, etc. | E.g. a KeyPress might represent CTRL+C, SHIFT+ALT+H, Spacebar, Escape, etc. | ||||
| @see Component, KeyListener, Button::addShortcut, KeyPressMappingManager | |||||
| @see Component, KeyListener, KeyPressMappingSet, Button::addShortcut | |||||
| */ | */ | ||||
| class JUCE_API KeyPress | class JUCE_API KeyPress | ||||
| { | { | ||||
| @@ -106,7 +106,7 @@ public: | |||||
| */ | */ | ||||
| inline bool isCtrlDown() const noexcept { return testFlags (ctrlModifier); } | inline bool isCtrlDown() const noexcept { return testFlags (ctrlModifier); } | ||||
| /** Checks whether the shift key's flag is set. */ | |||||
| /** Checks whether the ALT key's flag is set. */ | |||||
| inline bool isAltDown() const noexcept { return testFlags (altModifier); } | inline bool isAltDown() const noexcept { return testFlags (altModifier); } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -1532,9 +1532,11 @@ private: | |||||
| static NSRange markedRange (id self, SEL) | static NSRange markedRange (id self, SEL) | ||||
| { | { | ||||
| NSViewComponentPeer* const owner = getOwner (self); | |||||
| return owner->stringBeingComposed.isNotEmpty() ? NSMakeRange (0, (NSUInteger) owner->stringBeingComposed.length()) | |||||
| : NSMakeRange (NSNotFound, 0); | |||||
| if (NSViewComponentPeer* const owner = getOwner (self)) | |||||
| if (owner->stringBeingComposed.isNotEmpty()) | |||||
| return NSMakeRange (0, (NSUInteger) owner->stringBeingComposed.length()); | |||||
| return NSMakeRange (NSNotFound, 0); | |||||
| } | } | ||||
| static NSRange selectedRange (id self, SEL) | static NSRange selectedRange (id self, SEL) | ||||
| @@ -1585,10 +1587,9 @@ private: | |||||
| #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 | #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 | ||||
| static BOOL performKeyEquivalent (id self, SEL, NSEvent* ev) | static BOOL performKeyEquivalent (id self, SEL, NSEvent* ev) | ||||
| { | { | ||||
| NSViewComponentPeer* const owner = getOwner (self); | |||||
| if (owner != nullptr && owner->redirectPerformKeyEquivalent (ev)) | |||||
| return true; | |||||
| if (NSViewComponentPeer* const owner = getOwner (self)) | |||||
| if (owner->redirectPerformKeyEquivalent (ev)) | |||||
| return true; | |||||
| objc_super s = { self, [NSView class] }; | objc_super s = { self, [NSView class] }; | ||||
| return objc_msgSendSuper (&s, @selector (performKeyEquivalent:), ev) != nil; | return objc_msgSendSuper (&s, @selector (performKeyEquivalent:), ev) != nil; | ||||
| @@ -1751,10 +1752,9 @@ private: | |||||
| static void windowWillMove (id self, SEL, NSNotification*) | static void windowWillMove (id self, SEL, NSNotification*) | ||||
| { | { | ||||
| NSViewComponentPeer* const owner = getOwner (self); | |||||
| if (owner != nullptr && owner->hasNativeTitleBar()) | |||||
| owner->sendModalInputAttemptIfBlocked(); | |||||
| if (NSViewComponentPeer* const owner = getOwner (self)) | |||||
| if (owner->hasNativeTitleBar()) | |||||
| owner->sendModalInputAttemptIfBlocked(); | |||||
| } | } | ||||
| }; | }; | ||||