| @@ -48077,6 +48077,11 @@ void TableListBoxModel::listWasScrolled() | |||||
| { | { | ||||
| } | } | ||||
| const String TableListBoxModel::getCellTooltip (int /*rowNumber*/, int /*columnId*/) | |||||
| { | |||||
| return String::empty; | |||||
| } | |||||
| const String TableListBoxModel::getDragSourceDescription (const SparseSet<int>&) | const String TableListBoxModel::getDragSourceDescription (const SparseSet<int>&) | ||||
| { | { | ||||
| return String::empty; | return String::empty; | ||||
| @@ -262439,6 +262444,8 @@ END_JUCE_NAMESPACE | |||||
| - (BOOL) resignFirstResponder; | - (BOOL) resignFirstResponder; | ||||
| - (BOOL) acceptsFirstResponder; | - (BOOL) acceptsFirstResponder; | ||||
| - (void) asyncRepaint: (id) rect; | |||||
| - (NSArray*) getSupportedDragTypes; | - (NSArray*) getSupportedDragTypes; | ||||
| - (BOOL) sendDragCallback: (int) type sender: (id <NSDraggingInfo>) sender; | - (BOOL) sendDragCallback: (int) type sender: (id <NSDraggingInfo>) sender; | ||||
| - (NSDragOperation) draggingEntered: (id <NSDraggingInfo>) sender; | - (NSDragOperation) draggingEntered: (id <NSDraggingInfo>) sender; | ||||
| @@ -262559,7 +262566,7 @@ public: | |||||
| NSWindow* window; | NSWindow* window; | ||||
| JuceNSView* view; | JuceNSView* view; | ||||
| bool isSharedWindow, fullScreen; | |||||
| bool isSharedWindow, fullScreen, insideDrawRect; | |||||
| }; | }; | ||||
| END_JUCE_NAMESPACE | END_JUCE_NAMESPACE | ||||
| @@ -262718,6 +262725,12 @@ END_JUCE_NAMESPACE | |||||
| owner->redirectMovedOrResized(); | owner->redirectMovedOrResized(); | ||||
| } | } | ||||
| - (void) asyncRepaint: (id) rect | |||||
| { | |||||
| NSRect* r = (NSRect*) [((NSData*) rect) bytes]; | |||||
| [self setNeedsDisplayInRect: *r]; | |||||
| } | |||||
| - (void) keyDown: (NSEvent*) ev | - (void) keyDown: (NSEvent*) ev | ||||
| { | { | ||||
| if (owner == 0 || ! owner->redirectKeyDown (ev)) | if (owner == 0 || ! owner->redirectKeyDown (ev)) | ||||
| @@ -263111,7 +263124,8 @@ NSViewComponentPeer::NSViewComponentPeer (Component* const component, | |||||
| window (0), | window (0), | ||||
| view (0), | view (0), | ||||
| isSharedWindow (viewToAttachTo != 0), | isSharedWindow (viewToAttachTo != 0), | ||||
| fullScreen (false) | |||||
| fullScreen (false), | |||||
| insideDrawRect (false) | |||||
| { | { | ||||
| NSRect r; | NSRect r; | ||||
| r.origin.x = 0; | r.origin.x = 0; | ||||
| @@ -263792,7 +263806,10 @@ void NSViewComponentPeer::drawRect (NSRect r) | |||||
| if (context.reduceClipRegion (clip)) | if (context.reduceClipRegion (clip)) | ||||
| { | { | ||||
| insideDrawRect = true; | |||||
| handlePaint (context); | handlePaint (context); | ||||
| insideDrawRect = false; | |||||
| temp.draw (r.origin.x, r.origin.y, clip, originX, originY); | temp.draw (r.origin.x, r.origin.y, clip, originX, originY); | ||||
| } | } | ||||
| } | } | ||||
| @@ -263834,9 +263851,19 @@ void juce_setKioskComponent (Component* kioskModeComponent, bool enableOrDisable | |||||
| void NSViewComponentPeer::repaint (int x, int y, int w, int h) | void NSViewComponentPeer::repaint (int x, int y, int w, int h) | ||||
| { | { | ||||
| [view setNeedsDisplayInRect: | |||||
| NSMakeRect ((float) x, (float) ([view frame].size.height - (y + h)), | |||||
| (float) w, (float) h)]; | |||||
| NSRect r = NSMakeRect ((float) x, (float) ([view frame].size.height - (y + h)), | |||||
| (float) w, (float) h); | |||||
| if (insideDrawRect) | |||||
| { | |||||
| [view performSelectorOnMainThread: @selector (asyncRepaint:) | |||||
| withObject: [NSData dataWithBytes: &r length: sizeof (r)] | |||||
| waitUntilDone: NO]; | |||||
| } | |||||
| else | |||||
| { | |||||
| [view setNeedsDisplayInRect: r]; | |||||
| } | |||||
| } | } | ||||
| void NSViewComponentPeer::performAnyPendingRepaintsNow() | void NSViewComponentPeer::performAnyPendingRepaintsNow() | ||||
| @@ -566,6 +566,11 @@ void TableListBoxModel::listWasScrolled() | |||||
| { | { | ||||
| } | } | ||||
| const String TableListBoxModel::getCellTooltip (int /*rowNumber*/, int /*columnId*/) | |||||
| { | |||||
| return String::empty; | |||||
| } | |||||
| const String TableListBoxModel::getDragSourceDescription (const SparseSet<int>&) | const String TableListBoxModel::getDragSourceDescription (const SparseSet<int>&) | ||||
| { | { | ||||
| return String::empty; | return String::empty; | ||||
| @@ -76,6 +76,8 @@ END_JUCE_NAMESPACE | |||||
| - (BOOL) resignFirstResponder; | - (BOOL) resignFirstResponder; | ||||
| - (BOOL) acceptsFirstResponder; | - (BOOL) acceptsFirstResponder; | ||||
| - (void) asyncRepaint: (id) rect; | |||||
| - (NSArray*) getSupportedDragTypes; | - (NSArray*) getSupportedDragTypes; | ||||
| - (BOOL) sendDragCallback: (int) type sender: (id <NSDraggingInfo>) sender; | - (BOOL) sendDragCallback: (int) type sender: (id <NSDraggingInfo>) sender; | ||||
| - (NSDragOperation) draggingEntered: (id <NSDraggingInfo>) sender; | - (NSDragOperation) draggingEntered: (id <NSDraggingInfo>) sender; | ||||
| @@ -202,7 +204,7 @@ public: | |||||
| NSWindow* window; | NSWindow* window; | ||||
| JuceNSView* view; | JuceNSView* view; | ||||
| bool isSharedWindow, fullScreen; | |||||
| bool isSharedWindow, fullScreen, insideDrawRect; | |||||
| }; | }; | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -364,6 +366,12 @@ END_JUCE_NAMESPACE | |||||
| owner->redirectMovedOrResized(); | owner->redirectMovedOrResized(); | ||||
| } | } | ||||
| - (void) asyncRepaint: (id) rect | |||||
| { | |||||
| NSRect* r = (NSRect*) [((NSData*) rect) bytes]; | |||||
| [self setNeedsDisplayInRect: *r]; | |||||
| } | |||||
| //============================================================================== | //============================================================================== | ||||
| - (void) keyDown: (NSEvent*) ev | - (void) keyDown: (NSEvent*) ev | ||||
| { | { | ||||
| @@ -765,7 +773,8 @@ NSViewComponentPeer::NSViewComponentPeer (Component* const component, | |||||
| window (0), | window (0), | ||||
| view (0), | view (0), | ||||
| isSharedWindow (viewToAttachTo != 0), | isSharedWindow (viewToAttachTo != 0), | ||||
| fullScreen (false) | |||||
| fullScreen (false), | |||||
| insideDrawRect (false) | |||||
| { | { | ||||
| NSRect r; | NSRect r; | ||||
| r.origin.x = 0; | r.origin.x = 0; | ||||
| @@ -1450,7 +1459,10 @@ void NSViewComponentPeer::drawRect (NSRect r) | |||||
| if (context.reduceClipRegion (clip)) | if (context.reduceClipRegion (clip)) | ||||
| { | { | ||||
| insideDrawRect = true; | |||||
| handlePaint (context); | handlePaint (context); | ||||
| insideDrawRect = false; | |||||
| temp.draw (r.origin.x, r.origin.y, clip, originX, originY); | temp.draw (r.origin.x, r.origin.y, clip, originX, originY); | ||||
| } | } | ||||
| } | } | ||||
| @@ -1494,9 +1506,19 @@ void juce_setKioskComponent (Component* kioskModeComponent, bool enableOrDisable | |||||
| //============================================================================== | //============================================================================== | ||||
| void NSViewComponentPeer::repaint (int x, int y, int w, int h) | void NSViewComponentPeer::repaint (int x, int y, int w, int h) | ||||
| { | { | ||||
| [view setNeedsDisplayInRect: | |||||
| NSMakeRect ((float) x, (float) ([view frame].size.height - (y + h)), | |||||
| (float) w, (float) h)]; | |||||
| NSRect r = NSMakeRect ((float) x, (float) ([view frame].size.height - (y + h)), | |||||
| (float) w, (float) h); | |||||
| if (insideDrawRect) | |||||
| { | |||||
| [view performSelectorOnMainThread: @selector (asyncRepaint:) | |||||
| withObject: [NSData dataWithBytes: &r length: sizeof (r)] | |||||
| waitUntilDone: NO]; | |||||
| } | |||||
| else | |||||
| { | |||||
| [view setNeedsDisplayInRect: r]; | |||||
| } | |||||
| } | } | ||||
| void NSViewComponentPeer::performAnyPendingRepaintsNow() | void NSViewComponentPeer::performAnyPendingRepaintsNow() | ||||