Changeset 29200 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 7, 2010 12:14:18 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 61277
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/darwin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/darwin/CocoaDockIconPreview.mm
r24377 r29200 7 7 8 8 /* 9 * Copyright (C) 2009 Sun Microsystems, Inc.9 * Copyright (C) 2009-2010 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the 17 17 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 18 *19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa20 * Clara, CA 95054 USA or visit http://www.sun.com if you need21 * additional information or have any questions.22 18 */ 23 19 … … 67 63 @end 68 64 69 /* 65 /* 70 66 * Helper class which allow us to access all members/methods of AbstractDockIconPreviewHelper 71 67 * from any Cocoa class. … … 75 71 public: 76 72 inline CocoaDockIconPreviewPrivate (VBoxConsoleWnd *aMainWnd, const QPixmap& aOverlayImage) 77 :AbstractDockIconPreviewHelper (aMainWnd, aOverlayImage) 73 :AbstractDockIconPreviewHelper (aMainWnd, aOverlayImage) 78 74 { 79 75 mDockTile = [[DockTile alloc] initWithParent:this]; … … 84 80 [mDockTile release]; 85 81 } 86 82 87 83 DockTile *mDockTile; 88 84 }; 89 85 90 /* 91 * Cocoa wrapper for the abstract dock icon preview class 86 /* 87 * Cocoa wrapper for the abstract dock icon preview class 92 88 */ 93 89 CocoaDockIconPreview::CocoaDockIconPreview (VBoxConsoleWnd *aMainWnd, const QPixmap& aOverlayImage) … … 135 131 } 136 132 137 /* 133 /* 138 134 * Class for arranging/updating the layers for the glossy monitor preview. 139 135 */ … … 199 195 @end 200 196 201 /* 197 /* 202 198 * Simple implementation for the overlay of the OS & the state icon. Is used both 203 199 * in the application icon & preview mode. … … 222 218 @end 223 219 224 /* 220 /* 225 221 * VirtualBox Dock Tile implementation. Manage the switching between the icon 226 222 * and preview mode & forwards all update request to the appropriate methods. -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/UICocoaDockIconPreview.mm
r28540 r29200 7 7 8 8 /* 9 * Copyright (C) 2009 Sun Microsystems, Inc.9 * Copyright (C) 2009-2010 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the 17 17 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 18 *19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa20 * Clara, CA 95054 USA or visit http://www.sun.com if you need21 * additional information or have any questions.22 18 */ 23 19 … … 68 64 @end 69 65 70 /* 66 /* 71 67 * Helper class which allow us to access all members/methods of AbstractDockIconPreviewHelper 72 68 * from any Cocoa class. … … 76 72 public: 77 73 inline UICocoaDockIconPreviewPrivate(UISession *pSession, const QPixmap& overlayImage) 78 :UIAbstractDockIconPreviewHelper(pSession, overlayImage) 74 :UIAbstractDockIconPreviewHelper(pSession, overlayImage) 79 75 { 80 76 mUIDockTile = [[UIDockTile alloc] initWithParent:this]; … … 87 83 [mUIDockTile release]; 88 84 } 89 85 90 86 UIDockTile *mUIDockTile; 91 87 }; 92 88 93 /* 94 * Cocoa wrapper for the abstract dock icon preview class 89 /* 90 * Cocoa wrapper for the abstract dock icon preview class 95 91 */ 96 92 UICocoaDockIconPreview::UICocoaDockIconPreview(UISession *pSession, const QPixmap& overlayImage) … … 137 133 } 138 134 139 /* 135 /* 140 136 * Class for arranging/updating the layers for the glossy monitor preview. 141 137 */ … … 201 197 @end 202 198 203 /* 199 /* 204 200 * Simple implementation for the overlay of the OS & the state icon. Is used both 205 201 * in the application icon & preview mode. … … 224 220 @end 225 221 226 /* 222 /* 227 223 * VirtualBox Dock Tile implementation. Manage the switching between the icon 228 224 * and preview mode & forwards all update request to the appropriate methods. -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxCocoaSpecialControls.mm
r27690 r29200 7 7 8 8 /* 9 * Copyright (C) 2009 Sun Microsystems, Inc.9 * Copyright (C) 2009-2010 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the 17 17 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 18 *19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa20 * Clara, CA 95054 USA or visit http://www.sun.com if you need21 * additional information or have any questions.22 18 */ 23 19 … … 37 33 #include <QKeyEvent> 38 34 39 @interface NSButtonTarget: NSObject 35 @interface NSButtonTarget: NSObject 40 36 { 41 37 VBoxCocoaButton *mRealTarget; … … 61 57 @end 62 58 63 @interface NSSegmentedButtonTarget: NSObject 59 @interface NSSegmentedButtonTarget: NSObject 64 60 { 65 61 VBoxCocoaSegmentedButton *mRealTarget; … … 85 81 @end 86 82 87 @interface VBSearchField: NSSearchField 83 @interface VBSearchField: NSSearchField 88 84 { 89 85 VBoxCocoaSearchField *mRealTarget; … … 110 106 111 107 /* Get the pressed character */ 112 if ([str length] > 0) 108 if ([str length] > 0) 113 109 ch = [str characterAtIndex:0]; 114 110 115 if (ch == NSCarriageReturnCharacter || ch == NSEnterCharacter) 111 if (ch == NSCarriageReturnCharacter || ch == NSEnterCharacter) 116 112 { 117 113 QKeyEvent ke(QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier); 118 114 QApplication::sendEvent (mRealTarget, &ke); 119 } 115 } 120 116 else if (ch == 27) /* Escape */ 121 117 { 122 118 QKeyEvent ke(QEvent::KeyPress, Qt::Key_Escape, Qt::NoModifier); 123 119 QApplication::sendEvent (mRealTarget, &ke); 124 } 120 } 125 121 else if (ch == NSF3FunctionKey) 126 122 { … … 152 148 @end 153 149 @implementation VBSearchFieldDelegate 154 -(BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector 150 -(BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector 155 151 { 156 152 // NSLog (NSStringFromSelector (commandSelector)); 157 153 /* Don't execute the selector for Enter & Escape. */ 158 if ( commandSelector == @selector(insertNewline:) 159 || commandSelector == @selector(cancelOperation:)) 154 if ( commandSelector == @selector(insertNewline:) 155 || commandSelector == @selector(cancelOperation:)) 160 156 return YES; 161 157 return NO; … … 163 159 @end 164 160 165 @interface VBSearchFieldCell: NSSearchFieldCell 161 @interface VBSearchFieldCell: NSSearchFieldCell 166 162 { 167 163 NSColor *mBGColor; … … 173 169 - (void)setBackgroundColor:(NSColor*)aBGColor 174 170 { 175 if (mBGColor != aBGColor) 171 if (mBGColor != aBGColor) 176 172 { 177 173 [mBGColor release]; … … 295 291 [mNativeRef setSegmentStyle:NSSegmentStyleRoundRect]; 296 292 [[mNativeRef cell] setTrackingMode: NSSegmentSwitchTrackingMomentary]; 297 [mNativeRef setFont: [NSFont controlContentFontOfSize: 293 [mNativeRef setFont: [NSFont controlContentFontOfSize: 298 294 [NSFont systemFontSizeForControlSize: NSSmallControlSize]]]; 299 295 [mNativeRef sizeToFit]; … … 353 349 mNativeRef = [[VBSearchField alloc] initWithObject2: this]; 354 350 [[mNativeRef cell] setControlSize: NSSmallControlSize]; 355 [mNativeRef setFont: [NSFont controlContentFontOfSize: 351 [mNativeRef setFont: [NSFont controlContentFontOfSize: 356 352 [NSFont systemFontSizeForControlSize: NSSmallControlSize]]]; 357 353 [mNativeRef sizeToFit]; -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxDockIconPreview-cocoa.mm
r26716 r29200 7 7 8 8 /* 9 * Copyright (C) 2009 Sun Microsystems, Inc.9 * Copyright (C) 2009-2010 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the 17 17 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 18 *19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa20 * Clara, CA 95054 USA or visit http://www.sun.com if you need21 * additional information or have any questions.22 18 */ 23 19 … … 91 87 /* Convert the CGImage to an NSImage */ 92 88 NSBitmapImageRep *bitmapImageRep = [[NSBitmapImageRep alloc] initWithCGImage:pImage]; 93 if (bitmapImageRep) 89 if (bitmapImageRep) 94 90 { 95 91 NSImage *badgeImage = [[NSImage alloc] initWithSize:[bitmapImageRep size]]; … … 105 101 /* Set the new application icon */ 106 102 [NSApp setApplicationIconImage:gDockIconImage]; 107 103 108 104 [pool release]; 109 105 } -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin-cocoa.mm
r27534 r29200 8 8 9 9 /* 10 * Copyright (C) 2009 Sun Microsystems, Inc.10 * Copyright (C) 2009-2010 Oracle Corporation 11 11 * 12 12 * This file is part of VirtualBox Open Source Edition (OSE), as … … 17 17 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the 18 18 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 19 *20 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa21 * Clara, CA 95054 USA or visit http://www.sun.com if you need22 * additional information or have any questions.23 19 */ 24 20 … … 38 34 if (aView) 39 35 window = [aView window]; 40 36 41 37 [pool release]; 42 38 return window; … … 49 45 NativeViewRef view = NULL; 50 46 if (aWindow) 51 view = [aWindow contentView]; 47 view = [aWindow contentView]; 52 48 53 49 [pool release]; … … 188 184 { 189 185 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 190 186 191 187 bool fResult = [aWindow isZoomed]; 192 188
Note:
See TracChangeset
for help on using the changeset viewer.