From 99bd9f2e84c551a62f8ad02cb2b061c56aa2d7f1 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 4 Aug 2007 14:33:59 -0700 Subject: [PATCH] Styling the NSTextView source viewer to be a fixed-width font and to have a horizontal scroll bar * Enblish.lproj/Debugger.nib: Adding an outlet for the NSScrollView and setting some NSTextView options * Source/DebuggerController.m: ([DebuggerWindowController awakeFromNib]): New method to set up the scrolling system for the source viewer ([DebuggerWindowController updateSourceViewer]): Set the string to "" if there is no selected file, and make the font Monaco --- English.lproj/Debugger.nib/classes.nib | 1 + English.lproj/Debugger.nib/keyedobjects.nib | Bin 14749 -> 14835 bytes Source/DebuggerWindowController.h | 1 + Source/DebuggerWindowController.m | 17 ++++++++++++++++- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/English.lproj/Debugger.nib/classes.nib b/English.lproj/Debugger.nib/classes.nib index 0aaa174..ec73ec1 100644 --- a/English.lproj/Debugger.nib/classes.nib +++ b/English.lproj/Debugger.nib/classes.nib @@ -7,6 +7,7 @@ OUTLETS = { "_error" = NSTextField; "_sourceViewer" = NSTextView; + "_sourceViewerScroller" = NSScrollView; "_stackController" = NSArrayController; "_status" = NSTextField; }; diff --git a/English.lproj/Debugger.nib/keyedobjects.nib b/English.lproj/Debugger.nib/keyedobjects.nib index a5c556ad78f334c9ae7796daf5a29f666263cb3b..3d6b98416e02fb20c9073812bceb35d7044786f5 100644 GIT binary patch delta 6516 zcmb7H33wF6w(hQ~o_*=r_kA)m-P1iJVHE@-o2&^!2s@D_AR4kKL;_3?asgQ*4Utt4 z0!G<4k$o2t5fKoP9Ti2z1rYUu@+uQVefPcZdvE%iuI@UgPW|Wnr%rV(Exl7(J(?Ww z%Jbj)GC(?b3bX?qK@ZRi3Rroc&--Nf|_wWb!BfJCe!k^(U@K^X7{5Sj^k;sUg$c20;gu-#eAs(fp#;6%; zg`Py6P(PH5o<&2^Ff<(Hp;0IwjX?#d5S5@8(Ku9v#-o>TI~n~8&BX02G#kyw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Q2ug36#Os0lJbUCK@7uO$kj4 z38AM#u^FLRp*f-FLa&Cdggy^l4}BT>D)de0+ps1a3O^Rk2tOXq3}=V?gmc2>;kxkZ z@Y?YD@P_cF@Xqkj@bU1;@T=k1!|#Q!gg*~|5&mcR>+mlTMMM?RMsyKF#1Y{mEh6cW zR*^Q5$0L0svmUGvN5tbvNiH-WP4<1WOwBG z$iB$_$P1B!kt2~;BX36DXJxE{Rk0eDVfCz$HM17h#yVIR>tTItfDN)?mSs6Mg-vDC z*;Z^DwjJA^eT2FvV3)Hi+12b? zc0Kznd!D_-e$0N#USY4XU$S4b-?BH^AK0JRU)j4+Dhi{Ls648QYNPt7DQb!OqiNAj z(O%KK=-6mgG!~s7T@~FC-4{I`Jrg}2y%7B{dNula^o!{CTsN)<_XL;8WpjPF9Iih% zfXm|s$GD+fJ~x6J$rW&8xp7<(SIm`i&lmG$d?jDaPv)oa(|Cb@il4#H;^**n zd_BK_U&Jrrm-5T_75plG4gWO1p5MT4;QT{l8 pf`r diff --git a/Source/DebuggerWindowController.h b/Source/DebuggerWindowController.h index ed30336..3d5c333 100644 --- a/Source/DebuggerWindowController.h +++ b/Source/DebuggerWindowController.h @@ -29,6 +29,7 @@ IBOutlet NSTextField *_error; IBOutlet NSTextView *_sourceViewer; + IBOutlet NSScrollView *_sourceViewerScroller; NSString *_currentFile; } diff --git a/Source/DebuggerWindowController.m b/Source/DebuggerWindowController.m index e9f91e5..0a0c78a 100644 --- a/Source/DebuggerWindowController.m +++ b/Source/DebuggerWindowController.m @@ -37,6 +37,20 @@ return self; } +/** + * Before the display get's comfortable, set up the NSTextView to scroll horizontally + */ +- (void)awakeFromNib +{ + // set up the scroller for the source viewer + [_sourceViewer setMaxSize: NSMakeSize(FLT_MAX, FLT_MAX)]; + [[_sourceViewer textContainer] setContainerSize: NSMakeSize(FLT_MAX, FLT_MAX)]; + [[_sourceViewer textContainer] setWidthTracksTextView: NO]; + [_sourceViewer setHorizontallyResizable: YES]; + [_sourceViewerScroller setHasHorizontalScroller: YES]; + [_sourceViewerScroller display]; +} + /** * Release object members */ @@ -121,7 +135,6 @@ { [self updateSourceViewer]; } - /** * Does the actual updating of the source viewer by reading in the file */ @@ -131,6 +144,7 @@ if (filename == NSNoSelectionMarker) { _currentFile = nil; + [_sourceViewer setString: @""]; return; } @@ -142,6 +156,7 @@ _currentFile = filename; [_sourceViewer setString: [NSString stringWithContentsOfFile: _currentFile]]; + [_sourceViewer setFont: [NSFont fontWithName: @"Monaco" size: 10.0]]; } @end -- 2.43.5