Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Interface and background under OS X (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: ImageWell Must Have PICT?
Next thread: Not being a Windows resource hog


Re: Sprite Collisions   -   Joseph J. Strout
  Interface and background under OS X   -   Dominik Fusina - The Captain
   Re: Interface and background under OS X   -   Joseph J. Strout
    Re: Interface and background under OS X   -   Dominik Fusina - The Captain
     Re: Interface and background under OS X   -   James Sentman
      Re: Interface and background under OS X   -   Seth Willits
     Re: Interface and background under OS X   -   Joseph J. Strout
      Re: Interface and background under OS X   -   Seth Willits
     Re: Interface and background under OS X   -   James Sentman
    Re: Interface and background under OS X   -   James Sentman

Interface and background under OS X
Date: 30.07.02 17:30 (Tue, 30 Jul 2002 18:30:07 +0200)
From: Dominik Fusina - The Captain
Hi,

Between MacOS 9 and X, there's a big difference about the interface
apparence : buttons, bevel, arrow, etc... have - on OS9 and < - a
transparent background. If you have a colored background, the integration is
nice.
But under OS X, the background is by default the system background (white
with horizontal grey lines).

is it possible to have transparent buttons ???? And have a nice graphic
integration ? (it will be cool) (((-:
Or perhaps, is it possible to create CUSTOM button ??

Dominik Fusina
Captain of NEMO



---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Interface and background under OS X
Date: 30.07.02 17:44 (Tue, 30 Jul 2002 09:44:08 -0700)
From: Joseph J. Strout
At 6:30 PM +0200 7/30/02, Dominik Fusina - The Captain wrote:

>But under OS X, the background is by default the system background (white
>with horizontal grey lines).

Right (though you can also display controls correctly over a solid
window background color).

The current version of Mac OS X does not support controls over a
complex background such as a picture. Future versions of OS X
probably will, and we will then be able to build that capability into
RB.

>Or perhaps, is it possible to create CUSTOM button ??

Certainly, you can draw whatever you want (and interact with the
mouse and keyboard as you like) using a Canvas.

Cheers,
- Joe

Re: Interface and background under OS X
Date: 30.07.02 18:13 (Tue, 30 Jul 2002 19:13:06 +0200)
From: Dominik Fusina - The Captain
on 30/07/02 18:44, Joseph J. Strout at <email address removed> wrote:

>> But under OS X, the background is by default the system background (white
>> with horizontal grey lines).
>
> Right (though you can also display controls correctly over a solid
> window background color).
Interesting...

>
> The current version of Mac OS X does not support controls over a
> complex background such as a picture. Future versions of OS X
> probably will, and we will then be able to build that capability into
> RB.
Hurry up Apple !

>
>> Or perhaps, is it possible to create CUSTOM button ??
>
> Certainly, you can draw whatever you want (and interact with the
> mouse and keyboard as you like) using a Canvas.
Of course ! The last canvas events from 4.5. I forget. (-;

Thanks Joe.

Dominik Fusina
Captain of NEMO


---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Interface and background under OS X
Date: 30.07.02 21:54 (Tue, 30 Jul 2002 16:54:05 -0400)
From: James Sentman
>
>>
>> The current version of Mac OS X does not support controls over a
>> complex background such as a picture. Future versions of OS X
>> probably will, and we will then be able to build that capability into
>> RB.
>Hurry up Apple !

I'm confused by this. It certainly is possible to draw controls over
any background you like. When you call to draw a theme button or
control, one of the settings you send is a callback to a function
that fills in the background, whatever it may be or whatever you want
to draw.

You dont have to pass anything at all, in which case no clearing is
done on the rect before the control is drawn.

If you want to have things show through the controls, then you can't
do that, but OSX happily draws the shadows over anything you have
underneath it without erasing the background. I did a quick little
demo with a single call to

DrawThemeButton(btnRect, proc, newInfo, oldInfo, 0, 0, 0)

online at:

http://www.sentman.com/picts/button_over_picture.jpg

The picture is in the backdrop of a canvas underneath the canvas onto
which I'm drawing the button via the above command.

I dont see why RB has to always call the methods to clear the
underlying graphics to the window background? There could certainly
be options here.

Now, drawing these controls yourself has some very big aggrivations,
so it's not that easy to overtake RB's plumbing and do this. First,
you can't pass it a graphics object, it just draws into the current
graphics object, or the window and it seems hard to get it to always
end up where you want it. You'll have to monitor for mouse clicks and
re-draw as necessary to display the correct state of the control. And
it only seems to work properly when drawing from the pain event. Any
other attempted drawing to the graphics object results in nothing at
all. At least that is the result of my 15 minutes of messing around
here. I'm sure that most if not all of those things could be overcome
and made into a canvas based control that behaved very much like a
regular RB control, but didn't erase the background...

Anybody have any more experience with drawing the theme controls like that?

Thanks,
James

Re: Interface and background under OS X
Date: 30.07.02 22:03 (Tue, 30 Jul 2002 14:03:33 -0700)
From: Seth Willits
On 7/30/02 1:54 PM, the NSA intercepted the following message from "James
Sentman" <<email address removed>>:

> If you want to have things show through the controls, then you can't
> do that, but OSX happily draws the shadows over anything you have
> underneath it without erasing the background. I did a quick little
> demo with a single call to
>
> DrawThemeButton(btnRect, proc, newInfo, oldInfo, 0, 0, 0)

The problem is REALbasic doesn't use DrawThemeButton. Neither does Carbon
when drawing from a NIB file.

Seth Willits
---------------------------------------------------------------------------
President and Head Developer of Freak Software - http://www.freaksw.com
Q&A Columnist for REALbasic Developer Magazine - http://www.rbdeveloper.com

"We are rarely proud when we are alone."
-- Voltaire
---------------------------------------------------------------------------



---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Interface and background under OS X
Date: 30.07.02 22:03 (Tue, 30 Jul 2002 14:03:57 -0700)
From: Joseph J. Strout
At 4:54 PM -0400 7/30/02, James Sentman wrote:

>I'm confused by this. It certainly is possible to draw controls over
>any background you like.

To *draw* a control image, yes, but not to *have* an actual, working control.

>I dont see why RB has to always call the methods to clear the
>underlying graphics to the window background?

RB is not doing so, the Control Manager is.

Cheers,
- Joe

Re: Interface and background under OS X
Date: 30.07.02 22:10 (Tue, 30 Jul 2002 14:10:50 -0700)
From: Seth Willits
On 7/30/02 2:03 PM, the NSA intercepted the following message from "Joseph
J. Strout" <<email address removed>>:

>> I'm confused by this. It certainly is possible to draw controls over
>> any background you like.
>
> To *draw* a control image, yes, but not to *have* an actual, working control.

That was a better way to put it.

Seth Willits
---------------------------------------------------------------------------
President and Head Developer of Freak Software - http://www.freaksw.com
Q&A Columnist for REALbasic Developer Magazine - http://www.rbdeveloper.com

"When you are courting a nice girl an hour seems like a second. When you
sit on a red-hot cinder a second seems like an hour. That's relativity."
-- Albert Einstein
---------------------------------------------------------------------------




---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Interface and background under OS X
Date: 30.07.02 22:27 (Tue, 30 Jul 2002 17:27:13 -0400)
From: James Sentman
>At 4:54 PM -0400 7/30/02, James Sentman wrote:
>
>>I'm confused by this. It certainly is possible to draw controls
>>over any background you like.
>
>To *draw* a control image, yes, but not to *have* an actual, working control.
>
>>I dont see why RB has to always call the methods to clear the
>>underlying graphics to the window background?
>
>RB is not doing so, the Control Manager is.

Ah, so then there are no such options when working with the Control
Manager. From reading about it I had thought that the
ControlUserPaneBackgroundProcPtr
callback was providing for the same functionality? But it is hard to
tell from the limited documentation if you are expected to do the
erase in this or if you are simply supposed to provide color or
pattern info for it to draw itself.

I've not tried to do this from that level, just fueling the debate;)

Thanks,
James

Re: Interface and background under OS X
Date: 30.07.02 22:32 (Tue, 30 Jul 2002 17:32:30 -0400)
From: James Sentman
>Ah, so then there are no such options when working with the Control
>Manager. From reading about it I had thought that the
>ControlUserPaneBackgroundProcPtr
> callback was providing for the same functionality? But it is hard
>to tell from the limited documentation if you are expected to do the
>erase in this or if you are simply supposed to provide color or
>pattern info for it to draw itself.

Never mind, more careful reading makes this look like all you can do
in it is akin to setting the background color in RB before calling
eraserect. So that wont help at all.

Sorry for the confusion,
James