Professional Web Applications Themes

translucent rounded window - Mac Programming

So I'm trying to create a simple informational window akin to that of LiteSwitch X or the various informational windows built into Mac OS X (ie: the CD-eject window that pops up when you eject a cd). I've looked at the code for RoundTransparentWindow from the Apple developer site, and I've tweaked it to display a non-movable, transparent window (no images or controls). But there are two problems: one, the corners on this window are square and sharp. I want to round them. Two, any content in the window is equally as transparent as the window itself. I've considered using ...

  1. #1

    Default translucent rounded window

    So I'm trying to create a simple informational window akin to that of
    LiteSwitch X or the various informational windows built into Mac OS X
    (ie: the CD-eject window that pops up when you eject a cd). I've
    looked at the code for RoundTransparentWindow from the Apple developer
    site, and I've tweaked it to display a non-movable, transparent window
    (no images or controls). But there are two problems: one, the corners
    on this window are square and sharp. I want to round them. Two, any
    content in the window is equally as transparent as the window itself.
    I've considered using a rounded rectangle image for the background of
    the window, but this is kind of a hack solution. Look at LiteSwitch X
    for example: when you add more applications to it, the background of
    the LiteSwitch interface expands accordingly. When you quit
    applications, it contracts. Anyone want to help me brainstorm for a
    solution? Thanks in advance.

    --PJ
    [email]peterjbcs.bu.edu[/email]
    peterjb Guest

  2. #2

    Default Re: translucent rounded window

    In <c45945dd.0307191349.23de1e4cposting.google.com > peterjb wrote:
    > looked at the code for RoundTransparentWindow from the Apple developer
    > site, and I've tweaked it to display a non-movable, transparent window
    > (no images or controls). But there are two problems: one, the corners
    > on this window are square and sharp. I want to round them. Two, any
    > content in the window is equally as transparent as the window itself.
    > I've considered using a rounded rectangle image for the background of
    > the window, but this is kind of a hack solution.
    Why is it a hack solution? It sounds like you need to look some more at
    the code for RoundTransparentWindow. There are no corners on a circle,
    so it's hard to see what you're going on about. And the example is very
    straightforward. You make the window background clearColor, and then
    draw whatever you like on top of that. Where there's clearColor, you're
    transparent. Where there isn't, you're not. What's hard? m.

    --
    matt neuburg, phd = [email]matttidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
    REALbasic: The Definitive Guide! 2nd edition!
    [url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
    Subscribe to TidBITS. It's free and smart.
    matt neuburg Guest

  3. #3

    Default Re: translucent rounded window

    In <20030719200423671-0700news.la.sbcglobal.net> matt neuburg wrote:
    > In <c45945dd.0307191349.23de1e4cposting.google.com > peterjb wrote:
    >
    >> looked at the code for RoundTransparentWindow from the Apple
    >> developer site, and I've tweaked it to display a non-movable,
    >> transparent window (no images or controls). But there are two
    >> problems: one, the corners on this window are square and sharp. I
    >> want to round them. Two, any content in the window is equally as
    >> transparent as the window itself. I've considered using a rounded
    >> rectangle image for the background of the window, but this is kind of
    >> a hack solution.
    >
    > Why is it a hack solution? It sounds like you need to look some more
    > at the code for RoundTransparentWindow. There are no corners on a
    > circle, so it's hard to see what you're going on about. And the
    > example is very straightforward. You make the window background
    > clearColor, and then draw whatever you like on top of that. Where
    > there's clearColor, you're transparent. Where there isn't, you're not.
    > What's hard? m.
    Just to "round off" this discussion: as an experiment I wrote a quick
    NSView subclass that draws itself as a filled rounded rectangle using an
    NSBezierPath. I put that on a window whose background color was
    clearColor and built the app. It worked perfectly the first time. I
    really don't see what needs "brainstorming" here. You want a round
    rectangle, draw a round rectangle. m.

    --
    matt neuburg, phd = [email]matttidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
    REALbasic: The Definitive Guide! 2nd edition!
    [url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
    Subscribe to TidBITS. It's free and smart.
    matt neuburg Guest

  4. #4

    Default Re: translucent rounded window

    matt neuburg <matttidbits.com> wrote in message news:<20030719203345171-0700news.la.sbcglobal.net>...
    > In <20030719200423671-0700news.la.sbcglobal.net> matt neuburg wrote:
    > > In <c45945dd.0307191349.23de1e4cposting.google.com > peterjb wrote:
    > >
    > >> looked at the code for RoundTransparentWindow from the Apple
    > >> developer site, and I've tweaked it to display a non-movable,
    > >> transparent window (no images or controls). But there are two
    > >> problems: one, the corners on this window are square and sharp. I
    > >> want to round them. Two, any content in the window is equally as
    > >> transparent as the window itself. I've considered using a rounded
    > >> rectangle image for the background of the window, but this is kind of
    > >> a hack solution.
    > >
    > > Why is it a hack solution? It sounds like you need to look some more
    > > at the code for RoundTransparentWindow. There are no corners on a
    > > circle, so it's hard to see what you're going on about. And the
    > > example is very straightforward. You make the window background
    > > clearColor, and then draw whatever you like on top of that. Where
    > > there's clearColor, you're transparent. Where there isn't, you're not.
    > > What's hard? m.
    >
    > Just to "round off" this discussion: as an experiment I wrote a quick
    > NSView subclass that draws itself as a filled rounded rectangle using an
    > NSBezierPath. I put that on a window whose background color was
    > clearColor and built the app. It worked perfectly the first time. I
    > really don't see what needs "brainstorming" here. You want a round
    > rectangle, draw a round rectangle. m.
    Thanks for your help. I need to look at BezierPath some more.

    --PJ
    peterjb Guest

Similar Threads

  1. Translucent or Transparent TEXT Field areas
    By ts^ webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 2
    Last Post: October 23rd, 02:40 AM
  2. Translucent pop up menus
    By irisu_yavrum webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 10
    Last Post: October 20th, 12:08 AM
  3. Translucent pop-up menu problem
    By gofer webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 0
    Last Post: July 30th, 12:49 AM
  4. translucent text overlays.
    By WebDesign Beginner in forum Macromedia Fireworks
    Replies: 3
    Last Post: July 17th, 08:15 PM
  5. How to make shapes translucent?
    By Chris Jumonville in forum Macromedia Freehand
    Replies: 2
    Last Post: July 9th, 03:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139