Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
OOObjectDebugInspectorModule Class Reference

#include <OOObjectDebugInspectorModule.h>

+ Inheritance diagram for OOObjectDebugInspectorModule:
+ Collaboration diagram for OOObjectDebugInspectorModule:

Instance Methods

(IBAction) - targetSelf:
 
(void) - awakeFromNib [implementation]
 
(void) - update [implementation]
 
- Instance Methods inherited from OODebugInspectorModule
(id) - initWithObject:
 
(BOOL) - loadUserInterface
 
(NSString *) - nibName
 
(NSView *) - rootView
 
(id) - object
 
(void) - dealloc [implementation]
 

Private Attributes

IBOutlet NSTextField * _basicIdentityField
 
IBOutlet NSTextField * _secondaryIdentityField
 
IBOutlet NSButton * _targetSelfButton
 

Detailed Description

Definition at line 33 of file OOObjectDebugInspectorModule.h.

Method Documentation

◆ awakeFromNib

- (void) awakeFromNib
implementation

Definition at line 1 of file OOObjectDebugInspectorModule.m.

38{
39 NSRect basicIDFrame, secondaryIDFrame, targetSelfFrame, rootFrame;
40 NSView *rootView = [self rootView];
41 CGFloat delta;
42
43 id object = [self object];
44
45 basicIDFrame = [_basicIdentityField frame];
46 secondaryIDFrame = [_secondaryIdentityField frame];
47 targetSelfFrame = [_targetSelfButton frame];
48 rootFrame = [rootView frame];
49
50 if (![object inspCanBecomeTarget])
51 {
52 // Remove targetSelfButton.
53 [_targetSelfButton removeFromSuperview];
55 basicIDFrame.size.width = secondaryIDFrame.size.width;
56 }
57
58 if (![object inspHasSecondaryIdentityLine])
59 {
60 // No secondary identity line, remove secondary identity field.
61 delta = basicIDFrame.origin.y - secondaryIDFrame.origin.y;
62 [_secondaryIdentityField removeFromSuperview];
64
65 rootFrame.size.height -= delta;
66 basicIDFrame.origin.y -= delta;
67 targetSelfFrame.origin.y -= delta;
68 }
69
70 // Put bits in the right place.
71 [rootView setFrame:rootFrame];
72 [_basicIdentityField setFrame:basicIDFrame];
73 [_secondaryIdentityField setFrame:secondaryIDFrame];
74 [_targetSelfButton setFrame:targetSelfFrame];
75}
return nil
float y
voidpf uLong int origin
Definition ioapi.h:140

References _basicIdentityField, _secondaryIdentityField, _targetSelfButton, nil, OODebugInspectorModule::object, and OODebugInspectorModule::rootView.

+ Here is the call graph for this function:

◆ targetSelf:

- (IBAction) targetSelf: (id) sender

Definition at line 1 of file OOObjectDebugInspectorModule.m.

97 :sender
98{
99 [[self object] inspBecomeTarget];
100}

◆ update

- (void) update
implementation

Reimplemented from OODebugInspectorModule.

Definition at line 1 of file OOObjectDebugInspectorModule.m.

79{
80 id object = [self object];
81
82 if (object != nil) [_basicIdentityField setStringValue:[object inspBasicIdentityLine]];
84 {
85 if (object != nil)
86 {
87 [_secondaryIdentityField setStringValue:[object inspSecondaryIdentityLine] ?: InspectorUnknownValueString()];
88 }
89 else
90 {
91 [_secondaryIdentityField setStringValue:@"Dead"];
92 }
93 }
94}

Member Data Documentation

◆ _basicIdentityField

- (IBOutlet NSTextField*) _basicIdentityField
private

Definition at line 36 of file OOObjectDebugInspectorModule.h.

Referenced by awakeFromNib.

◆ _secondaryIdentityField

- (IBOutlet NSTextField*) _secondaryIdentityField
private

Definition at line 37 of file OOObjectDebugInspectorModule.h.

Referenced by awakeFromNib.

◆ _targetSelfButton

- (IBOutlet NSButton*) _targetSelfButton
private

Definition at line 38 of file OOObjectDebugInspectorModule.h.

Referenced by awakeFromNib.


The documentation for this class was generated from the following files: