Re: Painting With the Metal Texture (And Related Random Problems)
Re: Painting With the Metal Texture (And Related Random Problems)
- Subject: Re: Painting With the Metal Texture (And Related Random Problems)
- From: Henry McGilton <email@hidden>
- Date: Fri, 18 Apr 2003 14:44:37 -0700
On Friday, April 18, 2003, at 05:26 AM, Finlay Dobbie wrote:
On Thursday, April 17, 2003, at 02:05 am, Henry McGilton wrote:
How does one go about painting a view with the brushed metal
texture?
Why would one need to? Just set your window to "Textured" and then any
area you don't draw (or draw using the clear color, possibly the
window background color(?)) from your view will be brushed.
-- Finlay
Because one wishes to do so, for a variety of reasons . . .
But even though your response did not answer my question, it
led me to conduct some small experiments that have raised
other issues.
In all these trials, I am programmatically creating windows
and their associated views.
So I did as you suggested --- created a window whose style
mask is thus:
styleMask: (NSBorderlessWindowMask | NSTexturedBackgroundWindowMask)
Now, for a variety of reasons, I need to be aware of when the
window is being moved. As far as I can tell, with a Borderless
Window, the window's delegate never sees the windowWillMove
notification; the window's delegate receives only windowDidMove
notification(s) (plural, as in many of them).
The documentation is unclear, in the sense that one must read
between the lines and try to guess what the intention was and what
the behaviour might be.
I decided that the ideal behaviour would be if the delegate received
a windowWillMove notification at the time that the window was
about to start moving, and would receive a windowDidMove
notification when the window stopped moving.
Unfortunately, the above ideal appears not to be the case.
So I then created the window with the style mask thus:
styleMask: (NSTitledWindowMask | NSTexturedBackgroundWindowMask)
Now, the window's delegate *does* see the windowWillMove notification
only if the mouse goes down in the title bar. And as in the case
above, there are an indeterminate number of windowDidMove
notifications (but with a determinate lower limit of one).
So, one hopes that one or more of the wizards at Apple are
reading this and can shed some light on the behaviour.
Best Wishes to All,
........ Henry
===============================+============================
Henry McGilton | Trilithon Software
Boulevardier, Java Composer | Seroia Research
-------------------------------+----------------------------
mailto:email@hidden |
http://www.trilithon.com
===============================+============================
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.