home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-Developer.iso / NextLibrary / PrivateFrameworks / ProjectBuilderSCM.framework / Versions / A / Headers / SCMController.h < prev    next >
Encoding:
Text File  |  1997-02-25  |  4.5 KB  |  149 lines

  1. //--------------------------------------------------------------------------
  2. //  Copyright (c) 1996 Next Software, Inc., All Rights Reserved
  3. //
  4. //  No part of this code may be reproduced in any form, compiled
  5. //  or source code, nor used for any purpose without the express
  6. //  written permission of the copyright holder.
  7. //
  8. //  $Id: SCMController.h,v 1.2 1997/02/25 03:47:09 mmonegan Exp $
  9. //--------------------------------------------------------------------------
  10.  
  11. #import <AppKit/AppKit.h>
  12.  
  13. #import <ProjectBuilder/PBBundleHost.h>
  14.  
  15. #import "ProjectBuilderSCMDefines.h"
  16.  
  17. @class SCMAdaptor;
  18. @class SCMPreferences;
  19.  
  20. //private filter which puts files selected in PB into SCM panel
  21. PBSCM_EXTERN NSString *_SCMFilterSelectedFilesInPB;
  22.  
  23. //dictionary file containing default UI string mapppings for the SCM filters and //operations
  24. #define DEFAULT_SCM_INFO_FILE @"Default.scminfo"
  25.  
  26. //tags used to identify menu items-must be unique in menu - don't use elsewhere
  27. #define NEW_WORK_AREA_PROJECT_MENU_TAG 2234
  28. #define UPDATE_PROJECT_MENU_TAG 2235
  29. #define TAG_PROJECT_MENU_TAG 2236
  30. #define CHECK_IN_PROJECT_MENU_TAG 2237
  31. #define UPDATE_FILE_MENU_TAG 2238
  32. #define CHECK_IN_FILE_MENU_TAG 2239
  33. #define LOCK_FILE_MENU_TAG 2240
  34. #define UNLOCK_FILE_MENU_TAG 2241
  35. #define TAG_FILE_MENU_TAG 2242
  36. #define SHOW_CHANGES_FILE_MENU_TAG 2243
  37.  
  38. //IB hack
  39. #define IBOutlet
  40.  
  41. @interface SCMController : NSObject <PBConfigManager>
  42. {
  43. //outlets
  44.  
  45. //new work area 
  46.     IBOutlet NSWindow *repositoryWindow;
  47.     IBOutlet NSTextField *directory;
  48.     IBOutlet NSTextField *repository;
  49.     IBOutlet NSPopUpButton *repositoryType;
  50.     IBOutlet NSPanel *alertPanel;
  51.     IBOutlet NSTextField *alertRepository;
  52.     IBOutlet NSTextField *alertWorkDirectory;
  53.  
  54. //SCM console
  55.     IBOutlet NSTextView *console;
  56.  
  57. //SCM panel
  58.     IBOutlet NSTableView *tableview;
  59.     IBOutlet NSButton *refreshButton;
  60.     IBOutlet NSPopUpButton *filterButton;
  61.     IBOutlet NSButton *showChangesButton;
  62.     IBOutlet NSButton *displayHistoryButton;
  63.     IBOutlet NSPopUpButton *operationPopup;
  64.     IBOutlet NSButton *executeButton;
  65.  
  66. //SCM log (comments) entry
  67.     IBOutlet NSTextView *logPrompt;
  68.     IBOutlet NSWindow *logWindow;
  69.     IBOutlet NSTextView *logText;
  70.     IBOutlet NSButton *logOKButton;
  71.  
  72. //preferences panel
  73.     IBOutlet SCMPreferences *scmPreferences;
  74.  
  75. //internal variables
  76.  
  77. @private
  78.     NSMutableDictionary *_projects;  //dict whose keys are project paths and
  79.                                      //whose values are dictionaries containing
  80.                                      //keys:  adaptor,consoleLog,displayRecords.
  81.     NSMutableArray *_adaptorClasses;
  82.     SCMAdaptor *_currentAdaptor;
  83.     NSArray *_displayRecords;
  84.     NSString *_fileFilter;
  85.     BOOL _commitCancelled;
  86. }
  87.  
  88. + (SCMController *)sharedInstance;
  89.  
  90. - (void)awakeFromNib;
  91.  
  92. //Adaptors must register themselves with the controller
  93. - (void)registerAdaptorClass:(Class)class;
  94.  
  95. //Returns the dict in Default.scminfo file.  Adaptors can use this to obtain
  96. //the interface mappings.  This dictionary contains two subdictionaries:
  97. //Filters & Operations.  
  98. - (NSDictionary *)defaultSCMInfo;  
  99.  
  100. //the following method displays an error (usually used for error on asynchronous
  101. //adaptor operations).  the error is put in the adaptor console, and optionally
  102. //printed in a modal alert panel shown to the user.  
  103. - (void)displayErrorWithMessage:(NSString *)message
  104.                           title:(NSString *)title
  105.                      forAdaptor:(SCMAdaptor *)adaptor
  106.                       showAlert:(BOOL)alert;
  107.  
  108. @end
  109.  
  110. @interface SCMController(ActionMethods)
  111. //project menu operations
  112. - (void)showProjectPanel:(id)sender;
  113. - (void)showConsole:(id)sender;
  114. - (void)newWorkArea:(id)sender;
  115. - (void)updateProject:(id)sender;
  116. - (void)tagProject:(id)sender;
  117. - (void)commitChangedFiles:(id)sender;
  118.  
  119. //file menu operations
  120. - (void)showFilePanel:(id)sender;
  121. - (void)updateSelectedFiles:(id)sender;
  122. - (void)commitSelectedFiles:(id)sender;
  123. - (void)lockSelectedFiles:(id)sender;
  124. - (void)unlockSelectedFiles:(id)sender;
  125. - (void)tagSelectedFiles:(id)sender;
  126. - (void)showChangesForSelectedFiles:(id)sender;
  127.  
  128. //new work area
  129. - (void)cancelWorkArea:(id)sender;
  130. - (void)createWorkArea:(id)sender;
  131. - (void)setRepositoryPath:(id)sender;
  132. - (void)setWorkDirectory:(id)sender;
  133.  
  134. //SCM panel
  135. - (void)refresh:(id)sender;
  136. - (void)showChanges:(id)sender;
  137. - (void)displayHistory:(id)sender;
  138. - (void)execute:(id)sender;
  139. - (void)cancel:(id)sender;
  140. - (void)setFilter:(id)sender;
  141.  
  142. //log window
  143. - (void)okLogWindow:(id)sender;
  144. - (void)cancelLogWindow:(id)sender;
  145.  
  146. //history window
  147. - (void)clearHistory:(id)sender;
  148. @end
  149.