aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTablesList.h
diff options
context:
space:
mode:
authorsqlprodev <sqlprodev@northofthree.com>2011-04-11 20:29:49 +0000
committersqlprodev <sqlprodev@northofthree.com>2011-04-11 20:29:49 +0000
commit0ce916eb0583ec6b062786f91bee0133906671ce (patch)
tree68a5767ded966f4eadf53ba9ce85bcaf6d31b951 /Source/SPTablesList.h
parent2621e79c75a0119a54c669b263caa82183bd19c8 (diff)
downloadsequelpro-0ce916eb0583ec6b062786f91bee0133906671ce.tar.gz
sequelpro-0ce916eb0583ec6b062786f91bee0133906671ce.tar.bz2
sequelpro-0ce916eb0583ec6b062786f91bee0133906671ce.zip
initial commit of SP_REFACTOR ifdefs, the start of a long quest to separate UI code from functional code
Diffstat (limited to 'Source/SPTablesList.h')
-rw-r--r--Source/SPTablesList.h39
1 files changed, 27 insertions, 12 deletions
diff --git a/Source/SPTablesList.h b/Source/SPTablesList.h
index 42f49f60..914295a5 100644
--- a/Source/SPTablesList.h
+++ b/Source/SPTablesList.h
@@ -26,6 +26,7 @@
#import <MCPKit/MCPKit.h>
@class SPHistoryController, SPTableView;
+@class SPDatabaseDocument;
@interface NSObject (NSSplitView)
@@ -38,7 +39,8 @@
@interface SPTablesList : NSObject
{
- IBOutlet id tableDocumentInstance;
+ SPDatabaseDocument* tableDocumentInstance;
+#ifndef SP_REFACTOR /* ivars */
IBOutlet id tableSourceInstance;
IBOutlet id tableContentInstance;
IBOutlet id customQueryInstance;
@@ -79,9 +81,11 @@
IBOutlet NSMenuItem *separatorTableMenuItem;
IBOutlet NSMenuItem *showCreateSyntaxMenuItem;
IBOutlet NSMenuItem *separatorTableMenuItem2;
+#endif
MCPConnection *mySQLConnection;
+#ifndef SP_REFACTOR /* ivars */
// Table list context menu items
IBOutlet NSMenuItem *removeTableContextMenuItem;
IBOutlet NSMenuItem *duplicateTableContextMenuItem;
@@ -91,25 +95,34 @@
IBOutlet NSMenuItem *separatorTableContextMenuItem;
IBOutlet NSMenuItem *showCreateSyntaxContextMenuItem;
IBOutlet NSMenuItem *separatorTableContextMenuItem2;
+#endif
NSMutableArray *tables;
+#ifndef SP_REFACTOR /* ivars */
NSMutableArray *filteredTables;
+#endif
NSMutableArray *tableTypes;
+#ifndef SP_REFACTOR /* ivars */
NSMutableArray *filteredTableTypes;
- SPTableType selectedTableType;
+#endif
+ NSInteger selectedTableType;
NSString *selectedTableName;
+#ifndef SP_REFACTOR /* ivars */
BOOL isTableListFiltered;
BOOL tableListIsSelectable;
+#endif
BOOL tableListContainsViews;
-
+#ifndef SP_REFACTOR /* ivars */
BOOL alertSheetOpened;
NSFont *smallSystemFont;
-
+#endif
}
// IBAction methods
- (IBAction)updateTables:(id)sender;
+
+#ifndef SP_REFACTOR /* method decls */
- (IBAction)addTable:(id)sender;
- (IBAction)closeSheet:(id)sender;
- (IBAction)removeTable:(id)sender;
@@ -118,13 +131,11 @@
- (IBAction)truncateTable:(id)sender;
- (IBAction)openTableInNewTab:(id)sender;
- (IBAction)togglePaneCollapse:(id)sender;
-
-// Alert sheet callbacks
-- (void)sheetDidEnd:(id)sheet returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo;
-
+#endif
// Additional methods
- (void)setConnection:(MCPConnection *)theConnection;
- (void)setSelectionState:(NSDictionary *)selectionDetails;
+#ifndef SP_REFACTOR /* method decls */
- (void)selectTableAtIndex:(NSNumber *)row;
- (void)makeTableListFilterHaveFocus;
@@ -132,6 +143,7 @@
- (NSArray *)selectedTableNames;
- (NSArray *)selectedTableItems;
- (NSArray *)selectedTableTypes;
+#endif
- (NSString *)tableName;
- (SPTableType)tableType;
- (NSArray *)tables;
@@ -147,12 +159,9 @@
// Setters
- (BOOL)selectItemWithName:(NSString *)theName;
+#ifndef SP_REFACTOR /* method decls */
- (BOOL)selectItemsWithNames:(NSArray *)theNames;
-// Data validation
-- (BOOL)isTableNameValid:(NSString *)tableName forType:(SPTableType)tableType;
-- (BOOL)isTableNameValid:(NSString *)tableName forType:(SPTableType)tableType ignoringSelectedTable:(BOOL)ignoreSelectedTable;
-
// Table list filter interaction
- (void) showFilter;
- (void) hideFilter;
@@ -163,5 +172,11 @@
- (void) startDocumentTaskForTab:(NSNotification *)aNotification;
- (void) endDocumentTaskForTab:(NSNotification *)aNotification;
- (void) setTableListSelectability:(BOOL)isSelectable;
+#endif
+- (BOOL)isTableNameValid:(NSString *)tableName forType:(SPTableType)tableType;
+- (BOOL)isTableNameValid:(NSString *)tableName forType:(SPTableType)tableType ignoringSelectedTable:(BOOL)ignoreSelectedTable;
+#ifdef SP_REFACTOR /* method decls */
+- (void)setDatabaseDocument:(SPDatabaseDocument*)val;
+#endif
@end