Changeset 20922
- Timestamp:
- 11/18/07 03:14:41 (1 year ago)
- Files:
-
- juggler/trunk/modules/gadgeteer/ChangeLog (modified) (1 diff)
- juggler/trunk/modules/gadgeteer/VERSION (modified) (1 diff)
- juggler/trunk/modules/gadgeteer/gadget/Devices/KeyboardMouseDevice/InputAreaCocoa.h (modified) (2 diffs)
- juggler/trunk/modules/gadgeteer/gadget/Devices/KeyboardMouseDevice/InputAreaCocoa.mm (modified) (3 diffs)
- juggler/trunk/modules/gadgeteer/gadget/Devices/KeyboardMouseDevice/InputWindowCocoa.h (modified) (2 diffs)
- juggler/trunk/modules/gadgeteer/gadget/Devices/KeyboardMouseDevice/InputWindowCocoa.mm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
juggler/trunk/modules/gadgeteer/ChangeLog
r20761 r20922 1 1 DATE AUTHOR CHANGE 2 2 ----------- ----------- ------------------------------------------------------- 3 Nov-18-2007 patrick Replaced gadget::InputAreaCocoa::updateOriginAndSize() 4 with gadget::InputAreaCocoa::resize(). 5 NEW VERSION: 1.3.15 3 6 Sep-04-2007 patrick Use new environment variable GADGET_DATA_DIR as a way 4 7 to look up files in GADGET_BASE_DIR/share/gadgeteer. juggler/trunk/modules/gadgeteer/VERSION
r20761 r20922 1 1.3.15-0 @11/18/2007 09:15:00 UTC@ 1 2 1.3.14-0 @09/05/2007 02:50:00 UTC@ 2 3 1.3.13-0 @07/30/2007 02:45:00 UTC@ juggler/trunk/modules/gadgeteer/gadget/Devices/KeyboardMouseDevice/InputAreaCocoa.h
r19844 r20922 166 166 //@} 167 167 168 void updateOriginAndSize(const float x, const float y, const float width, 169 const float height); 168 /** 169 * Updates the size of this input area. 170 * 171 * @since 1.3.15 172 */ 173 void resize(const float width, const float height); 170 174 171 175 protected: … … 233 237 /** @name Input Area Data */ 234 238 //@{ 235 float mX; /**< Input area origin X-coordinate */236 float mY; /**< Input area origin Y-coordinate */237 239 float mWidth; /**< Input area width */ 238 240 float mHeight; /**< Input area height */ juggler/trunk/modules/gadgeteer/gadget/Devices/KeyboardMouseDevice/InputAreaCocoa.mm
r19844 r20922 129 129 NSEvent* event) 130 130 { 131 const NSPoint view_loc = [mMainView convertPoint:[event locationInWindow] 132 fromView:nil]; 131 const NSPoint view_loc = [event locationInWindow]; 133 132 const NSPoint root_loc = [NSEvent mouseLocation]; 134 133 gadget::EventPtr mouse_event(new gadget::MouseEvent(type, button, … … 143 142 void InputAreaCocoa::addMouseMoveEvent(NSEvent* event) 144 143 { 145 const NSPoint view_loc = [mMainView convertPoint:[event locationInWindow]146 fromView:nil];144 NSLog(@"mMainView = %@\n", mMainView); 145 const NSPoint view_loc = [event locationInWindow]; 147 146 const NSPoint root_loc = [NSEvent mouseLocation]; 148 147 gadget::EventPtr move_event(new gadget::MouseEvent(gadget::MouseMoveEvent, … … 210 209 } 211 210 212 void InputAreaCocoa::updateOriginAndSize(const float x, const float y, 213 const float width, 214 const float height) 215 { 216 mX = x; 217 mY = y; 211 void InputAreaCocoa::resize(const float width, const float height) 212 { 218 213 mWidth = width; 219 214 mHeight = height; juggler/trunk/modules/gadgeteer/gadget/Devices/KeyboardMouseDevice/InputWindowCocoa.h
r20356 r20922 87 87 88 88 /** 89 * Updates the bounds of this window to be the given values. 90 * 91 * @post The origin and size of this window are set to the given values. 92 * 93 * @see gadget::InputAreaCocoa::resize() 94 * 95 * @since 1.3.15 96 */ 97 void updateBounds(const float x, const float y, const float width, 98 const float height); 99 100 /** 89 101 * Informs this object that the NSWindow object that we created previously 90 102 * has been closed by an external entity and hence deallocated. By invoking … … 116 128 unsigned int mScreen; 117 129 bool mWindowOpen; /**< Keeps track of NSWindow open/closed state */ 130 131 float mX; /**< Window origin X-coordinate */ 132 float mY; /**< Window origin Y-coordinate */ 118 133 }; 119 134 juggler/trunk/modules/gadgeteer/gadget/Devices/KeyboardMouseDevice/InputWindowCocoa.mm
r20021 r20922 91 91 // Inform our input area of the change in our bounds. 92 92 NSRect b = [[aNotification object] frame]; 93 mWindow->update OriginAndSize(b.origin.x, b.origin.y, b.size.width,94 b.size.height);93 mWindow->updateBounds(b.origin.x, b.origin.y, b.size.width, 94 b.size.height); 95 95 } 96 96 … … 103 103 // Inform our input area of the change in our bounds. 104 104 NSRect b = [[aNotification object] frame]; 105 mWindow->update OriginAndSize(b.origin.x, b.origin.y, b.size.width,106 b.size.height);105 mWindow->updateBounds(b.origin.x, b.origin.y, b.size.width, 106 b.size.height); 107 107 } 108 108 @end … … 368 368 } 369 369 370 void InputWindowCocoa::updateBounds(const float x, const float y, 371 const float width, const float height) 372 { 373 mX = x; 374 mY = y; 375 resize(width, height); 376 } 377 370 378 void InputWindowCocoa::setWindowOpen(const bool isOpen) 371 379 {
