◆ backgroundColorForKey:
- (NSColor *) backgroundColorForKey: |
|
(NSString *) | key |
|
Extends class OOJavaScriptConsoleController.
Definition at line 1 of file OOJavaScriptConsoleController.m.
376 :(NSString *)key
377{
378 NSColor *result =
nil;
379 NSString *expandedKey =
nil;
380
381 if (key ==
nil) key =
@"general";
382
383 result = [_bgColors objectForKey:key];
385 {
386
387 expandedKey = [key stringByAppendingString:@"-background-color"];
388 result = [NSColor colorWithOOColorDescription:[_debugger configurationValueForKey:expandedKey]];
390 {
391 expandedKey = [key stringByAppendingString:@"-background-colour"];
392 result = [NSColor colorWithOOColorDescription:[_debugger configurationValueForKey:expandedKey]];
393 }
394 if (result ==
nil && ![key isEqualToString:
@"general"])
395 {
396 result = [self backgroundColorForKey:nil];
397 }
398 if (result ==
nil) result = [NSColor whiteColor];
399
400
402 {
403 if (_bgColors ==
nil) _bgColors = [[NSMutableDictionary alloc] init];
404 [_bgColors setObject:result forKey:key];
405 }
406 }
407
408 return result;
409}
◆ foregroundColorForKey:
- (NSColor *) foregroundColorForKey: |
|
(NSString *) | key |
|
Extends class OOJavaScriptConsoleController.
Definition at line 1 of file OOJavaScriptConsoleController.m.
340 :(NSString *)key
341{
342 NSColor *result =
nil;
343 NSString *expandedKey =
nil;
344
345 if (key ==
nil) key =
@"general";
346
347 result = [_fgColors objectForKey:key];
349 {
350
351 expandedKey = [key stringByAppendingString:@"-foreground-color"];
352 result = [NSColor colorWithOOColorDescription:[_debugger configurationValueForKey:expandedKey]];
354 {
355 expandedKey = [key stringByAppendingString:@"-foreground-colour"];
356 result = [NSColor colorWithOOColorDescription:[_debugger configurationValueForKey:expandedKey]];
357 }
358 if (result ==
nil && ![key isEqualToString:
@"general"])
359 {
360 result = [self foregroundColorForKey:nil];
361 }
362 if (result ==
nil) result = [NSColor blackColor];
363
364
366 {
367 if (_fgColors ==
nil) _fgColors = [[NSMutableDictionary alloc] init];
368 [_fgColors setObject:result forKey:key];
369 }
370 }
371
372 return result;
373}
◆ reloadAllSettings
- (void) reloadAllSettings |
|
|
|
◆ saveHistory
Extends class OOJavaScriptConsoleController.
Definition at line 1 of file OOJavaScriptConsoleController.m.
449{
450 NSArray *history =
nil;
451
452 history = [inputHistoryManager history];
454 {
455 [[NSUserDefaults standardUserDefaults] setObject:history forKey:@"debug-js-console-scrollback"];
456 [[NSUserDefaults standardUserDefaults] synchronize];
457 }
458}
◆ setUpFonts
Extends class OOJavaScriptConsoleController.
Definition at line 1 of file OOJavaScriptConsoleController.m.
422{
423 NSString *fontFace =
nil;
424 NSInteger fontSize;
425
428
429
430 fontFace = [_debugger configurationValueForKey:@"font-face"
431 class:[NSString class]
432 defaultValue:@"Courier"];
433 fontSize = (NSInteger)[_debugger configurationIntValueForKey:@"font-size"
434 defaultValue:12];
435
436 _baseFont = [NSFont fontWithName:fontFace size:fontSize];
437 if (_baseFont ==
nil) _baseFont = [NSFont userFixedPitchFontOfSize:0];
438 [_baseFont retain];
439
440
441 _boldFont = [[NSFontManager sharedFontManager] convertFont:_baseFont
442 toHaveTrait:NSBoldFontMask];
443 if (_boldFont ==
nil) _boldFont = _baseFont;
444 [_boldFont retain];
445}
The documentation for this category was generated from the following file: