Changeset 15334
- Timestamp:
- 02/24/2006 04:18:18 PM (3 years ago)
- Files:
-
- trunk/Frameworks/AIUtilities Framework/Source/AIAutoScrollView.h (modified) (3 diffs)
- trunk/Frameworks/AIUtilities Framework/Source/AIAutoScrollView.m (modified) (6 diffs)
- trunk/Plugins/Logger/AILogViewerWindowController.h (modified) (1 diff)
- trunk/Plugins/Logger/AILogViewerWindowController.m (modified) (1 diff)
- trunk/Source/AIInterfaceController.h (modified) (1 diff)
- trunk/Source/ESFastUserSwitchingSupportPlugin.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Frameworks/AIUtilities Framework/Source/AIAutoScrollView.h
r9732 r15334 19 19 * 20 20 * This <tt>NSScrollView</tt> subclass adds: 21 * - Automatic scrolling as text is added and automatic hiding of the scroll bar, even on 10.2 (these features were added in 10.3)22 21 * - Methods to scroll to the top and bottom of the view 23 22 * - Key press forwarding to the document view … … 30 29 BOOL inAutoScrollToBottom; 31 30 32 BOOL autoHideScrollBar;33 34 31 BOOL passKeysToDocumentView; 35 32 … … 38 35 NSResponder *lastResp; 39 36 } 40 41 /*!42 * @brief Set if the scroll bar should be automatically hidden and shown as necessary43 *44 * If YES, the scroll bar will be hidden when it is not needed and automatically shown when the document view exceeds the frame available for its display. The default value is NO.45 * @param inValue YES if the scroll bar should be automatically hidden; NO if not.46 */47 - (void)setAutoHideScrollBar:(BOOL)inValue;48 37 49 38 /*! trunk/Frameworks/AIUtilities Framework/Source/AIAutoScrollView.m
r12862 r15334 20 20 @interface AIAutoScrollView (PRIVATE) 21 21 - (void)_initAutoScrollView; 22 - (void)setCorrectScrollbarVisibility;23 22 @end 24 23 … … 29 28 30 29 - Automatically scrolls to bottom on new content 31 - Automatically hides & shows the vertical scroller depending on content height (including on 10.2)32 30 - Shows a focus ring even if the contained view would not normally show one (an NSTextView, for example) 33 31 */ … … 54 52 autoScrollToBottom = NO; 55 53 inAutoScrollToBottom = NO; 56 autoHideScrollBar = NO;57 54 passKeysToDocumentView = NO; 58 55 … … 62 59 shouldDrawFocusRing = NO; 63 60 64 [self setAuto HideScrollBar:YES];61 [self setAutohidesScrollers:YES]; 65 62 } 66 63 … … 146 143 } 147 144 148 //Called as the view resizes or scrolls149 - (void)reflectScrolledClipView:(NSClipView *)cView150 {151 [super reflectScrolledClipView:cView];152 153 //Set our correct scrollbar visibility154 if (autoHideScrollBar) {155 [self setCorrectScrollbarVisibility];156 }157 }158 159 145 //Scroll to the top of our view 160 146 - (void)scrollToTop … … 167 153 { 168 154 [[self documentView] scrollPoint:NSMakePoint(0, 1000000)]; 169 }170 171 172 //Automatic scrollbar hiding ---------------------------------------------------------------173 #pragma mark Automatic scrollbar hiding174 - (void)setAutoHideScrollBar:(BOOL)inValue175 {176 autoHideScrollBar = inValue;177 178 if (autoHideScrollBar) [self setCorrectScrollbarVisibility];179 }180 181 //Hides or shows the scrollbar as necessary182 - (void)setCorrectScrollbarVisibility183 {184 float visibleHeight = [self documentVisibleRect].size.height;185 float totalHeight = [[self documentView] frame].size.height;186 187 //Hide or show scrollbar188 if (totalHeight > visibleHeight) {189 if (![self hasVerticalScroller]) [self setHasVerticalScroller:YES];190 } else {191 if ( [self hasVerticalScroller]) [self setHasVerticalScroller:NO];192 }193 155 } 194 156 trunk/Plugins/Logger/AILogViewerWindowController.h
r12010 r15334 39 39 IBOutlet NSTextView *textView_content; 40 40 IBOutlet id searchField_logs; //May be an NSSearchField or an NSTextField 41 IBOutlet NSPopUpButton *popUp_jagSearchMode; //Used in the jag log viewer to select search mode42 41 IBOutlet NSProgressIndicator *progressIndicator; 43 42 IBOutlet NSTextField *textField_progress; trunk/Plugins/Logger/AILogViewerWindowController.m
r15227 r15334 1165 1165 [cellMenu addItem:[self _menuItemWithTitle:TO forSearchMode:LOG_SEARCH_TO]]; 1166 1166 [cellMenu addItem:[self _menuItemWithTitle:DATE forSearchMode:LOG_SEARCH_DATE]]; 1167 if (!popUp_jagSearchMode) [cellMenu addItem:[self _menuItemWithTitle:CONTENT forSearchMode:LOG_SEARCH_CONTENT]]; //Not in jag 1168 1169 //In 10.2 we use a popup button here, later we use the search field's embedded menu 1170 if (popUp_jagSearchMode) { 1171 [popUp_jagSearchMode setMenu:cellMenu]; 1172 [popUp_jagSearchMode selectItem:[cellMenu itemWithTag:searchMode]]; 1173 } else { 1174 [[searchField_logs cell] setSearchMenuTemplate:cellMenu]; 1175 } 1167 [cellMenu addItem:[self _menuItemWithTitle:CONTENT forSearchMode:LOG_SEARCH_CONTENT]]; 1176 1168 } 1177 1169 trunk/Source/AIInterfaceController.h
r14153 r15334 119 119 //Identifiers for the various message views 120 120 typedef enum { 121 DCStandardMessageView = 1, // 10.2 only, unlesswebkit is not available121 DCStandardMessageView = 1, //webkit is not available 122 122 DCWebkitMessageView //Preferred message view 123 123 } DCMessageViewType; trunk/Source/ESFastUserSwitchingSupportPlugin.m
r14882 r15334 106 106 * 107 107 * Calling this with (notification == nil) is the same as when the user switches back. 108 * Do not call this method in OS X 10.2.x.109 108 * 110 109 * @param notification The notification has a name NSWorkspaceSessionDidResignActiveNotification when the user switches away and NSWorkspaceSessionDidBecomeActiveNotification when the user switches back.