Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 99 lines (76 sloc) 3.309 kB
7aef368 (UNINTELLIGIBLE)
Zachary Schneirov authored
1 /* NotesTableView */
c0a429b use a license header
Zachary Schneirov authored
2 /*Copyright (c) 2010, Zachary Schneirov. All rights reserved.
3 Redistribution and use in source and binary forms, with or without modification, are permitted
4 provided that the following conditions are met:
5 - Redistributions of source code must retain the above copyright notice, this list of conditions
6 and the following disclaimer.
7 - Redistributions in binary form must reproduce the above copyright notice, this list of
8 conditions and the following disclaimer in the documentation and/or other materials provided with
9 the distribution.
10 - Neither the name of Notational Velocity nor the names of its contributors may be used to endorse
11 or promote products derived from this software without specific prior written permission. */
12
7aef368 (UNINTELLIGIBLE)
Zachary Schneirov authored
13
14 #import <Cocoa/Cocoa.h>
15
16 @class HeaderViewWithMenu;
17 @class NoteAttributeColumn;
18 @class GlobalPrefs;
19
20 typedef struct _ViewLocationContext {
21 BOOL pivotRowWasEdge;
22 id nonRetainedPivotObject;
23 float verticalDistanceToPivotRow;
24 } ViewLocationContext;
25
26
27 @interface NotesTableView : NSTableView {
28 IBOutlet NSTextField *controlField;
29 NSMutableArray *allColumns;
f0f3410 @scrod better handling of note label-previews
scrod authored
30 NSMutableDictionary *allColsDict;
7aef368 (UNINTELLIGIBLE)
Zachary Schneirov authored
31
238f532 Changes for 64-bit compatibility by Brian Bergstrand: Keyed archiving…
Zachary Schneirov authored
32 NSInteger firstRowIndexBeforeSplitResize;
7aef368 (UNINTELLIGIBLE)
Zachary Schneirov authored
33
34 BOOL viewMenusValid;
35 BOOL hadHighlightInForeground, hadHighlightInBackground;
2f1afc3 @scrod change visual row highlighting; grab activestyle from notestableview …
scrod authored
36 BOOL shouldUseSecondaryHighlightColor, isActiveStyle;
f0f3410 @scrod better handling of note label-previews
scrod authored
37 BOOL lastEventActivatedTagEdit;
7aef368 (UNINTELLIGIBLE)
Zachary Schneirov authored
38
39 GlobalPrefs *globalPrefs;
40 NSMenuItem *dummyItem;
41 HeaderViewWithMenu *headerView;
42 NSView *cornerView;
eded520 @scrod multiline previews for horizontal view using UnifiedCell; NoteAttribu…
scrod authored
43 NSTextFieldCell *cachedCell;
7aef368 (UNINTELLIGIBLE)
Zachary Schneirov authored
44
45 NSDictionary *loadStatusAttributes;
46 float loadStatusStringWidth;
47 NSString *loadStatusString;
200d3ba @scrod better preview-less horizontal mode layout
scrod authored
48
49 float tableFontHeight;
7aef368 (UNINTELLIGIBLE)
Zachary Schneirov authored
50
51 int affinity;
52 }
53
54 - (void)noteFirstVisibleRow;
55 - (void)makeFirstPreviouslyVisibleRowVisibleIfNecessary;
56
57 - (ViewLocationContext)viewingLocation;
58 - (void)setViewingLocation:(ViewLocationContext)ctx;
b001062 abstract distance-finding method for globalprefs
Zachary Schneirov authored
59 - (double)distanceFromRow:(int)aRow forVisibleArea:(NSRect)visibleRect;
238f532 Changes for 64-bit compatibility by Brian Bergstrand: Keyed archiving…
Zachary Schneirov authored
60 - (void)scrollRowToVisible:(NSInteger)rowIndex withVerticalOffset:(float)offset;
61 - (void)selectRowAndScroll:(NSInteger)row;
200d3ba @scrod better preview-less horizontal mode layout
scrod authored
62
63 - (float)tableFontHeight;
7aef368 (UNINTELLIGIBLE)
Zachary Schneirov authored
64
2f1afc3 @scrod change visual row highlighting; grab activestyle from notestableview …
scrod authored
65 - (BOOL)isActiveStyle;
7aef368 (UNINTELLIGIBLE)
Zachary Schneirov authored
66 - (void)setShouldUseSecondaryHighlightColor:(BOOL)value;
eded520 @scrod multiline previews for horizontal view using UnifiedCell; NoteAttribu…
scrod authored
67 - (void)_setActiveStyleState:(BOOL)activeStyle;
48ee410 even more accurate note-preview-condition testing
Zachary Schneirov authored
68 - (void)updateTitleDereferencorState;
975af15 "Tag" menu command no longer pushes columns outside of the window; ch…
Zachary Schneirov authored
69
70 - (void)reloadDataIfNotEditing;
7aef368 (UNINTELLIGIBLE)
Zachary Schneirov authored
71
72 - (void)restoreColumns;
cccca64 @scrod extract more runtime-configurable properties for horizontal mode
scrod authored
73 - (void)_configureAttributesForCurrentLayout;
7aef368 (UNINTELLIGIBLE)
Zachary Schneirov authored
74 - (void)updateHeaderViewForColumns;
f0f3410 @scrod better handling of note label-previews
scrod authored
75 - (BOOL)eventIsTagEdit:(NSEvent*)event forColumn:(NSInteger)columnIndex row:(NSInteger)rowIndex;
76 - (BOOL)lastEventActivatedTagEdit;
7aef368 (UNINTELLIGIBLE)
Zachary Schneirov authored
77 - (void)editRowAtColumnWithIdentifier:(id)identifier;
200d3ba @scrod better preview-less horizontal mode layout
scrod authored
78 - (BOOL)addPermanentTableColumn:(NSTableColumn*)column;
7aef368 (UNINTELLIGIBLE)
Zachary Schneirov authored
79 - (IBAction)actionHideShowColumn:(id)sender;
f509392 showing/hiding note-body previews
Zachary Schneirov authored
80 - (IBAction)toggleNoteBodyPreviews:(id)sender;
7aef368 (UNINTELLIGIBLE)
Zachary Schneirov authored
81 - (void)setStatusForSortedColumn:(id)item;
82 - (void)setSortDirection:(BOOL)direction inTableColumn:(NSTableColumn*)tableColumn;
83 - (NSMenu *)defaultNoteCommandsMenuWithTarget:(id)target;
84 - (NSMenu *)menuForColumnSorting;
85 - (NSMenu *)menuForColumnConfiguration:(NSTableColumn *)inSelectedColumn;
86 - (NoteAttributeColumn*)noteAttributeColumnForIdentifier:(NSString*)identifier;
87
88 - (void)incrementNoteSelection:(id)sender;
89
90 @end
91
92 @interface NSTableView (Private)
93 - (BOOL)_shouldUseSecondaryHighlightColor;
94 - (void)_sizeRowHeaderToFitIfNecessary;
95
96 //10.3 only
97 - (void)_sizeToFitIfNecessary;
98 @end
Something went wrong with that request. Please try again.