Professional Web Applications Themes

Programmatically minimize window to dock - Mac Programming

Is there a Carbon window manager call to send a window to the dock, as if the user had clicked the minimize button? I can't seem to find one. Also, is it possible to bounce a window icon in the doent area of the dock? It looks like only application icon can be (easily) bounced?...

  1. #1

    Default Programmatically minimize window to dock

    Is there a Carbon window manager call to send a window to the dock, as
    if the user had clicked the minimize button? I can't seem to find
    one. Also, is it possible to bounce a window icon in the doent
    area of the dock? It looks like only application icon can be (easily)
    bounced?
    Tim Guest

  2. #2

    Default Re: Programmatically minimize window to dock

    In article <google.com>,
    net (Tim) wrote:
     

    CollapseWindow
     

    No.

    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: Programmatically minimize window to dock

    In article <google.com>,
    net (Tim) wrote:
     

    CollapseWindow()
    Tom Guest

  4. #4

    Default Re: Programmatically minimize window to dock

    > > Is there a Carbon window manager call to send a window to the dock, as 
    >
    > CollapseWindow()[/ref]

    Thanks, was thrown off by Carbon docs talking about old-style titlebar
    collapse. I wonder now, is it possible to open a window in the
    collapsed state, i.e., without having it flash on the screen for a
    moment?
    Tim Guest

  5. #5

    Default Re: Programmatically minimize window to dock

    In article <google.com>,
    net (Tim) wrote:
     
    > >
    > > CollapseWindow()[/ref]
    >
    > Thanks, was thrown off by Carbon docs talking about old-style titlebar
    > collapse. I wonder now, is it possible to open a window in the
    > collapsed state, i.e., without having it flash on the screen for a
    > moment?[/ref]

    Good question. Let us know what you find out :-) I would try either hiding the
    window before collapsing it, or putting it offscreen before collapsing it.

    meeroh

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

    Miro Guest

  6. #6

    Default Re: Programmatically minimize window to dock

    Miro Jurisic <org> wrote: 

    Moving it offscreen before collapse did the trick. Thanks. Need to
    position offscreen "near" the dock to avoid seeing it swoop across the
    screen. Hide doesn't work.
    Tim Guest

  7. #7

    Default Re: Programmatically minimize window to dock

    In article <google.com>,
    net (Tim) wrote:
     
    >
    > Moving it offscreen before collapse did the trick. Thanks. Need to
    > position offscreen "near" the dock to avoid seeing it swoop across the
    > screen. Hide doesn't work.[/ref]

    Beware of the fact that the Dock can be in any corner or edge of the desktop and
    the desktop may include more than one screen.

    By the way, I find it highly suspicious that you want to create a window that's
    minimized by default. What are you doing?

    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: Programmatically minimize window to dock

    Miro Jurisic <org> wrote in message news
     

    When my app is not in the foreground, I want to alert a user to
    certain events, and give them a few options to respond. I could
    bounce the app icon or change it's appearance, but clicking on the app
    icon will bring all my application windows to foreground, which is a
    behavior I want to preserve in general, but not as the only way to
    deal with these events. If I add a new doent icon to the dock,
    then the user can click on it to open a small window and deal with the
    event, without changing any other window orderings.

    If the user has chosen to "Hide application" then this won't work. In
    that case, I guess I need to bounce the app icon. To avoid this, I
    can add an application level "hide me" option, which people can use
    instead of system Hide if they want.

    I'm open to suggestions on better ways to handle this, but seems like
    system notification options are pretty limited. I guess the other
    possibility would be to add pop-up menu to app icon so user could deal
    with event there. I haven't tried to grab a menu on a bouncing target
    yet. And, really, my event is best represented with a window, i.e.,
    the exact same window they would see if the app was in the foreground.
    Tim Guest

  9. #9

    Default Re: Programmatically minimize window to dock

    In article <google.com>,
    net (Tim) wrote:
     
    >
    > When my app is not in the foreground, I want to alert a user to
    > certain events, and give them a few options to respond. I could
    > bounce the app icon or change it's appearance, but clicking on the app
    > icon will bring all my application windows to foreground, which is a
    > behavior I want to preserve in general, but not as the only way to
    > deal with these events.
    >
    > I'm open to suggestions on better ways to handle this[/ref]

    I see another way, but I am not sure whether it is better: put a helper
    application inside your application' s bundle, and have your main app
    launch it to get a second Dock icon.

    Reinder
    Reinder Guest

  10. #10

    Default Re: Programmatically minimize window to dock

    In article <google.com>,
    net (Tim) wrote:
     
    >
    > When my app is not in the foreground, I want to alert a user to certain
    > events, and give them a few options to respond. I could bounce the app icon
    > or change it's appearance, but clicking on the app icon will bring all my
    > application windows to foreground, which is a behavior I want to preserve in
    > general, but not as the only way to deal with these events.[/ref]

    I believe that clicking on the app sends you an apple event, and there is a
    default Carbon event handler that handles it by bringing all the windows to the
    front. You may want to see whether installing a custom handler for that event
    that only brings the one window to the front when the app has a pending
    notification is useful.
     

    That's a terrible idea. You are trying to make your app behave in ways that
    users will not expect and will not find natural. Don't do that.

    meeroh

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

    Miro Guest

  11. #11

    Default Re: Programmatically minimize window to dock

    Miro Jurisic <org> wrote in message news:<macdev- 

    No, I would rather keep consistent behavior that clicking dock
    application icon always brings all open application windows to
    foreground, as recommended by Apple human interface guidelines.
     
    >
    > That's a terrible idea. You are trying to make your app behave in ways that
    > users will not expect and will not find natural. Don't do that.[/ref]

    I don't see your point here. The standard "Hide x" will remain
    unchanged. This is simply an application option to close all the
    windows, but remember the configuration, so it can quickly be
    restored. It is redundant with standard "Hide x," but that would
    leave the application icon as the only communication channel with the
    user.

    I don't like the non-standard kludgey-ness of it either (using
    "minimize" to make sure a window can be seen!), but I can't see a
    better option. Of course, users can still use the standard "Hide
    x" if they want, and I'll bounce the app icon, and they can bring
    the whole app to foreground to respond, all in the standard way.
    Tim Guest

Similar Threads

  1. How to Minimize a popup window?
    By Mihir@adobeCoE in forum Macromedia Flex General Discussion
    Replies: 1
    Last Post: November 22nd, 11:15 AM
  2. minimize flash window
    By Michael Long in forum Macromedia Flash
    Replies: 0
    Last Post: April 28th, 04:43 PM
  3. Double clicking window bar doesn't minimize
    By Christopher_Gentry@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 3
    Last Post: February 20th, 04:42 PM
  4. Replies: 3
    Last Post: August 25th, 12:23 PM
  5. Unable to dock file broswser to dock Well
    By dave macrae in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 1
    Last Post: July 8th, 12:25 PM

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