diff options
author | rowanbeentje <rowan@beent.je> | 2010-08-16 00:15:28 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-08-16 00:15:28 +0000 |
commit | a4b8942109134428b04f355679e410146d07ff89 (patch) | |
tree | 56d8169ec47c41881b1b59ee6abe22b8189b5af7 /Source/CMCopyTable.h | |
parent | 0d927d60ad66010af39e7c171ebbac4feb5e84f4 (diff) | |
download | sequelpro-a4b8942109134428b04f355679e410146d07ff89.tar.gz sequelpro-a4b8942109134428b04f355679e410146d07ff89.tar.bz2 sequelpro-a4b8942109134428b04f355679e410146d07ff89.zip |
- Apply column autosizing improvements to custom query loading
- Move Table Content progress tracking onto the main thread's load timer
- Improve thread safety when autosizing
- Improve autosize to not contrain wide columns as much in tables where all columns can be shown, or if the column is double-clicked to size.
(This completes work on Issue #271 and Issue #272)
Diffstat (limited to 'Source/CMCopyTable.h')
-rw-r--r-- | Source/CMCopyTable.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/CMCopyTable.h b/Source/CMCopyTable.h index 948607bc..c7a6280a 100644 --- a/Source/CMCopyTable.h +++ b/Source/CMCopyTable.h @@ -25,7 +25,8 @@ #import <AppKit/AppKit.h> #import "SPTableView.h" -#define SP_MAX_CELL_WIDTH 200 +#define SP_MAX_CELL_WIDTH_MULTICOLUMN 200 +#define SP_MAX_CELL_WIDTH 400 @class SPDataStorage; @@ -115,7 +116,7 @@ - (void)setTableData:(SPDataStorage *)theTableStorage; /*! - @method autodetectColumnWidthsForFont: + @method autodetectColumnWidths @abstract Autodetect and return column widths based on contents @discussion Support autocalculating column widths for the represented data. This uses the underlying table storage, calculates string widths, @@ -123,13 +124,12 @@ Suitable for calling on background threads, but ensure that the data storage range in use (currently rows 1-200) won't be altered while this accesses it. - @param The font to use when calculating widths @result A dictionary - mapped by column identifier - of the column widths to use */ -- (NSDictionary *) autodetectColumnWidthsForFont:(NSFont *)theFont; +- (NSDictionary *) autodetectColumnWidths; /*! - @method autodetectWidthForColumnDefinition:usingFont:maxRows: + @method autodetectWidthForColumnDefinition:maxRows: @abstract Autodetect and return column width based on contents @discussion Support autocalculating column width for the represented data. This uses the underlying table storage, and the supplied column definition, @@ -138,7 +138,6 @@ Suitable for calling on background threads, but ensure that the data storage range in use won't be altered while being accessed. @param A column definition for a represented column; the column to use is derived - @param The font to use when calculating widths @param The maximum number of rows to process when looking at string lengths @result A reasonable column width to use when displaying data */ @@ -146,7 +145,7 @@ * Autodetect the column width for a specified column - derived from the supplied * column definition, using the stored data and the specified font. */ -- (NSUInteger)autodetectWidthForColumnDefinition:(NSDictionary *)columnDefinition usingFont:(NSFont *)theFont maxRows:(NSUInteger)rowsToCheck; +- (NSUInteger)autodetectWidthForColumnDefinition:(NSDictionary *)columnDefinition maxRows:(NSUInteger)rowsToCheck; @end |