Professional Web Applications Themes

Blue or Graphite - Mac Programming

How can I determine whether the user has selected blue or graphite appearance? Thanks a heap, Glen...

  1. #1

    Default Blue or Graphite

    How can I determine whether the user has selected blue or graphite appearance?

    Thanks a heap,
    Glen
    Glen Guest

  2. #2

    Default Re: Blue or Graphite

    In article <google.com>,
    toast.net (Glen Foy) wrote:
     

    If you need to draw something based on the appearance, use the APIs in
    Appearance.h

    hth

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  3. #3

    Default Re: Blue or Graphite

    Miro Jurisic <org> wrote in message news:<mit.edu>... 
    >
    > If you need to draw something based on the appearance, use the APIs in
    > Appearance.h[/ref]

    What I want to do can't be done using the APIs. Is this information
    available elsewhere?
    Glen Guest

  4. #4

    Default Re: Blue or Graphite

    On 2004-02-10 02:39:42 -0800, toast.net (Glen Foy) said:
     

    If you're using Cocoa you can get this information from the defaults.
    Here is how.

    int tint = [[NSUserDefaults standardUserDefaults]
    integerForKey:"AppleAquaColorVariant"];

    If tint == 1 the color is blue, if tint == 6 the color is graphite.
    The first time I tried it I got a zero when I was expecting a 1, every
    other time it returned 1 when the Appearance preferences is set to
    blue. Maybe that is something to look out for.


    Edward Hillenbrand

    Edward Guest

  5. #5

    Default Re: Blue or Graphite

    Edward Hillenbrand <net> wrote in message news:<2004021022344827590%elihNOSPAMsbcglobalnet> ... 
    >
    > If you're using Cocoa you can get this information from the defaults.
    > Here is how.
    >
    > int tint = [[NSUserDefaults standardUserDefaults]
    > integerForKey:"AppleAquaColorVariant"];
    >
    > If tint == 1 the color is blue, if tint == 6 the color is graphite.
    > The first time I tried it I got a zero when I was expecting a 1, every
    > other time it returned 1 when the Appearance preferences is set to
    > blue. Maybe that is something to look out for.[/ref]

    Thanks for that information. I'm using Carbon, though, so I need another solution.
    Glen Guest

  6. #6

    Default Re: Blue or Graphite

    On 11 Feb 2004, Glen Foy wrote:
     
    > >
    > > If you're using Cocoa you can get this information from the defaults.
    > > Here is how.
    > >
    > > int tint = [[NSUserDefaults standardUserDefaults]
    > > integerForKey:"AppleAquaColorVariant"];
    > >
    > > If tint == 1 the color is blue, if tint == 6 the color is graphite.
    > > The first time I tried it I got a zero when I was expecting a 1, every
    > > other time it returned 1 when the Appearance preferences is set to
    > > blue. Maybe that is something to look out for.[/ref]
    >
    > Thanks for that information. I'm using Carbon, though, so I need another solution.
    >[/ref]
    CFPreferences can probably handle that for you.

    Fred

    Frederick Guest

  7. #7

    Default Re: Blue or Graphite

    In article <google.com>,
    toast.net (Glen Foy) wrote:
     


    I already gave you the Carbon solution, which is not to read the user
    preference, but to use the Appearance brushes for theme-compliant drawing.

    hth

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  8. #8

    Default Re: Blue or Graphite

    In article <mit.edu>,
    Miro Jurisic <org> wrote:
     [/ref]

    OSStatus
    GetThemeBrushAsColor (ThemeBrush inBrush, SInt16 inDepth, Boolean
    inColorDev, RGBColor * outColor);

    kThemeBrushPrimaryHighlightColor = -3,
    kThemeBrushSecondaryHighlightColor = -4

    http://developer.apple.com/doentation/Carbon/Carbon.html

    is your friend.
    Chris Guest

  9. #9

    Default Re: Blue or Graphite

    Many thanks for the various replies.

    ************************************************** ****************
    * Glen Foy
    * www.clairvaux.org
    * "The only way to get a hole is to put something around nothing,
    * or put nothing inside of something."
    ************************************************** ****************
    Glen Guest

  10. #10

    Default Re: Blue or Graphite

    On 2004-02-10 02:39:42 -0800, toast.net (Glen Foy) said:
     

    In Mac OS X 10.1 and greater you can use CopyThemeIdentifier to get the
    current appearance. See Appearance.h or the Developer Docs. There's an
    older function, GetTheme, which works on Mac OS X 10.0 also, but that's
    more of hassle to use.

    You making some custom controls or something?

    Hope this helps.

    be seeing you,
    Chris

    Chris Guest

Similar Threads

  1. Red Square, Blue Triangle, Blue Circle
    By Michael_Caruso@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 6
    Last Post: April 9th, 08:42 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