Professional Web Applications Themes

[Q] Metal window - no updates, no clicks - Mac Programming

Hi all! I have troubles with windows of the metal look. I create the window from code: err = CreateNewWindow (kDoentWindowClass, kWindowCloseBoxAttribute | kWindowCollapseBoxAttribute | kWindowStandardHandlerAttribute | kWindowMetalAttribute | kWindowCompositingAttribute, &r, &g_rGameWindow); I read in the doentation that you should always set the compositing attribute when using the metal attribute. Can anyone explain me what the compositing attribute is for? When I set it, I don't get any update events any more!!! When I do NOT set the compositing attribute, the window will be properly updated. Another problem is that, whether the compositing attribute is set or not, a click ...

  1. #1

    Default [Q] Metal window - no updates, no clicks

    Hi all!

    I have troubles with windows of the metal look. I create the window from
    code:

    err = CreateNewWindow (kDoentWindowClass,
    kWindowCloseBoxAttribute | kWindowCollapseBoxAttribute
    | kWindowStandardHandlerAttribute | kWindowMetalAttribute
    | kWindowCompositingAttribute,
    &r, &g_rGameWindow);

    I read in the doentation that you should always set the compositing
    attribute when using the metal attribute. Can anyone explain me what the
    compositing attribute is for? When I set it, I don't get any update events
    any more!!! When I do NOT set the compositing attribute, the window will be
    properly updated.

    Another problem is that, whether the compositing attribute is set or not, a
    click in the window will always result in the window being dragged. I do get
    a content click event, but only when the mouse button has been released.
    This is not so when I am using a normal window rather than a metal one. I
    have found out that I could solve this problem by overriding the
    kEventWindowHitTest event, but it would be rather troublesome as I would
    have to create a content click event from the handler, yet the handler is
    not only called on clicks but on mere mouse movements as well (probably
    because the window widgets need to be highlit when the mouse is over them).
    I wonder how this is done in a clean way? Should I create custom controls
    for all the areas where I want to receive mouse click events?

    Thanks in advance,
    /Peter

    Peter Amberg Guest

  2. #2

    Default Re: [Q] Metal window - no updates, no clicks

    No replies -- reposting this.
    /Peter

    --

    Hi all!

    I have troubles with windows of the metal look. I create the window from
    code:

    err = CreateNewWindow (kDoentWindowClass,
    kWindowCloseBoxAttribute | kWindowCollapseBoxAttribute
    | kWindowStandardHandlerAttribute | kWindowMetalAttribute
    | kWindowCompositingAttribute,
    &r, &g_rGameWindow);

    I read in the doentation that you should always set the compositing
    attribute when using the metal attribute. Can anyone explain me what the
    compositing attribute is for? When I set it, I don't get any update events
    any more!!! When I do NOT set the compositing attribute, the window will be
    properly updated.

    Another problem is that, whether the compositing attribute is set or not, a
    click in the window will always result in the window being dragged. I do get
    a content click event, but only when the mouse button has been released.
    This is not so when I am using a normal window rather than a metal one. I
    have found out that I could solve this problem by overriding the
    kEventWindowHitTest event, but it would be rather troublesome as I would
    have to create a content click event from the handler, yet the handler is
    not only called on clicks but on mere mouse movements as well (probably
    because the window widgets need to be highlit when the mouse is over them).
    I wonder how this is done in a clean way? Should I create custom controls
    for all the areas where I want to receive mouse click events?

    Thanks in advance,
    /Peter


    Peter Amberg Guest

  3. #3

    Default Re: [Q] Metal window - no updates, no clicks

    On Mon, 4 Aug 2003, Peter Amberg wrote:
    > No replies -- reposting this.
    > /Peter
    >
    > --
    >
    > Hi all!
    >
    > I have troubles with windows of the metal look. I create the window from
    > code:
    >
    > err = CreateNewWindow (kDoentWindowClass,
    > kWindowCloseBoxAttribute | kWindowCollapseBoxAttribute
    > | kWindowStandardHandlerAttribute | kWindowMetalAttribute
    > | kWindowCompositingAttribute,
    > &r, &g_rGameWindow);
    >
    > I read in the doentation that you should always set the compositing
    > attribute when using the metal attribute. Can anyone explain me what the
    > compositing attribute is for? When I set it, I don't get any update events
    > any more!!! When I do NOT set the compositing attribute, the window will be
    > properly updated.
    compositing means that the whole window is done with hiviews, there are
    no update events because the individual hiviews are told to redraw when
    necessary.
    >
    > Another problem is that, whether the compositing attribute is set or not, a
    > click in the window will always result in the window being dragged. I do get
    metal windows are supposed to be draggable anywhere in there content area.
    >
    a content click event, but only when the mouse button has been released.
    > This is not so when I am using a normal window rather than a metal one. I
    > have found out that I could solve this problem by overriding the
    > kEventWindowHitTest event, but it would be rather troublesome as I would
    > have to create a content click event from the handler, yet the handler is
    > not only called on clicks but on mere mouse movements as well (probably
    > because the window widgets need to be highlit when the mouse is over them).
    > I wonder how this is done in a clean way? Should I create custom controls
    > for all the areas where I want to receive mouse click events?
    Yes, in a hiview based window, everything must be an hiview, ie a control
    (hiviewref is a typedef of controlref (unless it's in the other order)


    Fred

    Frederick Cheung Guest

Similar Threads

  1. open browser window to collect any subsequent clicks
    By jshoot in forum Dreamweaver AppDev
    Replies: 2
    Last Post: April 13th, 01:21 PM
  2. Clicks and double-clicks
    By PontiMax in forum ASP.NET Data Grid Control
    Replies: 2
    Last Post: July 14th, 11:00 AM
  3. Images with clicks
    By Nrgo in forum Macromedia Director Basics
    Replies: 2
    Last Post: April 29th, 08:11 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