Re: A very customized window

2011-04-19 Thread eveningnick eveningnick
Thanks a lot for detailed response!
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: A very customized window

2011-04-16 Thread Thomas Davie

On 16 Apr 2011, at 13:44, eveningnick eveningnick wrote:

> Basically i need this, to make my application look as similar as
> possible to my Windows version.

A truely terrible idea!

Why on earth do you think Mac users use Macs?  Don't you think if they wanted 
everything to look and behave like windows they would just use windows?

Bob

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: A very customized window

2011-04-16 Thread Ken Thomases
On Apr 16, 2011, at 4:57 PM, eveningnick eveningnick wrote:

> Could you give me a hint how did QuickTime Player developers manage to
> display a window the way it looks now? Specifically i can't
> understand, how they made the "Movie control" toolbar, that floats
> only within the "movie window"?

At a guess, they are using Core Animation layers.  They are probably manually 
repositioning the movie control's layer (or layer-backed view) manually in 
response to the mouse-dragging events, just as you would to reposition the 
window.


> Reading through NSOpenGLView documentation, i found the note that this
> view can't contain subviews. Though i am pretty sure the "movie view"
> is NSOpenGLView (am i wrong here?). Do they display an another
> "control" window somehow in an "always on top of the NSOpenGLView"
> manner?

Core Animation layers can contain OpenGL rendering while still permitting other 
layers on top.  For example, see the LayerBackedOpenGLView sample code:
http://developer.apple.com/library/mac/#samplecode/LayerBackedOpenGLView/

Alternatively, you can use a non-NSOpenGLView-derived view, backed by a 
CAOpenGLLayer (or hosting a layer hierarchy that includes one).  See the 
CALayerEssentials sample code:
http://developer.apple.com/library/mac/#samplecode/CALayerEssentials/


> I am wondering, why is NSOpenGLView considered to be the preferred way
> to display a set of images? Why is every image operation revolving
> around OpenGL? I understand that eventually it all comes through the
> videoadapter, but what if i just display an RGB picture that i have in
> an RGB buffer (CVImageBufferRef). Will OpenGL give me some benefits
> just for rendering it on the view against drawing image onto something
> like "NSImageView"?

This is outside my area of expertise, but I'm not sure it's entirely true that 
OpenGL is _the_ preferred way to display sequences of images.  I imagine that 
QTKit can do the same sort of thing quite handily. ;)  And, of course, for 
simple animations, regular old Cocoa image drawing may suffice.  (That doesn't 
necessarily imply the use of NSImageView.  You can draw an NSImage from within 
the -drawRect: of any custom NSView class, for example.)

The advantage of OpenGL is presumably performance gained from asynchrony -- 
being able to prepare a next frame for display while the GPU is working on 
displaying the current frame.

Regards,
Ken

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: A very customized window

2011-04-16 Thread Graham Cox

On 16/04/2011, at 10:44 PM, eveningnick eveningnick wrote:

> Basically i need this, to make my application look as similar as
> possible to my Windows version.


Windows users use Windows. Mac users use Mac. And rarely the twain shall meet.

--Graham


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: A very customized window

2011-04-16 Thread eveningnick eveningnick
Hi Ken,
first thank you for answering this question and previous times. I am
just very unfamiliar about what can i do and what i can't drowning in
documentation that's why i'm asking so many times. I managed to
display the "funky window", but the events were my problem. Thanks a
lot for the links.

May i bother you once again with my questions?. :-)
Could you give me a hint how did QuickTime Player developers manage to
display a window the way it looks now? Specifically i can't
understand, how they made the "Movie control" toolbar, that floats
only within the "movie window"?

Reading through NSOpenGLView documentation, i found the note that this
view can't contain subviews. Though i am pretty sure the "movie view"
is NSOpenGLView (am i wrong here?). Do they display an another
"control" window somehow in an "always on top of the NSOpenGLView"
manner?

And one more question. Maybe i should ask that in OpenGL mailing list?
Although i guess it sounds so "basic" that developers there won't even
answer it...
I am wondering, why is NSOpenGLView considered to be the preferred way
to display a set of images? Why is every image operation revolving
around OpenGL? I understand that eventually it all comes through the
videoadapter, but what if i just display an RGB picture that i have in
an RGB buffer (CVImageBufferRef). Will OpenGL give me some benefits
just for rendering it on the view against drawing image onto something
like "NSImageView"?

Sorry if the questions seem like i haven't read anything. I have, just
now trying to put it all together in one big picture.

Thanks!
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: A very customized window

2011-04-16 Thread eveningnick eveningnick
>While what you are asking for does not sound patently unreasonable, this last 
>sentence should >almost never be the reason to make a particular design 
>decision, especially when it comes to >deciding to implement non-standard 
>controls, etc.

Your statement made me think about redesigning some elements. Surely i
will try to make it the less irritating possible for the Mac users :-)
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: A very customized window

2011-04-16 Thread Conrad Shultz
On Apr 16, 2011, at 5:44, eveningnick eveningnick  wrote:

> How could i do it, if it's possible at all? And if not, maybe i could
> implement something very close using Cocoa facilities?
> Basically i need this, to make my application look as similar as
> possible to my Windows version.

While what you are asking for does not sound patently unreasonable, this last 
sentence should almost never be the reason to make a particular design 
decision, especially when it comes to deciding to implement non-standard 
controls, etc. 

OS X has its way of doing things that should be heeded when possible in your 
application. Again, I'm not saying that having a fully resizable window isn't 
the best thing for your application, but please decide based on a careful and 
informed human interface assessment.

--
Conrad Shultz
www.synthetiqsolutions.com___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: A very customized window

2011-04-16 Thread Ken Thomases
On Apr 16, 2011, at 7:44 AM, eveningnick eveningnick wrote:

> Is it possible to resize a "custom" title-less window using any of
> it's 4 corners?
> 
> I want to display a window with a hole inside (A window which looks
> like a frame), and let the user to resize this frame using any of the
> 4 boundaries of such a frame.
> 
> Also i am wondering, if i could let the user drag such a "title-less"
> window clicking on the 'fake' title bar?

Sure.  Just handle the mouseDown:, mouseDragged:, and mouseUp: messages, 
adjusting the frame as appropriate.  NSWindow inherits from NSResponder.  See 
the discussion of these techniques in the documentation:
http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/HandlingMouseEvents/HandlingMouseEvents.html#//apple_ref/doc/uid/1060i-CH6-SW18

See Apple's RoundTransparentWindow sample code for an example.
http://developer.apple.com/library/mac/#samplecode/RoundTransparentWindow/

Also the FunkyOverlayWindow sample code:
http://developer.apple.com/library/mac/#samplecode/FunkyOverlayWindow/


> When the user clicks "in the hole" of the window - inside the frame,
> the click "goes" to the desktop or another window which happened to be
> below?

Yes.  You've asked this repeatedly and been given the answer.  Create a 
borderless window with a transparent interior.  The same samples illustrate 
this, too.

Regards,
Ken

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


A very customized window

2011-04-16 Thread eveningnick eveningnick
Hi
Is it possible to resize a "custom" title-less window using any of
it's 4 corners?

I want to display a window with a hole inside (A window which looks
like a frame), and let the user to resize this frame using any of the
4 boundaries of such a frame.

Also i am wondering, if i could let the user drag such a "title-less"
window clicking on the 'fake' title bar?

When the user clicks "in the hole" of the window - inside the frame,
the click "goes" to the desktop or another window which happened to be
below?

How could i do it, if it's possible at all? And if not, maybe i could
implement something very close using Cocoa facilities?
Basically i need this, to make my application look as similar as
possible to my Windows version.
Thanks a lot!
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com