Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
ChildView Class Reference

#import <nsChildView.h>

Inheritance diagram for ChildView:
Inheritance graph
[legend]
Collaboration diagram for ChildView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(void- viewsWindowDidBecomeKey
(void- viewsWindowDidResignKey
(void- dealloc [implementation]
(void- widgetDestroyed [implementation]
(nsIWidget *) - widget [implementation]
(NSWindow *) - getNativeWindow [implementation]
(void- setNativeWindow: [implementation]
(void- setNeedsPendingDisplay [implementation]
(void- setNeedsPendingDisplayInRect: [implementation]
(NSString *) - description [implementation]
(nsIScrollableView *) - getScrollableView [implementation]
(void- startHandScroll: [implementation]
(void- updateHandScroll: [implementation]
(void- setHandScrollCursor: [implementation]
(void- stopHandScroll: [implementation]
(void- setFrame: [implementation]
(BOOL- isFlipped [implementation]
(BOOL- isOpaque [implementation]
(BOOL- acceptsFirstResponder [implementation]
(void- viewWillMoveToWindow: [implementation]
(void- viewDidMoveToWindow [implementation]
(void- viewWillStartLiveResize [implementation]
(void- viewDidEndLiveResize [implementation]
(void- scrollRect:by: [implementation]
(BOOL- mouseDownCanMoveWindow [implementation]
(void- lockFocus [implementation]
(void- drawRect: [implementation]
(BOOL- wantsDefaultClipping [implementation]
(void- mouseDown: [implementation]
(void- mouseUp: [implementation]
(void- mouseMoved: [implementation]
(void- mouseDragged: [implementation]
(void- mouseEntered: [implementation]
(void- mouseExited: [implementation]
(void- rightMouseDown: [implementation]
(void- rightMouseUp: [implementation]
(void- otherMouseDown: [implementation]
(void- otherMouseUp: [implementation]
(void- scrollWheel:forAxis: [implementation]
(void- scrollWheel: [implementation]
(NSMenu *) - menuForEvent: [implementation]
(void- insertText: [implementation]
(void- insertNewline: [implementation]
(void- doCommandBySelector: [implementation]
(void- setMarkedText:selectedRange: [implementation]
(void- unmarkText [implementation]
(BOOL- hasMarkedText [implementation]
(long- conversationIdentifier [implementation]
(NSAttributedString *) - attributedSubstringFromRange: [implementation]
(NSRange) - markedRange [implementation]
(NSRange) - selectedRange [implementation]
(NSRect) - firstRectForCharacterRange: [implementation]
(unsigned int- characterIndexForPoint: [implementation]
(NSArray *) - validAttributesForMarkedText [implementation]
(void- keyDown: [implementation]
(void- keyUp: [implementation]
(void- flagsChanged: [implementation]
(BOOL- becomeFirstResponder [implementation]
(BOOL- resignFirstResponder [implementation]
(float) - _destinationFloatValueForScroller: [implementation]

Static Public Member Functions

(BOOL+ areHandScrollModifiers: [implementation]
(static PRBool+ ConvertUnicodeToCharCode [implementation]
(static void+ ConvertCocoaKeyEventToMacEvent [implementation]
(static PRUint32+ ConvertMacToRaptorKeyCode [implementation]
(static PRBool+ IsSpecialRaptorKey [implementation]

Private Member Functions

(id- initWithFrame:geckoChild:eventSink: [implementation]
(nsRect- sendCompositionEvent: [implementation]
(void- sendTextEvent:attributedString:selectedRange:markedRange:doCommit: [implementation]
(void- convertEvent:message:toGeckoEvent: [implementation]
(void- convertKeyEvent:message:toGeckoEvent: [implementation]
(void- convertLocation:message:modifiers:toGeckoEvent: [implementation]
(NSMenu *) - getContextMenu [implementation]
(TopLevelWindowData *) - ensureWindowData [implementation]
(void- setIsPluginView: [implementation]
(BOOL- getIsPluginView [implementation]
(BOOL- childViewHasPlugin [implementation]
(void- flushRect: [implementation]
(BOOL- isRectObscuredBySubview: [implementation]
(void- processPendingRedraws [implementation]

Private Attributes

NSWindow * mWindow
nsChildViewmGeckoChild
nsIEventSinkmEventSink
NSTrackingRectTag mMouseEnterExitTag
BOOL mIsPluginView
NSEvent * mCurKeyEvent
NSRange mMarkedRange
NSRange mSelectedRange
BOOL mInComposition
BOOL mIgnoreDoCommand
BOOL mToggleMouseMoveEventWatching
BOOL mInHandScroll
NSPoint mHandScrollStartMouseLoc
nscoord mHandScrollStartScrollX
nscoord mHandScrollStartScrollY
NSMutableArray * mPendingDirtyRects
BOOL mPendingFullDisplay
PRUint32 mLastModifierState

Detailed Description

Definition at line 73 of file nsChildView.h.


Member Function Documentation

- (float) _destinationFloatValueForScroller: (id scroller [implementation]

Definition at line 3865 of file nsChildView.mm.

                                         :(id)scroller
{
  return [scroller floatValue];
}
- (BOOL) acceptsFirstResponder [implementation]

Definition at line 2400 of file nsChildView.mm.

{
  return YES;
}
+ (BOOL) areHandScrollModifiers: (unsigned int modifiers [implementation]

Definition at line 2282 of file nsChildView.mm.

                               :(unsigned int)modifiers
{
  // The command and option key should be held down.  Ignore capsLock by
  // setting it explicitly to match.
  modifiers |= NSAlphaShiftKeyMask;
  return (modifiers & NSDeviceIndependentModifierFlagsMask) ==
      (NSAlphaShiftKeyMask | NSCommandKeyMask | NSAlternateKeyMask);
}
- (NSAttributedString *) attributedSubstringFromRange: (NSRange)  theRange [implementation]

Definition at line 3250 of file nsChildView.mm.

                                                     :(NSRange)theRange
{
  if (!mGeckoChild)
    return nil;

#if DEBUG_IME
  NSLog(@"****in attributedSubstringFromRange");
  NSLog(@" theRange      = %d, %d", theRange.location, theRange.length);
  NSLog(@" markedRange   = %d, %d", mMarkedRange.location, mMarkedRange.length);
  NSLog(@" selectedRange = %d, %d", mSelectedRange.location, mSelectedRange.length);
#endif

  nsReconversionEvent reconversionEvent(PR_TRUE, NS_RECONVERSION_QUERY,
                                        mGeckoChild);
  reconversionEvent.time = PR_IntervalNow();

  nsresult rv = mGeckoChild->DispatchWindowEvent(reconversionEvent);
  PRUnichar* reconvstr;
  if (NS_SUCCEEDED(rv) && (reconvstr = reconversionEvent.theReply.mReconversionString))
  {
    NSAttributedString* result = [[[NSAttributedString alloc] initWithString:[NSString stringWithCharacters:reconvstr length:nsCRT::strlen(reconvstr)]
                                                                  attributes:nil] autorelease];
    nsMemory::Free(reconvstr);
    return result;
  }

  return nil;
}

Here is the call graph for this function:

- (BOOL) becomeFirstResponder [implementation]

Definition at line 3497 of file nsChildView.mm.

{
  if (!mGeckoChild) return NO;   // we've been destroyed

  nsFocusEvent event(PR_TRUE, NS_GOTFOCUS, mGeckoChild);
  mGeckoChild->DispatchWindowEvent(event);

  return [super becomeFirstResponder];
}

Here is the call graph for this function:

- (unsigned int) characterIndexForPoint: (NSPoint)  thePoint [implementation]

Definition at line 3328 of file nsChildView.mm.

                                      :(NSPoint)thePoint
{
#if DEBUG_IME
  NSLog(@"****in characterIndexForPoint");
  NSLog(@" markRange = %d, %d;  selectRange = %d, %d", mMarkedRange.location, mMarkedRange.length, mSelectedRange.location, mSelectedRange.length);
#endif

  // To implement this, we'd have to grovel in text frames looking at text offsets.
  return 0;
}
- (BOOL) childViewHasPlugin [implementation]

Definition at line 2381 of file nsChildView.mm.

{
  NSArray* subviews = [self subviews];
  for (unsigned int i = 0; i < [subviews count]; i ++)
  {
    id subview = [subviews objectAtIndex:i];
    if ([subview respondsToSelector:@selector(getIsPluginView)] && [subview getIsPluginView])
        return YES;
  }
  
  return NO;
}

Here is the call graph for this function:

- (long) conversationIdentifier [implementation]

Definition at line 3245 of file nsChildView.mm.

{
  return (long)self;
}
+ (static void) ConvertCocoaKeyEventToMacEvent (NSEvent *)  cocoaEvent
(EventRecord &)  macEvent
(PRUint32 keyType = 0 
[implementation]

Definition at line 3007 of file nsChildView.mm.

{
    UInt32 charCode = 0;
    if ([cocoaEvent type] == NSFlagsChanged) {
      macEvent.what = keyType == NS_KEY_DOWN ? keyDown : keyUp;
    } else {
      charCode = [[cocoaEvent characters] characterAtIndex:0];
      if ([cocoaEvent type] == NSKeyDown)
        macEvent.what = [cocoaEvent isARepeat] ? autoKey : keyDown;
      else
        macEvent.what = keyUp;
    }

    if (charCode >= 0x0080)
    {
        switch (charCode) {
        case NSUpArrowFunctionKey:
            charCode = kUpArrowCharCode;
            break;
        case NSDownArrowFunctionKey:
            charCode = kDownArrowCharCode;
            break;
        case NSLeftArrowFunctionKey:
            charCode = kLeftArrowCharCode;
            break;
        case NSRightArrowFunctionKey:
            charCode = kRightArrowCharCode;
            break;
        default:
            unsigned char convertedCharCode;
            if (ConvertUnicodeToCharCode(charCode, &convertedCharCode))
              charCode = convertedCharCode;
            //NSLog(@"charcode is %d, converted to %c, char is %@", charCode, convertedCharCode, [cocoaEvent characters]);
            break;
        }
    }
    macEvent.message = (charCode & 0x00FF) | ([cocoaEvent keyCode] << 8);
    macEvent.when = ::TickCount();
    GetGlobalMouse(&macEvent.where);
    macEvent.modifiers = ::GetCurrentKeyModifiers();
}

Here is the call graph for this function:

Here is the caller graph for this function:

- (void) convertEvent: (NSEvent*)  inEvent
message: (PRInt32 inMsg
toGeckoEvent: (nsInputEvent*)  outGeckoEvent 
[implementation]

Definition at line 2950 of file nsChildView.mm.

                     :(NSEvent*)inEvent message:(PRInt32)inMsg toGeckoEvent:(nsInputEvent*)outGeckoEvent
{
  outGeckoEvent->nativeMsg = inEvent;
  [self convertLocation:[inEvent locationInWindow] message:inMsg modifiers:[inEvent modifierFlags]
          toGeckoEvent:outGeckoEvent];
}

Here is the call graph for this function:

Here is the caller graph for this function:

- (void) convertKeyEvent: (NSEvent*)  aKeyEvent
message: (PRUint32 aMessage
toGeckoEvent: (nsKeyEvent*)  outGeckoEvent 
[implementation]

Definition at line 3810 of file nsChildView.mm.

                        :(NSEvent*)aKeyEvent message:(PRUint32)aMessage 
            toGeckoEvent:(nsKeyEvent*)outGeckoEvent
{
  [self convertEvent:aKeyEvent message:aMessage toGeckoEvent:outGeckoEvent];

  // Initialize whether or not we are using charCodes to false.
  outGeckoEvent->isChar = PR_FALSE;
    
  // Check to see if the message is a key press that does not involve
  // one of our special key codes.
  if (aMessage == NS_KEY_PRESS && !IsSpecialRaptorKey([aKeyEvent keyCode])) 
  {
    if (!outGeckoEvent->isControl && !outGeckoEvent->isMeta)
      outGeckoEvent->isControl = outGeckoEvent->isAlt = outGeckoEvent->isMeta = 0;
    
    outGeckoEvent->charCode = 0;
    outGeckoEvent->keyCode  = 0;

    NSString* unmodifiedChars = [aKeyEvent charactersIgnoringModifiers];
    if ([unmodifiedChars length] > 0)
      outGeckoEvent->charCode = [unmodifiedChars characterAtIndex:0];
    
    // We're not a special key.
    outGeckoEvent->isChar = PR_TRUE;

    // convert control-modified charCode to raw charCode (with appropriate case)
    if (outGeckoEvent->isControl && outGeckoEvent->charCode <= 26)
      outGeckoEvent->charCode += (outGeckoEvent->isShift) ? ('A' - 1) : ('a' - 1);

    // gecko also wants charCode to be in the appropriate case
    if (outGeckoEvent->isShift && (outGeckoEvent->charCode >= 'a' && outGeckoEvent->charCode <= 'z'))
      outGeckoEvent->charCode -= 32;    // convert to uppercase
  }
  else
  {
    NSString* characters = nil;
    if ([aKeyEvent type] != NSFlagsChanged)
      characters = [aKeyEvent characters];
  
    outGeckoEvent->keyCode = ConvertMacToRaptorKeyCode([aKeyEvent keyCode], outGeckoEvent, characters);
    outGeckoEvent->charCode = 0;
  } 
  
  if (aMessage == NS_KEY_PRESS && !outGeckoEvent->isMeta)
    ::ObscureCursor();
}

Here is the call graph for this function:

Here is the caller graph for this function:

- (void) convertLocation: (NSPoint)  inPoint
message: (PRInt32 inMsg
modifiers: (unsigned int inMods
toGeckoEvent: (nsInputEvent*)  outGeckoEvent 
[implementation]

Definition at line 2957 of file nsChildView.mm.

                        :(NSPoint)inPoint message:(PRInt32)inMsg modifiers:(unsigned int)inMods toGeckoEvent:(nsInputEvent*)outGeckoEvent
{
  outGeckoEvent->message = inMsg;
  outGeckoEvent->widget = [self widget];
  outGeckoEvent->time = PR_IntervalNow();
  
  if (outGeckoEvent->eventStructType != NS_KEY_EVENT) {
    NSPoint mouseLoc = inPoint;
    
    // convert point to view coordinate system
    NSPoint localPoint = [self convertPoint:mouseLoc fromView:nil];
    
    outGeckoEvent->refPoint.x = outGeckoEvent->point.x = NS_STATIC_CAST(nscoord, localPoint.x);
    outGeckoEvent->refPoint.y = outGeckoEvent->point.y = NS_STATIC_CAST(nscoord, localPoint.y);
  }
  
  // set up modifier keys
  outGeckoEvent->isShift    = ((inMods & NSShiftKeyMask) != 0);
  outGeckoEvent->isControl  = ((inMods & NSControlKeyMask) != 0);
  outGeckoEvent->isAlt      = ((inMods & NSAlternateKeyMask) != 0);
  outGeckoEvent->isMeta     = ((inMods & NSCommandKeyMask) != 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

+ (static PRUint32) ConvertMacToRaptorKeyCode (UInt32 keyCode
(nsKeyEvent *)  aKeyEvent
(NSString *)  characters 
[implementation]

Definition at line 3629 of file nsChildView.mm.

{
  PRUint32 raptorKeyCode = 0;
  PRUint8 charCode;
  if ([characters length])
    charCode = [characters characterAtIndex: 0];
  else
    charCode = 0;

  switch (keyCode)
  {
//  case ??             :       raptorKeyCode = NS_VK_CANCEL;   break;      // don't know what this key means. Nor does joki

// modifiers. We don't get separate events for these
    case kEscapeKeyCode:        raptorKeyCode = NS_VK_ESCAPE;         break;
    case kShiftKeyCode:         raptorKeyCode = NS_VK_SHIFT;          break;
    case kCommandKeyCode:       raptorKeyCode = NS_VK_META;           break;
    case kCapsLockKeyCode:      raptorKeyCode = NS_VK_CAPS_LOCK;      break;
    case kControlKeyCode:       raptorKeyCode = NS_VK_CONTROL;        break;
    case kOptionkeyCode:        raptorKeyCode = NS_VK_ALT;            break;
    case kClearKeyCode:         raptorKeyCode = NS_VK_CLEAR;          break;

// function keys
    case kF1KeyCode:            raptorKeyCode = NS_VK_F1;             break;
    case kF2KeyCode:            raptorKeyCode = NS_VK_F2;             break;
    case kF3KeyCode:            raptorKeyCode = NS_VK_F3;             break;
    case kF4KeyCode:            raptorKeyCode = NS_VK_F4;             break;
    case kF5KeyCode:            raptorKeyCode = NS_VK_F5;             break;
    case kF6KeyCode:            raptorKeyCode = NS_VK_F6;             break;
    case kF7KeyCode:            raptorKeyCode = NS_VK_F7;             break;
    case kF8KeyCode:            raptorKeyCode = NS_VK_F8;             break;
    case kF9KeyCode:            raptorKeyCode = NS_VK_F9;             break;
    case kF10KeyCode:           raptorKeyCode = NS_VK_F10;            break;
    case kF11KeyCode:           raptorKeyCode = NS_VK_F11;            break;
    case kF12KeyCode:           raptorKeyCode = NS_VK_F12;            break;
//  case kF13KeyCode:           raptorKeyCode = NS_VK_F13;            break;    // clash with the 3 below
//  case kF14KeyCode:           raptorKeyCode = NS_VK_F14;            break;
//  case kF15KeyCode:           raptorKeyCode = NS_VK_F15;            break;
    case kPauseKeyCode:         raptorKeyCode = NS_VK_PAUSE;          break;
    case kScrollLockKeyCode:    raptorKeyCode = NS_VK_SCROLL_LOCK;    break;
    case kPrintScreenKeyCode:   raptorKeyCode = NS_VK_PRINTSCREEN;    break;
  
// keypad
    case kKeypad0KeyCode:       raptorKeyCode = NS_VK_NUMPAD0;        break;
    case kKeypad1KeyCode:       raptorKeyCode = NS_VK_NUMPAD1;        break;
    case kKeypad2KeyCode:       raptorKeyCode = NS_VK_NUMPAD2;        break;
    case kKeypad3KeyCode:       raptorKeyCode = NS_VK_NUMPAD3;        break;
    case kKeypad4KeyCode:       raptorKeyCode = NS_VK_NUMPAD4;        break;
    case kKeypad5KeyCode:       raptorKeyCode = NS_VK_NUMPAD5;        break;
    case kKeypad6KeyCode:       raptorKeyCode = NS_VK_NUMPAD6;        break;
    case kKeypad7KeyCode:       raptorKeyCode = NS_VK_NUMPAD7;        break;
    case kKeypad8KeyCode:       raptorKeyCode = NS_VK_NUMPAD8;        break;
    case kKeypad9KeyCode:       raptorKeyCode = NS_VK_NUMPAD9;        break;

    case kKeypadMultiplyKeyCode:  raptorKeyCode = NS_VK_MULTIPLY;     break;
    case kKeypadAddKeyCode:       raptorKeyCode = NS_VK_ADD;          break;
    case kKeypadSubtractKeyCode:  raptorKeyCode = NS_VK_SUBTRACT;     break;
    case kKeypadDecimalKeyCode:   raptorKeyCode = NS_VK_DECIMAL;      break;
    case kKeypadDivideKeyCode:    raptorKeyCode = NS_VK_DIVIDE;       break;
//  case ??               :       raptorKeyCode = NS_VK_SEPARATOR;    break;


// these may clash with forward delete and help
    case kInsertKeyCode:        raptorKeyCode = NS_VK_INSERT;         break;
    case kDeleteKeyCode:        raptorKeyCode = NS_VK_DELETE;         break;

    case kBackspaceKeyCode:     raptorKeyCode = NS_VK_BACK;           break;
    case kTabKeyCode:           raptorKeyCode = NS_VK_TAB;            break;
    case kHomeKeyCode:          raptorKeyCode = NS_VK_HOME;           break;
    case kEndKeyCode:           raptorKeyCode = NS_VK_END;            break;
    case kPageUpKeyCode:        raptorKeyCode = NS_VK_PAGE_UP;        break;
    case kPageDownKeyCode:      raptorKeyCode = NS_VK_PAGE_DOWN;      break;
    case kLeftArrowKeyCode:     raptorKeyCode = NS_VK_LEFT;           break;
    case kRightArrowKeyCode:    raptorKeyCode = NS_VK_RIGHT;          break;
    case kUpArrowKeyCode:       raptorKeyCode = NS_VK_UP;             break;
    case kDownArrowKeyCode:     raptorKeyCode = NS_VK_DOWN;           break;

    default:
        if (aKeyEvent->isControl)
          charCode += 64;
      
        // if we haven't gotten the key code already, look at the char code
        switch (charCode)
        {
          case kReturnCharCode:       raptorKeyCode = NS_VK_RETURN;       break;
          case kEnterCharCode:        raptorKeyCode = NS_VK_RETURN;       break;      // fix me!
          case ' ':                   raptorKeyCode = NS_VK_SPACE;        break;
          case ';':                   raptorKeyCode = NS_VK_SEMICOLON;    break;
          case '=':                   raptorKeyCode = NS_VK_EQUALS;       break;
          case ',':                   raptorKeyCode = NS_VK_COMMA;        break;
          case '.':                   raptorKeyCode = NS_VK_PERIOD;       break;
          case '/':                   raptorKeyCode = NS_VK_SLASH;        break;
          case '`':                   raptorKeyCode = NS_VK_BACK_QUOTE;   break;
          case '{':
          case '[':                   raptorKeyCode = NS_VK_OPEN_BRACKET; break;
          case '\\':                  raptorKeyCode = NS_VK_BACK_SLASH;   break;
          case '}':
          case ']':                   raptorKeyCode = NS_VK_CLOSE_BRACKET;  break;
          case '\'':
          case '"':                   raptorKeyCode = NS_VK_QUOTE;        break;
          
          default:
            
            if (charCode >= '0' && charCode <= '9')   // numerals
            {
              raptorKeyCode = charCode;
            }
            else if (charCode >= 'a' && charCode <= 'z')    // lowercase
            {
              raptorKeyCode = toupper(charCode);
            }
            else if (charCode >= 'A' && charCode <= 'Z')    // uppercase
            {
              raptorKeyCode = charCode;
            }

            break;
        }
  }

  return raptorKeyCode;
}

Here is the call graph for this function:

Here is the caller graph for this function:

+ (static PRBool) ConvertUnicodeToCharCode (PRUnichar inUniChar
(unsigned char *)  outChar 
[implementation]

Definition at line 2981 of file nsChildView.mm.

{
  UnicodeToTextInfo converterInfo;
  TextEncoding      systemEncoding;
  Str255            convertedString;
  OSStatus          err;
  
  *outChar = 0;
  
  err = ::UpgradeScriptInfoToTextEncoding(smSystemScript, kTextLanguageDontCare, kTextRegionDontCare, NULL, &systemEncoding);
  if (err != noErr)
    return PR_FALSE;
  
  err = ::CreateUnicodeToTextInfoByEncoding(systemEncoding, &converterInfo);
  if (err != noErr)
    return PR_FALSE;
  
  err = ::ConvertFromUnicodeToPString(converterInfo, sizeof(PRUnichar), &inUniChar, convertedString);
  if (err != noErr)
    return PR_FALSE;

  *outChar = convertedString[1];
  ::DisposeUnicodeToTextInfo(&converterInfo);
  return PR_TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

- (void) dealloc [implementation]

Definition at line 2114 of file nsChildView.mm.

{
  [super dealloc];    // This sets the current port to _savePort (which should be
                      // a valid port, checked with the assertion above.
  SetPort(NULL);      // Bullet-proof against future changes in NSQDView
}
- (NSString *) description [implementation]

Definition at line 2200 of file nsChildView.mm.

{
  return [NSString stringWithFormat:@"ChildView %p, gecko child %p, frame %@", self, mGeckoChild, NSStringFromRect([self frame])];
}
- (void) doCommandBySelector: (SEL)  aSelector [implementation]

Definition at line 3166 of file nsChildView.mm.

                            :(SEL)aSelector
{ 
#if DEBUG_IME 
  NSLog(@"**** in doCommandBySelector %s (ignore %d)", aSelector, mIgnoreDoCommand);
#endif
  if (!mIgnoreDoCommand)
    [super doCommandBySelector:aSelector];
}
- (void) drawRect: (NSRect)  aRect [implementation]

Definition at line 2474 of file nsChildView.mm.

                :(NSRect)aRect
{
  PRBool isVisible;
  if (!mGeckoChild || NS_FAILED(mGeckoChild->IsVisible(isVisible)) || !isVisible)
    return;
  
  // Workaround for the fact that NSQuickDrawViews can't be opaque; see if the rect
  // being drawn is covered by a subview, and, if so, just bail.
  if ([self isRectObscuredBySubview:aRect])
    return;
  
  // tell gecko to paint.
  // If < 10.3, just paint the rect
  if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_2) {
    nsRect r;
    ConvertCocoaToGeckoRect(aRect, r);
    nsCOMPtr<nsIRenderingContext> rendContext = getter_AddRefs(mGeckoChild->GetRenderingContext());
    mGeckoChild->UpdateWidget(r, rendContext);
  }
  // If >10.3, only paint the sub-rects that need it. This avoids the
  // nasty coalesced updates that result in big white areas.
  else {
    const NSRect *rects;
    int count, i;
    [self getRectsBeingDrawn:&rects count:&count];
    for (i = 0; i < count; ++i) {
      nsRect r;
      ConvertCocoaToGeckoRect(rects[i], r);
      nsCOMPtr<nsIRenderingContext> rendContext = getter_AddRefs(mGeckoChild->GetRenderingContext());
      mGeckoChild->UpdateWidget(r, rendContext);
    }
  }
}

Here is the call graph for this function:

- (TopLevelWindowData *) ensureWindowData [implementation]

Definition at line 2931 of file nsChildView.mm.

{
  WindowDataMap* windowMap = [WindowDataMap sharedWindowDataMap];

  TopLevelWindowData* windowData = [windowMap dataForWindow:mWindow];
  if (mWindow && !windowData)
  {
    windowData = [[TopLevelWindowData alloc] initWithWindow:mWindow];
    [windowMap setData:windowData forWindow:mWindow]; // takes ownership
    [windowData release];
  }
  return windowData;
}

Here is the call graph for this function:

- (NSRect) firstRectForCharacterRange: (NSRange)  theRange [implementation]

Definition at line 3306 of file nsChildView.mm.

                                     :(NSRange)theRange
{
#if DEBUG_IME
  NSLog(@"****in firstRectForCharacterRange");
  NSLog(@" theRange      = %d, %d", theRange.location, theRange.length);
  NSLog(@" markedRange   = %d, %d", mMarkedRange.location, mMarkedRange.length);
  NSLog(@" selectedRange = %d, %d", mSelectedRange.location, mSelectedRange.length);
#endif

  nsRect compositionRect = [self sendCompositionEvent:NS_COMPOSITION_QUERY];

  NSRect rangeRect;
  ConvertGeckoToCocoaRect(compositionRect, rangeRect);

  // convert to window coords
  rangeRect = [self convertRect:rangeRect toView:nil];
  // convert to cocoa screen coords
  rangeRect.origin = [[self getNativeWindow] convertBaseToScreen:rangeRect.origin];
  return rangeRect;
}

Here is the call graph for this function:

- (void) flagsChanged: (NSEvent*)  theEvent [implementation]

Definition at line 3450 of file nsChildView.mm.

                    :(NSEvent*)theEvent
{
  if (!mGeckoChild)
    return;

  if ([theEvent type] == NSFlagsChanged) {
    unsigned int modifiers =
      [theEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask;
    const PRUint32 kModifierMaskTable[] =
      {NSShiftKeyMask, NSControlKeyMask, NSAlternateKeyMask, NSCommandKeyMask};
    const PRUint32 kModifierCount = sizeof(kModifierMaskTable) /
                                    sizeof(kModifierMaskTable[0]);

    for(PRUint32 i = 0 ; i < kModifierCount ; i++) {
      PRUint32 modifierBit = kModifierMaskTable[i];
      if ((modifiers & modifierBit) != (mLastModifierState & modifierBit)) {
        PRUint32 message = ((modifiers & modifierBit) != 0 ? NS_KEY_DOWN :
                                                             NS_KEY_UP);

        // Fire a key event.
        nsKeyEvent geckoEvent(PR_TRUE, 0, nsnull);
        geckoEvent.point.x = geckoEvent.point.y = 0;
        [self convertKeyEvent:theEvent
                      message:message
                 toGeckoEvent:&geckoEvent];

        EventRecord macEvent;
        ConvertCocoaKeyEventToMacEvent(theEvent, macEvent, message);
        geckoEvent.nativeMsg = &macEvent;
        mGeckoChild->DispatchWindowEvent(geckoEvent);

        // Stop if focus has changed.
        // Check to see if we are still the first responder.
        NSResponder* resp = [[self window] firstResponder];
        if (resp != (NSResponder*)self)
          break;
      }
    }

    mLastModifierState = modifiers;
  }

  // check if the hand scroll cursor needs to be set/unset
  [self setHandScrollCursor:theEvent];
}

Here is the call graph for this function:

- (void) flushRect: (NSRect)  inRect [implementation]

Definition at line 2521 of file nsChildView.mm.

                 :(NSRect)inRect
{
  Rect updateRect;
  updateRect.left   = (short)inRect.origin.x;
  updateRect.top    = (short)inRect.origin.y;
  updateRect.right  = updateRect.left + (short)inRect.size.width;
  updateRect.bottom = updateRect.top +  (short)inRect.size.height;

  RgnHandle updateRgn = ::NewRgn();
  RectRgn(updateRgn, &updateRect);
  ::QDFlushPortBuffer((CGrafPtr)[self qdPort], updateRgn);
  ::DisposeRgn(updateRgn);
}

Here is the call graph for this function:

- (NSMenu *) getContextMenu [implementation]

Reimplemented from <mozView>.

Definition at line 2922 of file nsChildView.mm.

{
  NSView* superView = [self superview];
  if ([superView respondsToSelector:@selector(getContextMenu)])
    return [(NSView<mozView>*)superView getContextMenu];

  return nil;
}

Here is the caller graph for this function:

- (BOOL) getIsPluginView [implementation]

Definition at line 2376 of file nsChildView.mm.

{
  return mIsPluginView;
}

Here is the caller graph for this function:

- (NSWindow *) getNativeWindow [implementation]

Reimplemented from <mozView>.

Definition at line 2144 of file nsChildView.mm.

{
  NSWindow* currWin = [self window];
  if (currWin)
     return currWin;
  else
     return mWindow;
}

Here is the caller graph for this function:

- (nsIScrollableView *) getScrollableView [implementation]

Definition at line 2207 of file nsChildView.mm.

{
  nsIScrollableView* scrollableView = nsnull;

  ChildView* currView = self;
  // we have to loop up through superviews in case the view that received the
  // mouseDown is in fact a plugin view with no scrollbars
  while (currView) {

    // This is a hack I learned in nsView::GetViewFor(nsIWidget* aWidget)
    // that I'm not sure is kosher. If anyone knows a better way to get
    // the view for a widget, I'd love to hear it. --Nathan

    void* clientData;
    [currView widget]->GetClientData(clientData);

    nsISupports* data = (nsISupports*)clientData;
    nsCOMPtr<nsIInterfaceRequestor> req(do_QueryInterface(data));
    if (req)
    {
      req->GetInterface(NS_GET_IID(nsIScrollableView), (void**)&scrollableView);
      if (scrollableView)
        break;
    }

    if ([[currView superview] isMemberOfClass:[ChildView class]])
        currView = [currView superview];
    else
        currView = nil;
  }

  return scrollableView;
}

Here is the call graph for this function:

Here is the caller graph for this function:

- (BOOL) hasMarkedText [implementation]

Definition at line 3240 of file nsChildView.mm.

{
  return (mMarkedRange.location != NSNotFound) && (mMarkedRange.length != 0);
}

Here is the caller graph for this function:

- (id) initWithFrame: (NSRect)  inFrame
geckoChild: (nsChildView*)  inChild
eventSink: (nsIEventSink*)  inSink 
[implementation]

Definition at line 2088 of file nsChildView.mm.

                   :(NSRect)inFrame geckoChild:(nsChildView*)inChild eventSink:(nsIEventSink*)inSink
{
  if ((self = [super initWithFrame:inFrame]))
  {
    mGeckoChild = inChild;
    mEventSink = inSink;
    mIsPluginView = NO;
    mCurKeyEvent = nil;

    // See if hack code for enabling and disabling mouse move
    // events is necessary. Fixed by at least 10.2.8
    long version = 0;
    ::Gestalt(gestaltSystemVersion, &version);
    mToggleMouseMoveEventWatching = (version < 0x00001028);
    
    // initialization for NSTextInput
    mMarkedRange.location = NSNotFound;
    mMarkedRange.length = 0;
    mSelectedRange.location = NSNotFound;
    mSelectedRange.length = 0;
    mInComposition = NO;
  }
  
  return self;
}
- (void) insertNewline: (id sender [implementation]

Definition at line 3161 of file nsChildView.mm.

                     :(id)sender
{
  // dummy impl, does nothing (other than stop the beeping when hitting return)
}
- (void) insertText: (id insertString [implementation]

Definition at line 3094 of file nsChildView.mm.

                  :(id)insertString
{
  if (!mGeckoChild)
    return;

#if DEBUG_IME
  NSLog(@"****in insertText: '%@'", insertString);
  NSLog(@" markRange = %d, %d;  selRange = %d, %d", mMarkedRange.location, mMarkedRange.length, mSelectedRange.location, mSelectedRange.length);
#endif

  if (![insertString isKindOfClass:[NSAttributedString class]])
    insertString = [[[NSAttributedString alloc] initWithString:insertString] autorelease];

  NSString *tmpStr = [insertString string];
  unsigned int len = [tmpStr length];
  PRUnichar buffer[MAX_BUFFER_SIZE];
  PRUnichar *bufPtr = (len >= MAX_BUFFER_SIZE) ? new PRUnichar[len + 1] : buffer;
  [tmpStr getCharacters: bufPtr];
  bufPtr[len] = (PRUnichar)'\0';

  if (len == 1 && !mInComposition)
  {
    // dispatch keypress event with char instead of textEvent
    nsKeyEvent geckoEvent(PR_TRUE, NS_KEY_PRESS, mGeckoChild);
    geckoEvent.time      = PR_IntervalNow();
    geckoEvent.charCode  = bufPtr[0]; // gecko expects OS-translated unicode
    geckoEvent.isChar    = PR_TRUE;
    geckoEvent.isShift   = ([mCurKeyEvent modifierFlags] & NSShiftKeyMask) != 0;
    // don't set other modifiers from the current event, because here in
    // -insertText: they've already been taken into account in creating
    // the input string.
        
    // plugins need a native keyDown or autoKey event here
    EventRecord macEvent;
    if (mCurKeyEvent)
    {
      ConvertCocoaKeyEventToMacEvent(mCurKeyEvent, macEvent);
      geckoEvent.nativeMsg = &macEvent;
    }

    mGeckoChild->DispatchWindowEvent(geckoEvent);
  }
  else
  {
    if (!mInComposition)
    {
      // send start composition event to gecko
      [self sendCompositionEvent: NS_COMPOSITION_START];
      mInComposition = YES;
    }

    // dispatch textevent (is this redundant?)
    [self sendTextEvent:bufPtr attributedString:insertString
                               selectedRange:NSMakeRange(0, len)
                               markedRange:mMarkedRange
                               doCommit:YES];

    // send end composition event to gecko
    [self sendCompositionEvent: NS_COMPOSITION_END];
    mInComposition = NO;
    mSelectedRange = mMarkedRange = NSMakeRange(NSNotFound, 0);
  }

  if (bufPtr != buffer)
    delete[] bufPtr;
}

Here is the call graph for this function:

- (BOOL) isFlipped [implementation]

Definition at line 2351 of file nsChildView.mm.

{
  return YES;
}
- (BOOL) isOpaque [implementation]

Definition at line 2366 of file nsChildView.mm.

{
  return mIsPluginView;
}
- (BOOL) isRectObscuredBySubview: (NSRect)  inRect [implementation]

Definition at line 2508 of file nsChildView.mm.

                               :(NSRect)inRect
{
  unsigned int numSubviews = [[self subviews] count];
  for (unsigned int i = 0; i < numSubviews; i++)
  {
    NSRect subviewFrame = [[[self subviews] objectAtIndex:i] frame];
    if (NSContainsRect(subviewFrame, inRect))
      return YES;
  }
  
  return NO;
}
+ (static PRBool) IsSpecialRaptorKey (UInt32 macKeyCode [implementation]

Definition at line 3752 of file nsChildView.mm.

{
  PRBool  isSpecial;

  // 
  // this table is used to determine which keys are special and should not generate a charCode
  //  
  switch (macKeyCode)
  {
// modifiers. We don't get separate events for these
// yet
    case kEscapeKeyCode:        isSpecial = PR_TRUE; break;
    case kShiftKeyCode:         isSpecial = PR_TRUE; break;
    case kCommandKeyCode:       isSpecial = PR_TRUE; break;
    case kCapsLockKeyCode:      isSpecial = PR_TRUE; break;
    case kControlKeyCode:       isSpecial = PR_TRUE; break;
    case kOptionkeyCode:        isSpecial = PR_TRUE; break;
    case kClearKeyCode:         isSpecial = PR_TRUE; break;

// function keys
    case kF1KeyCode:            isSpecial = PR_TRUE; break;
    case kF2KeyCode:            isSpecial = PR_TRUE; break;
    case kF3KeyCode:            isSpecial = PR_TRUE; break;
    case kF4KeyCode:            isSpecial = PR_TRUE; break;
    case kF5KeyCode:            isSpecial = PR_TRUE; break;
    case kF6KeyCode:            isSpecial = PR_TRUE; break;
    case kF7KeyCode:            isSpecial = PR_TRUE; break;
    case kF8KeyCode:            isSpecial = PR_TRUE; break;
    case kF9KeyCode:            isSpecial = PR_TRUE; break;
    case kF10KeyCode:           isSpecial = PR_TRUE; break;
    case kF11KeyCode:           isSpecial = PR_TRUE; break;
    case kF12KeyCode:           isSpecial = PR_TRUE; break;
    case kPauseKeyCode:         isSpecial = PR_TRUE; break;
    case kScrollLockKeyCode:    isSpecial = PR_TRUE; break;
    case kPrintScreenKeyCode:   isSpecial = PR_TRUE; break;

    case kInsertKeyCode:        isSpecial = PR_TRUE; break;
    case kDeleteKeyCode:        isSpecial = PR_TRUE; break;
    case kTabKeyCode:           isSpecial = PR_TRUE; break;
    case kBackspaceKeyCode:     isSpecial = PR_TRUE; break;

    case kHomeKeyCode:          isSpecial = PR_TRUE; break; 
    case kEndKeyCode:           isSpecial = PR_TRUE; break;
    case kPageUpKeyCode:        isSpecial = PR_TRUE; break;
    case kPageDownKeyCode:      isSpecial = PR_TRUE; break;
    case kLeftArrowKeyCode:     isSpecial = PR_TRUE; break;
    case kRightArrowKeyCode:    isSpecial = PR_TRUE; break;
    case kUpArrowKeyCode:       isSpecial = PR_TRUE; break;
    case kDownArrowKeyCode:     isSpecial = PR_TRUE; break;
    case kReturnKeyCode:        isSpecial = PR_TRUE; break;
    case kEnterKeyCode:         isSpecial = PR_TRUE; break;
    case kPowerbookEnterKeyCode: isSpecial = PR_TRUE; break;

    default:                    isSpecial = PR_FALSE; break;
  }
  return isSpecial;
}

Here is the caller graph for this function:

- (void) keyDown: (NSEvent*)  theEvent [implementation]

Definition at line 3356 of file nsChildView.mm.

               :(NSEvent*)theEvent
{
  PRBool isKeyDownEventHandled = PR_TRUE;
  PRBool isKeyEventHandled = PR_FALSE;
  BOOL  isARepeat = [theEvent isARepeat];

  mCurKeyEvent = theEvent;
  
  // if we have a dead-key event, we won't get a character
  // since we have no character, there isn't any point to generating
  // a gecko event until they have dead key events
  BOOL nonDeadKeyPress = [[theEvent characters] length] > 0;
  if (!isARepeat && nonDeadKeyPress && mGeckoChild)
  {
    // Fire a key down. We'll fire key presses via -insertText:
    nsKeyEvent geckoEvent(PR_TRUE, 0, nsnull);
    geckoEvent.point.x = geckoEvent.point.y = 0;
    [self convertKeyEvent:theEvent
                  message:NS_KEY_DOWN
             toGeckoEvent:&geckoEvent];

    // XXX Maybe we should only do this when there is a plugin present.
    EventRecord macEvent;
    ConvertCocoaKeyEventToMacEvent(theEvent, macEvent);
    geckoEvent.nativeMsg = &macEvent;
    isKeyDownEventHandled = mGeckoChild->DispatchWindowEvent(geckoEvent);
  }
  
  // Check to see if we are still the first responder.
  // The key down event may have shifted the focus, in which
  // case we should not fire the key press.
  NSResponder* resp = [[self window] firstResponder];
  if (resp != (NSResponder*)self) {
#if DEBUG
    printf("We are no longer the responder. Bailing.\n");
#endif
    mCurKeyEvent = nil;
    return;
  }
    
  if (nonDeadKeyPress && mGeckoChild)
  {
    nsKeyEvent geckoEvent(PR_TRUE, 0, nsnull);
    geckoEvent.point.x = geckoEvent.point.y = 0;

    [self convertKeyEvent:theEvent
                  message:NS_KEY_PRESS
             toGeckoEvent:&geckoEvent];
    
    // if this is a non-letter keypress, or the control key is down,
    // dispatch the keydown to gecko, so that we trap delete,
    // control-letter combinations etc before Cocoa tries to use
    // them for keybindings.
    if ((!geckoEvent.isChar || geckoEvent.isControl) && !mInComposition)
    {
      // plugins need a native event, it will either be keyDown or autoKey
      EventRecord macEvent;
      ConvertCocoaKeyEventToMacEvent(theEvent, macEvent);
      geckoEvent.nativeMsg = &macEvent;
      
      isKeyEventHandled = mGeckoChild->DispatchWindowEvent(geckoEvent);
      mIgnoreDoCommand = isKeyEventHandled;
    }
  }

  [super interpretKeyEvents:[NSArray arrayWithObject:theEvent]];

  mIgnoreDoCommand = NO;
  mCurKeyEvent = nil;
}

Here is the call graph for this function:

- (void) keyUp: (NSEvent*)  theEvent [implementation]

Definition at line 3427 of file nsChildView.mm.

             :(NSEvent*)theEvent
{
  // if we don't have any characters we can't generate a keyUp event
  if (!mGeckoChild || [[theEvent characters] length] == 0)
    return;

  // Fire a key up.
  nsKeyEvent geckoEvent(PR_TRUE, 0, nsnull);
  geckoEvent.point.x = geckoEvent.point.y = 0;

  [self convertKeyEvent:theEvent
                message:NS_KEY_UP
           toGeckoEvent:&geckoEvent];

  // As an optimisation, only do this when there is a plugin present.
  EventRecord macEvent;
  ConvertCocoaKeyEventToMacEvent(theEvent, macEvent);
  geckoEvent.nativeMsg = &macEvent;

  mGeckoChild->DispatchWindowEvent(geckoEvent);
}

Here is the call graph for this function:

- (void) lockFocus [implementation]

Definition at line 2459 of file nsChildView.mm.

{
  // Set the current GrafPort to a "safe" port before calling [NSQuickDrawView lockFocus],
  // so that the NSQuickDrawView stashes a pointer to this known-good port internally.
  // It will set the port back to this port on destruction.
  SetPort(NULL);
  [super lockFocus];
}
- (NSRange) markedRange [implementation]

Definition at line 3279 of file nsChildView.mm.

{
#if DEBUG_IME
  NSLog(@"****in markedRange");
  NSLog(@" markedRange   = %d, %d", mMarkedRange.location, mMarkedRange.length);
  NSLog(@" selectedRange = %d, %d", mSelectedRange.location, mSelectedRange.length);
#endif

  if (![self hasMarkedText]) {
    return NSMakeRange(NSNotFound, 0);
  }

  return mMarkedRange;
}

Here is the call graph for this function:

- (NSMenu *) menuForEvent: (NSEvent*)  theEvent [implementation]

Definition at line 2905 of file nsChildView.mm.

                      :(NSEvent*)theEvent
{
  if ([self getIsPluginView] || !mGeckoChild)
    return nil;
  
  // Fire the context menu event into Gecko.
  nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
  [self convertEvent:theEvent message:NS_CONTEXTMENU toGeckoEvent:&geckoEvent];
  
  // send event into Gecko by going directly to the
  // the widget.
  mGeckoChild->DispatchMouseEvent(geckoEvent);
  
  // Go up our view chain to fetch the correct menu to return.
  return [self getContextMenu];
}

Here is the call graph for this function:

- (void) mouseDown: (NSEvent *)  theEvent [implementation]

Definition at line 2578 of file nsChildView.mm.

                 :(NSEvent *)theEvent
{
  // if the command and alt keys are held down, initiate hand scrolling
  if ([ChildView areHandScrollModifiers:[theEvent modifierFlags]]) {
    [self startHandScroll: theEvent];
    // needed to change the focus, among other things, since we don't
    // get to do that below.
    [super mouseDown:theEvent];
    return;                     // do not pass this mousedown event to gecko
  }

#if USE_CLICK_HOLD_CONTEXTMENU
  // fire off timer to check for click-hold after two seconds. retains |theEvent|
  [self performSelector:@selector(clickHoldCallback:) withObject:theEvent afterDelay:2.0];
#endif

  nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
  [self convertEvent:theEvent message:NS_MOUSE_LEFT_BUTTON_DOWN toGeckoEvent:&geckoEvent];
  geckoEvent.clickCount = [theEvent clickCount];
  
  NSPoint mouseLoc = [theEvent locationInWindow];
  NSPoint screenLoc = [[self window] convertBaseToScreen: mouseLoc];

  EventRecord macEvent;
  macEvent.what = mouseDown;
  macEvent.message = 0;
  macEvent.when = ::TickCount();
  GetGlobalMouse(&macEvent.where);
  macEvent.modifiers = GetCurrentKeyModifiers();
  geckoEvent.nativeMsg = &macEvent;

  // send event into Gecko by going directly to the
  // the widget.
  mGeckoChild->DispatchMouseEvent(geckoEvent);
  
  // XXX maybe call markedTextSelectionChanged:client: here?
}

Here is the call graph for this function:

- (BOOL) mouseDownCanMoveWindow [implementation]

Definition at line 2454 of file nsChildView.mm.

{
  return NO;
}
- (void) mouseDragged: (NSEvent*)  theEvent [implementation]

Definition at line 2682 of file nsChildView.mm.

                    :(NSEvent*)theEvent
{
  if (!mGeckoChild)
    return;
  // if the handscroll flag is set, steal this event
  if (mInHandScroll) {
    [self updateHandScroll:theEvent];
    return;
  }

  nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
  [self convertEvent:theEvent message:NS_MOUSE_MOVE toGeckoEvent:&geckoEvent];

  EventRecord macEvent;
  macEvent.what = nullEvent;
  macEvent.message = 0;
  macEvent.when = ::TickCount();
  GetGlobalMouse(&macEvent.where);
  macEvent.modifiers = btnState | GetCurrentKeyModifiers();
  geckoEvent.nativeMsg = &macEvent;
  
  // send event into Gecko by going directly to the
  // the widget.
  mGeckoChild->DispatchMouseEvent(geckoEvent);    

  // XXX maybe call markedTextSelectionChanged:client: here?
}

Here is the call graph for this function:

- (void) mouseEntered: (NSEvent*)  theEvent [implementation]

Definition at line 2710 of file nsChildView.mm.

                    :(NSEvent*)theEvent
{
  // checks to see if we should change to the hand cursor
  [self setHandScrollCursor:theEvent];
  
  // we need to forward mouse move events to gecko when the mouse
  // is over a gecko view
  if (mToggleMouseMoveEventWatching)
    [[self window] setAcceptsMouseMovedEvents: YES];
}

Here is the call graph for this function:

- (void) mouseExited: (NSEvent*)  theEvent [implementation]

Definition at line 2721 of file nsChildView.mm.

                   :(NSEvent*)theEvent
{
  // Gecko may have set the cursor to ibeam or link hand, or handscroll may
  // have set it to the open hand cursor. Cocoa won't call this during a drag.
  if (mGeckoChild)
    mGeckoChild->SetCursor(eCursor_standard);
   
  // no need to monitor mouse movements outside of the gecko view,
  // but make sure we are not a plugin view.
  if (mToggleMouseMoveEventWatching && ![[self superview] isKindOfClass: [ChildView class]])
    [[self window] setAcceptsMouseMovedEvents: NO];
}

Here is the call graph for this function:

- (void) mouseMoved: (NSEvent*)  theEvent [implementation]

Definition at line 2646 of file nsChildView.mm.

                  :(NSEvent*)theEvent
{
  NSView* view = [[[self window] contentView] hitTest: [theEvent locationInWindow]];
  if (view != (NSView*)self) {
    // We shouldn't handle this.  Send it to the right view.
    [view mouseMoved: theEvent];
    return;
  }
  // check if we are in a hand scroll or if the user
  // has command and alt held down; if so,  we do not want
  // gecko messing with the cursor.
  if ([ChildView  areHandScrollModifiers:[theEvent modifierFlags]])
    return;
  if (!mGeckoChild)
    return;

  nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
  [self convertEvent:theEvent message:NS_MOUSE_MOVE toGeckoEvent:&geckoEvent];

  NSPoint mouseLoc = [theEvent locationInWindow];
  NSPoint screenLoc = [[self window] convertBaseToScreen: mouseLoc];

  EventRecord macEvent;
  macEvent.what = nullEvent;
  macEvent.message = 0;
  macEvent.when = ::TickCount();
  GetGlobalMouse(&macEvent.where);
  
  macEvent.modifiers = GetCurrentKeyModifiers();
  geckoEvent.nativeMsg = &macEvent;

  // send event into Gecko by going directly to the
  // the widget.
  mGeckoChild->DispatchMouseEvent(geckoEvent);
}

Here is the call graph for this function:

- (void) mouseUp: (NSEvent *)  theEvent [implementation]

Definition at line 2616 of file nsChildView.mm.

               :(NSEvent *)theEvent
{
  if (mInHandScroll) {
    [self updateHandScroll:theEvent];
    [self stopHandScroll:theEvent];
    return;
  }
  if (!mGeckoChild)
    return;

  nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
  [self convertEvent:theEvent message:NS_MOUSE_LEFT_BUTTON_UP toGeckoEvent:&geckoEvent];
  
  NSPoint mouseLoc = [theEvent locationInWindow];
  NSPoint screenLoc = [[self window] convertBaseToScreen: mouseLoc];

  EventRecord macEvent;
  macEvent.what = mouseUp;
  macEvent.message = 0;
  macEvent.when = ::TickCount();
  GetGlobalMouse(&macEvent.where);
  macEvent.modifiers = GetCurrentKeyModifiers();
  geckoEvent.nativeMsg = &macEvent;

  // send event into Gecko by going directly to the
  // the widget.
  mGeckoChild->DispatchMouseEvent(geckoEvent);
  
}

Here is the call graph for this function:

- (void) otherMouseDown: (NSEvent *)  theEvent [implementation]

Definition at line 2782 of file nsChildView.mm.

                      :(NSEvent *)theEvent
{
  if (!mGeckoChild)
    return;

  nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
  [self convertEvent:theEvent message:NS_MOUSE_MIDDLE_BUTTON_DOWN toGeckoEvent:&geckoEvent];
  geckoEvent.clickCount = [theEvent clickCount];
  
  // send event into Gecko by going directly to the
  // the widget.
  mGeckoChild->DispatchMouseEvent(geckoEvent);
  
} // otherMouseDown

Here is the call graph for this function:

- (void) otherMouseUp: (NSEvent *)  theEvent [implementation]

Definition at line 2798 of file nsChildView.mm.

                    :(NSEvent *)theEvent
{
  if (!mGeckoChild)
    return;

  nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
  [self convertEvent:theEvent message:NS_MOUSE_MIDDLE_BUTTON_UP toGeckoEvent:&geckoEvent];
  
  // send event into Gecko by going directly to the
  // the widget.
  mGeckoChild->DispatchMouseEvent(geckoEvent);
  
} // mouseUp

Here is the call graph for this function:

- (void) processPendingRedraws [implementation]

Definition at line 2184 of file nsChildView.mm.

{
  if (mPendingFullDisplay) {
    [self setNeedsDisplay:YES];
  }
  else {
    unsigned int count = [mPendingDirtyRects count];
    for (unsigned int i = 0; i < count; ++i) {
      [self setNeedsDisplayInRect:[[mPendingDirtyRects objectAtIndex:i] rectValue]];
    }
  }
  mPendingFullDisplay = NO;
  [mPendingDirtyRects release];
  mPendingDirtyRects = nil;
}
- (BOOL) resignFirstResponder [implementation]

Definition at line 3508 of file nsChildView.mm.

{
  if (!mGeckoChild) return NO;   // we've been destroyed

  nsFocusEvent event(PR_TRUE, NS_LOSTFOCUS, mGeckoChild);
  mGeckoChild->DispatchWindowEvent(event);

  return [super resignFirstResponder];
}

Here is the call graph for this function:

- (void) rightMouseDown: (NSEvent *)  theEvent [implementation]

Definition at line 2734 of file nsChildView.mm.

                      :(NSEvent *)theEvent
{
  if (!mGeckoChild)
    [super rightMouseDown:theEvent];

  // The right mouse went down.  Fire off a right mouse down and
  // then send the context menu event.
  nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
  [self convertEvent:theEvent message:NS_MOUSE_RIGHT_BUTTON_DOWN toGeckoEvent:&geckoEvent];

  // plugins need a native event here
  EventRecord macEvent;
  macEvent.what = mouseDown;
  macEvent.message = 0;
  macEvent.when = ::TickCount();
  GetGlobalMouse(&macEvent.where);
  macEvent.modifiers = controlKey;  // fake a context menu click
  geckoEvent.nativeMsg = &macEvent;

  geckoEvent.clickCount = [theEvent clickCount];
  PRBool handled = mGeckoChild->DispatchMouseEvent(geckoEvent);
  if (!handled)
    [super rightMouseDown:theEvent];    // let the superview do context menu stuff
}

Here is the call graph for this function:

- (void) rightMouseUp: (NSEvent *)  theEvent [implementation]

Definition at line 2759 of file nsChildView.mm.

                    :(NSEvent *)theEvent
{
  if (!mGeckoChild)
    [super rightMouseUp:theEvent];

  nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
  [self convertEvent:theEvent message:NS_MOUSE_RIGHT_BUTTON_UP toGeckoEvent:&geckoEvent];

  // plugins need a native event here
  EventRecord macEvent;
  macEvent.what = mouseUp;
  macEvent.message = 0;
  macEvent.when = ::TickCount();
  GetGlobalMouse(&macEvent.where);
  macEvent.modifiers = controlKey;  // fake a context menu click
  geckoEvent.nativeMsg = &macEvent;

  geckoEvent.clickCount = [theEvent clickCount];
  PRBool handled = mGeckoChild->DispatchMouseEvent(geckoEvent);
  if (!handled)
    [super rightMouseUp:theEvent];
}

Here is the call graph for this function:

- (void) scrollRect: (NSRect)  aRect
by: (NSSize)  offset 
[implementation]

Definition at line 2439 of file nsChildView.mm.

                  :(NSRect)aRect by:(NSSize)offset
{
  // Update any pending dirty rects to reflect the new scroll position
  if (mPendingDirtyRects) {
    unsigned int count = [mPendingDirtyRects count];
    for (unsigned int i = 0; i < count; ++i) {
      NSRect oldRect = [[mPendingDirtyRects objectAtIndex:i] rectValue];
      NSRect newRect = NSOffsetRect(oldRect, offset.width, offset.height);
      [mPendingDirtyRects replaceObjectAtIndex:i
                                    withObject:[NSValue valueWithRect:newRect]];
    }
  }
  [super scrollRect:aRect by:offset];
}
- (void) scrollWheel: (NSEvent*)  theEvent [implementation]

Definition at line 2895 of file nsChildView.mm.

                  :(NSEvent*)theEvent
{
  // It's possible for a single NSScrollWheel event to carry both useful
  // deltaX and deltaY, for example, when the "wheel" is a trackpad.
  // NSMouseScrollEvent can only carry one axis at a time, so the system
  // event will be split into two Gecko events if necessary.
  [self scrollWheel:theEvent forAxis:nsMouseScrollEvent::kIsVertical];
  [self scrollWheel:theEvent forAxis:nsMouseScrollEvent::kIsHorizontal];
}
- (void) scrollWheel: (NSEvent*)  theEvent
forAxis: (enum nsMouseScrollEvent::nsMouseScrollFlags inAxis 
[implementation]

Definition at line 2817 of file nsChildView.mm.

                  :(NSEvent*)theEvent forAxis:(enum nsMouseScrollEvent::nsMouseScrollFlags)inAxis
{
  if (!mGeckoChild)
    return;

  float scrollDelta;

  if (inAxis & nsMouseScrollEvent::kIsVertical)
    scrollDelta = -[theEvent deltaY];
  else if (inAxis & nsMouseScrollEvent::kIsHorizontal)
    scrollDelta = -[theEvent deltaX];
  else
    // Caller screwed up
    return;

  if (scrollDelta == 0)
    // No sense in firing off a Gecko event.  Note that as of 10.4 Tiger,
    // a single NSScrollWheel event might result in deltaX = deltaY = 0.
    return;

  nsMouseScrollEvent geckoEvent(PR_TRUE, 0, nsnull);
  [self convertEvent:theEvent message:NS_MOUSE_SCROLL toGeckoEvent:&geckoEvent];
  geckoEvent.scrollFlags |= inAxis;

  // Gecko only understands how to scroll by an integer value.  Using floor
  // and ceil is better than truncating the fraction, especially when
  // |delta| < 1.
  if (scrollDelta < 0)
    geckoEvent.delta = (PRInt32)floorf(scrollDelta);
  else
    geckoEvent.delta = (PRInt32)ceilf(scrollDelta);

  mGeckoChild->DispatchWindowEvent(geckoEvent);

  // dispatch scroll wheel carbon event for plugins
  {
    EventRef theEvent;
    OSStatus err = ::MacCreateEvent(NULL,
                          kEventClassMouse,
                          kEventMouseWheelMoved,
                          TicksToEventTime(TickCount()),
                          kEventAttributeUserEvent,
                          &theEvent);
    if (err == noErr)
    {
      EventMouseWheelAxis axis;
      if (inAxis & nsMouseScrollEvent::kIsVertical)
        axis = kEventMouseWheelAxisY;
      else if (inAxis & nsMouseScrollEvent::kIsHorizontal)
        axis = kEventMouseWheelAxisX;
      
      SetEventParameter(theEvent,
                            kEventParamMouseWheelAxis,
                            typeMouseWheelAxis,
                            sizeof(EventMouseWheelAxis),
                            &axis);

      SInt32 delta = (SInt32)-geckoEvent.delta;
      SetEventParameter(theEvent,
                            kEventParamMouseWheelDelta,
                            typeLongInteger,
                            sizeof(SInt32),
                            &delta);

      Point mouseLoc;
      GetGlobalMouse(&mouseLoc);
      SetEventParameter(theEvent,
                            kEventParamMouseLocation,
                            typeQDPoint,
                            sizeof(Point),
                            &mouseLoc);
      
      SendEventToWindow(theEvent, (WindowRef)[[self window] windowRef]);
      ReleaseEvent(theEvent);
    }
  }
}

Here is the call graph for this function:

- (NSRange) selectedRange [implementation]

Definition at line 3294 of file nsChildView.mm.

{
#if DEBUG_IME
  NSLog(@"****in selectedRange");
  NSLog(@" markedRange   = %d, %d", mMarkedRange.location, mMarkedRange.length);
  NSLog(@" selectedRange = %d, %d", mSelectedRange.location, mSelectedRange.length);
#endif

  return mSelectedRange;
}
- (nsRect) sendCompositionEvent: (PRInt32 aEventType [implementation]

Definition at line 3049 of file nsChildView.mm.

                              :(PRInt32) aEventType
{
  if (!mGeckoChild)
    return nsRect(0, 0, 0, 0);

#ifdef DEBUG_IME
  NSLog(@"****in sendCompositionEvent; type = %d", aEventType);
#endif

  // static void init_composition_event( *aEvent, int aType)
  nsCompositionEvent event(PR_TRUE, aEventType, mGeckoChild);
  event.time = PR_IntervalNow();
  mGeckoChild->DispatchWindowEvent(event);
  return event.theReply.mCursorPosition;
}

Here is the call graph for this function:

Here is the caller graph for this function:

- (void) sendTextEvent: (PRUnichar*)  aBuffer
attributedString: (NSAttributedString*)  aString
selectedRange: (NSRange)  selRange
markedRange: (NSRange)  markRange
doCommit: (BOOL doCommit 
[implementation]

Definition at line 3065 of file nsChildView.mm.

                     :(PRUnichar*) aBuffer 
                      attributedString:(NSAttributedString*) aString  
                      selectedRange:(NSRange) selRange 
                      markedRange:(NSRange) markRange
                      doCommit:(BOOL) doCommit
{
  if (!mGeckoChild)
    return;

#ifdef DEBUG_IME
  NSLog(@"****in sendTextEvent; string = '%@'", aString);
  NSLog(@" markRange = %d, %d;  selRange = %d, %d", markRange.location, markRange.length, selRange.location, selRange.length);
#endif

  nsTextEvent textEvent(PR_TRUE, NS_TEXT_TEXT, mGeckoChild);
  textEvent.time = PR_IntervalNow();
  textEvent.theText = aBuffer;
  if (!doCommit)
    FillTextRangeInTextEvent(&textEvent, aString, markRange, selRange);

  mGeckoChild->DispatchWindowEvent(textEvent);
  if ( textEvent.rangeArray )
    delete [] textEvent.rangeArray;
}

Here is the call graph for this function:

Here is the caller graph for this function:

- (void) setFrame: (NSRect)  frameRect [implementation]

Definition at line 2332 of file nsChildView.mm.

                :(NSRect)frameRect
{  
  [super setFrame:frameRect];
  if (mMouseEnterExitTag)
    [self removeTrackingRect:mMouseEnterExitTag];

  if ([self window])
    mMouseEnterExitTag = [self addTrackingRect:[self bounds] owner:self
                                      userData:nil assumeInside: [[self window]
                                      acceptsMouseMovedEvents]];
}
- (void) setHandScrollCursor: (NSEvent*)  theEvent [implementation]

Definition at line 2293 of file nsChildView.mm.

                            :(NSEvent*)theEvent
{
  if (!mGeckoChild)
    return;

  BOOL inMouseView = NO;

  // check to see if the user has hand scroll modifiers held down; if so, 
  // find out if the cursor is in an ChildView
  if ([ChildView areHandScrollModifiers:[theEvent modifierFlags]]) {
    NSPoint pointInWindow = [[self window] mouseLocationOutsideOfEventStream];

    NSView* mouseView = [[[self window] contentView] hitTest:pointInWindow];
    inMouseView = (mouseView != nil && [mouseView isMemberOfClass:[ChildView class]]);   
  }
  if (inMouseView) {
      mGeckoChild->SetCursor(eCursor_grab);
  } else {
    nsCursor cursor = mGeckoChild->GetCursor();
    if (!mInHandScroll) {
      if (cursor == eCursor_grab || cursor == eCursor_grabbing)
        mGeckoChild->SetCursor(eCursor_standard);
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

- (void) setIsPluginView: (BOOL aIsPlugin [implementation]

Definition at line 2371 of file nsChildView.mm.

                      :(BOOL)aIsPlugin
{
  mIsPluginView = aIsPlugin;
}
- (void) setMarkedText: (id aString
selectedRange: (NSRange)  selRange 
[implementation]

Definition at line 3175 of file nsChildView.mm.

                      :(id)aString selectedRange:(NSRange)selRange
{
#if DEBUG_IME 
  NSLog(@"****in setMarkedText location: %d, length: %d", selRange.location, selRange.length);
  NSLog(@" markRange = %d, %d;  selRange = %d, %d", mMarkedRange.location, mMarkedRange.length, mSelectedRange.location, mSelectedRange.length);
  NSLog(@" aString = '%@'", aString);
#endif

  if ( ![aString isKindOfClass:[NSAttributedString class]] )
    aString = [[[NSAttributedString alloc] initWithString:aString] autorelease];

  mSelectedRange = selRange;

  NSMutableAttributedString *mutableAttribStr = aString;
  NSString *tmpStr = [mutableAttribStr string];
  unsigned int len = [tmpStr length];
  PRUnichar buffer[MAX_BUFFER_SIZE];
  PRUnichar *bufPtr = (len >= MAX_BUFFER_SIZE) ? new PRUnichar[len + 1] : buffer;
  [tmpStr getCharacters: bufPtr];
  bufPtr[len] = (PRUnichar)'\0';

#if DEBUG_IME 
  printf("****in setMarkedText, len = %d, text = ", len);
  PRUint32 n = 0;
  PRUint32 maxlen = len > 12 ? 12 : len;
  for (PRUnichar *a = bufPtr; (*a != (PRUnichar)'\0') && n<maxlen; a++, n++) printf((*a&0xff80) ? "\\u%4X" : "%c", *a); 
  printf("\n");
#endif

  mMarkedRange.location = 0;
  mMarkedRange.length = len;

  if (!mInComposition)
  {
    [self sendCompositionEvent:NS_COMPOSITION_START];
    mInComposition = YES;
  }

  [self sendTextEvent:bufPtr attributedString:aString
                             selectedRange:selRange
                             markedRange:mMarkedRange
                             doCommit:NO];

  if (mInComposition && len == 0)
    [self unmarkText];
  
  if (bufPtr != buffer)
    delete[] bufPtr;
}

Here is the call graph for this function:

- (void) setNativeWindow: (NSWindow*)  aWindow [implementation]

Reimplemented from <mozView>.

Definition at line 2160 of file nsChildView.mm.

                       :(NSWindow*)aWindow
{
  mWindow = aWindow;
}
- (void) setNeedsPendingDisplay [implementation]

Reimplemented from <mozView>.

Definition at line 2165 of file nsChildView.mm.

{
  mPendingFullDisplay = YES;
  [self performSelector:@selector(processPendingRedraws) withObject:nil afterDelay:0];
}
- (void) setNeedsPendingDisplayInRect: (NSRect)  invalidRect [implementation]

Reimplemented from <mozView>.

Definition at line 2171 of file nsChildView.mm.

                                    :(NSRect)invalidRect
{
  if (!mPendingDirtyRects)
    mPendingDirtyRects = [[NSMutableArray alloc] initWithCapacity:1];
  [mPendingDirtyRects addObject:[NSValue valueWithRect:invalidRect]];
  [self performSelector:@selector(processPendingRedraws) withObject:nil afterDelay:0];
}
- (void) startHandScroll: (NSEvent*)  theEvent [implementation]

Definition at line 2242 of file nsChildView.mm.

                        :(NSEvent*)theEvent
{
  if (!mGeckoChild)
    return;

  mHandScrollStartMouseLoc = [[self window] convertBaseToScreen: [theEvent locationInWindow]];

  nsIScrollableView* aScrollableView = [self getScrollableView]; 

  // if we succeeded in getting aScrollableView
  if (aScrollableView) {
    aScrollableView->GetScrollPosition(mHandScrollStartScrollX, mHandScrollStartScrollY);
    mGeckoChild->SetCursor(eCursor_grabbing);
    mInHandScroll = TRUE;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

- (void) stopHandScroll: (NSEvent*)  theEvent [implementation]

Definition at line 2320 of file nsChildView.mm.

                       :(NSEvent*)theEvent
{
  mInHandScroll = FALSE;
  [self setHandScrollCursor:theEvent];
}

Here is the call graph for this function:

Here is the caller graph for this function:

- (void) unmarkText [implementation]

Definition at line 3225 of file nsChildView.mm.

{
#if DEBUG_IME
  NSLog(@"****in unmarkText");
  NSLog(@" markedRange   = %d, %d", mMarkedRange.location, mMarkedRange.length);
  NSLog(@" selectedRange = %d, %d", mSelectedRange.location, mSelectedRange.length);
#endif

  mSelectedRange = mMarkedRange = NSMakeRange(NSNotFound, 0);
  if (mInComposition) {
    [self sendCompositionEvent: NS_COMPOSITION_END];
    mInComposition = NO;  // brade: do we need to send an end composition event?
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

- (void) updateHandScroll: (NSEvent*)  theEvent [implementation]

Definition at line 2260 of file nsChildView.mm.

                         :(NSEvent*)theEvent
{
  nsIScrollableView* aScrollableView = [self getScrollableView];
  if (!aScrollableView || !mGeckoChild)
    return;
  
  NSPoint newMouseLoc = [[self window] convertBaseToScreen: [theEvent locationInWindow]];

  PRInt32 deltaX = (PRInt32)(mHandScrollStartMouseLoc.x - newMouseLoc.x);
  PRInt32 deltaY = (PRInt32)(newMouseLoc.y - mHandScrollStartMouseLoc.y);

  // convert to the nsIView coordinates
  float mPixelsToTwips = 1.0;
  mPixelsToTwips = mGeckoChild->GetDeviceContext()->DevUnitsToAppUnits();
  nscoord newX = mHandScrollStartScrollX +
    NSIntPixelsToTwips(deltaX, mPixelsToTwips);
  nscoord newY = mHandScrollStartScrollY +
    NSIntPixelsToTwips(deltaY, mPixelsToTwips);
  aScrollableView->ScrollTo(newX, newY, NS_VMREFRESH_IMMEDIATE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

- (NSArray *) validAttributesForMarkedText [implementation]

Definition at line 3339 of file nsChildView.mm.

{
#if DEBUG_IME
  NSLog(@"****in validAttributesForMarkedText");
  NSLog(@" markRange = %d, %d;  selectRange = %d, %d", mMarkedRange.location, mMarkedRange.length, mSelectedRange.location, mSelectedRange.length);
#endif

  return [NSArray array]; // empty array; we don't support any attributes right now
}
- (void) viewDidEndLiveResize [implementation]

Definition at line 2431 of file nsChildView.mm.

{
  if (mGeckoChild && mIsPluginView)
    mGeckoChild->LiveResizeEnded();

  [super viewDidEndLiveResize];
}

Here is the call graph for this function:

- (void) viewDidMoveToWindow [implementation]

Definition at line 2413 of file nsChildView.mm.

{
  if ([self window])
    mMouseEnterExitTag = [self addTrackingRect:[self bounds] owner:self
                                      userData:nil assumeInside: [[self window]
                                      acceptsMouseMovedEvents]];

  [super viewDidMoveToWindow];
}

Definition at line 3518 of file nsChildView.mm.

{
  if (!mGeckoChild)
    return;   // we've been destroyed (paranoia)
  
  // check to see if the window implements the mozWindow protocol. This
  // allows embedders to avoid re-entrant calls to -makeKeyAndOrderFront,
  // which can happen because these activate/focus calls propagate out
  // to the embedder via nsIEmbeddingSiteWindow::SetFocus().
  BOOL isMozWindow = [[self window] respondsToSelector:@selector(setSuppressMakeKeyFront:)];
  if (isMozWindow)
    [[self window] setSuppressMakeKeyFront:YES];

  nsFocusEvent focusEvent(PR_TRUE, NS_GOTFOCUS, mGeckoChild);
  mGeckoChild->DispatchWindowEvent(focusEvent);

  nsFocusEvent activateEvent(PR_TRUE, NS_ACTIVATE, mGeckoChild);
  mGeckoChild->DispatchWindowEvent(activateEvent);

  if (isMozWindow)
    [[self window] setSuppressMakeKeyFront:NO];
}

Here is the call graph for this function:

Definition at line 3541 of file nsChildView.mm.

{
  if (!mGeckoChild)
    return;   // we've been destroyed
  
  nsFocusEvent deactivateEvent(PR_TRUE, NS_DEACTIVATE, mGeckoChild);
  mGeckoChild->DispatchWindowEvent(deactivateEvent);

  nsFocusEvent unfocusEvent(PR_TRUE, NS_LOSTFOCUS, mGeckoChild);
  mGeckoChild->DispatchWindowEvent(unfocusEvent);
}

Here is the call graph for this function:

- (void) viewWillMoveToWindow: (NSWindow *)  newWindow [implementation]

Definition at line 2405 of file nsChildView.mm.

                            :(NSWindow *)newWindow
{
  if (mMouseEnterExitTag)
    [self removeTrackingRect:mMouseEnterExitTag];

  [super viewWillMoveToWindow:newWindow];
}
- (void) viewWillStartLiveResize [implementation]

Definition at line 2423 of file nsChildView.mm.

{
  if (mGeckoChild && mIsPluginView)
    mGeckoChild->LiveResizeStarted();
  
  [super viewWillStartLiveResize];
}

Here is the call graph for this function:

- (BOOL) wantsDefaultClipping [implementation]

Definition at line 2541 of file nsChildView.mm.

{
  return NO;
}
- (nsIWidget *) widget [implementation]

Reimplemented from <mozView>.

Definition at line 2133 of file nsChildView.mm.

Here is the caller graph for this function:

- (void) widgetDestroyed [implementation]

Reimplemented from <mozView>.

Definition at line 2121 of file nsChildView.mm.


Member Data Documentation

- (NSEvent*) mCurKeyEvent [private]

Definition at line 92 of file nsChildView.h.

- (nsIEventSink*) mEventSink [private]

Definition at line 84 of file nsChildView.h.

- (nsChildView*) mGeckoChild [private]

Definition at line 81 of file nsChildView.h.

- (NSPoint) mHandScrollStartMouseLoc [private]

Definition at line 104 of file nsChildView.h.

Definition at line 105 of file nsChildView.h.

Definition at line 105 of file nsChildView.h.

- (BOOL) mIgnoreDoCommand [private]

Definition at line 98 of file nsChildView.h.

- (BOOL) mInComposition [private]

Definition at line 97 of file nsChildView.h.

- (BOOL) mInHandScroll [private]

Definition at line 102 of file nsChildView.h.

- (BOOL) mIsPluginView [private]

Definition at line 90 of file nsChildView.h.

Definition at line 111 of file nsChildView.h.

- (NSRange) mMarkedRange [private]

Definition at line 95 of file nsChildView.h.

- (NSTrackingRectTag) mMouseEnterExitTag [private]

Definition at line 87 of file nsChildView.h.

- (NSMutableArray*) mPendingDirtyRects [private]

Definition at line 108 of file nsChildView.h.

- (BOOL) mPendingFullDisplay [private]

Definition at line 109 of file nsChildView.h.

- (NSRange) mSelectedRange [private]

Definition at line 96 of file nsChildView.h.

Definition at line 100 of file nsChildView.h.

- (NSWindow*) mWindow [private]

Definition at line 77 of file nsChildView.h.


The documentation for this class was generated from the following files: