• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSScrollView bug or misunderstood behavior?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScrollView bug or misunderstood behavior?


  • Subject: Re: NSScrollView bug or misunderstood behavior?
  • From: Ivan Kourtev <email@hidden>
  • Date: Fri, 17 Nov 2006 00:47:07 -0500

A while ago I asked a question about how to overlay more than one layer of visual information in a view for performance reasons -- after looking at the suggestions I settled on using transparent child windows layered on top of my app's document window. The current architecture from bottom to top is:

A) a normal document window with a custom view in it
B) a transparent child window above containing a custom view in a scrollview
C) another transparent child window above with a custom view


The idea is that the middle window (B) contains the app's view that changes most often. What's drawn in this view is "sandwiched" between the rarely changing content of the custom views in windows (A) and (C).

The problem is that the scrollers in the scroll view in the middle window (B) -- although perfectly working -- are colorless (don't have the blue pulsating aqua behavior) and I cannot figure out how to fix this? Is it because the child window (created with a NSBorderlessWindowMask) is not the main window?

Can anyone suggest a way to work around this?

Thanks,

-- ivan


On Nov 11, 2006, at 5:40 PM, Ivan Kourtev wrote:

On Nov 11, 2006, at 3:01 PM, Erik Buck wrote:

2) Use an overlay window (child window): Let the Window Server do the work for you by using an additional window and therefore an additional backing store. Put whatever transparent drawing you want in a child window that is layered correctly. The Window Server will composite from both layered windows to produce the final result in the frame buffer. You can have a transparent document view layered above the child window or visa versa. It's all good to the Window Server. I use this technique to layer Cocoa controls over pure OpenGL drawing all the time.

I did several versions of this and was able to get them to work nicely for stuff above the main drawing in the document view -- I am using an overlay transparent view (a subview of my custom view) all the time. In your suggestion above, if I create a child window and order it below the window with the document view, then how will I make the content of this child window seen through the document view (enclosed in a scroll view) in the main window? Even if the scroll view doesn't draw its background, wouldn't the main window (above the child window) be in the way? I think this would be the most attractive option for me, if it can be made to work.



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: NSScrollView bug or misunderstood behavior? (From: Erik Buck <email@hidden>)
 >Re: NSScrollView bug or misunderstood behavior? (From: Ivan Kourtev <email@hidden>)

  • Prev by Date: Re: Filtering files in NSOpenPanel that NSAppleScript can run
  • Next by Date: Re: Is willChangeValueForKey: always needed?
  • Previous by thread: Re: NSScrollView bug or misunderstood behavior?
  • Next by thread: Modify view animation while running
  • Index(es):
    • Date
    • Thread