/XeeController.h

https://code.google.com/p/xee/ · C Header · 155 lines · 117 code · 38 blank · 0 comment · 0 complexity · 80f9fa078b33247a72eda3efbe1973e9 MD5 · raw file

  1. #import <Cocoa/Cocoa.h>
  2. #import "XeeFSRef.h"
  3. #define XeeNoMode 0
  4. #define XeeMoveMode 1
  5. #define XeeCopyMode 2
  6. #define XeeDrawerEdgeWidth 6.0
  7. @class XeeImage,XeeImageSource,XeeView,XeeDisplayWindow,XeeFullScreenWindow;
  8. @class XeeCollisionPanel,XeeRenamePanel,XeePasswordPanel,XeeStatusBar,XeeDestinationView;
  9. @class XeeMoveTool,XeeCropTool;
  10. @interface XeeController:NSObject
  11. {
  12. XeeImageSource *source;
  13. XeeImage *currimage;
  14. float zoom;
  15. float touchrotation,touchrotateleftpoint,touchrotaterightpoint;
  16. int window_focus_x,window_focus_y;
  17. BOOL blocked,awake,autofullscreen,delaysheet;
  18. int drawer_mode;
  19. XeeMoveTool *movetool;
  20. XeeCropTool *croptool;
  21. NSDictionary *toolbaritems;
  22. NSArray *toolbaridentifiers;
  23. NSUndoManager *undo;
  24. XeeFullScreenWindow *fullscreenwindow;
  25. NSView *savedsuperview;
  26. NSRect savedframe;
  27. NSTimer *slideshowtimer;
  28. int slideshowcount;
  29. CGImageRef copiedcgimage;
  30. NSMutableArray *tasks;
  31. IBOutlet NSWindow *window;
  32. IBOutlet XeeView *imageview;
  33. IBOutlet XeeStatusBar *statusbar;
  34. IBOutlet NSDrawer *drawer;
  35. IBOutlet NSSegmentedControl *drawerseg;
  36. IBOutlet XeeDestinationView *destinationtable;
  37. IBOutlet NSButton *closebutton;
  38. IBOutlet XeeCollisionPanel *collisionpanel;
  39. IBOutlet XeeRenamePanel *renamepanel;
  40. IBOutlet XeePasswordPanel *passwordpanel;
  41. IBOutlet NSTextField *delayfield;
  42. IBOutlet NSPanel *delaypanel;
  43. }
  44. -(id)init;
  45. -(void)dealloc;
  46. -(void)awakeFromNib;
  47. -(void)windowWillClose:(NSNotification *)notification;
  48. -(void)windowDidBecomeMain:(NSNotification *)notification;
  49. -(void)windowDidResignMain:(NSNotification *)notification;
  50. -(void)windowDidMove:(NSNotification *)notification;
  51. -(void)windowDidResize:(NSNotification *)notification;
  52. -(void)windowWillMiniaturize:(NSNotification *)notification;
  53. -(void)windowDidMiniaturize:(NSNotification *)notification;
  54. -(NSUndoManager *)windowWillReturnUndoManager:(NSNotification *)notification;
  55. -(void)setStatusBarHiddenNotification:(NSNotification *)notification;
  56. -(void)refreshImageNotification:(NSNotification *)notification;
  57. -(void)scrollWheel:(NSEvent *)event;
  58. -(void)beginGestureWithEvent:(NSEvent *)event;
  59. -(void)endGestureWithEvent:(NSEvent *)event;
  60. -(void)magnifyWithEvent:(NSEvent *)event;
  61. -(void)rotateWithEvent:(NSEvent *)event;
  62. -(void)swipeWithEvent:(NSEvent *)event;
  63. -(void)xeeImageSource:(XeeImageSource *)msgsource imageDidChange:(XeeImage *)image;
  64. -(void)xeeImageSource:(XeeImageSource *)source imageListDidChange:(int)num;
  65. -(void)xeeView:(XeeView *)view imageDidChange:(XeeImage *)image;
  66. -(void)xeeView:(XeeView *)view imageSizeDidChange:(XeeImage *)image;
  67. -(void)xeeView:(XeeView *)view imagePropertiesDidChange:(XeeImage *)image;
  68. -(NSWindow *)window;
  69. -(XeeFullScreenWindow *)fullScreenWindow;
  70. -(XeeImageSource *)imageSource;
  71. -(XeeImage *)image;
  72. -(NSDrawer *)drawer;
  73. -(XeeFSRef *)currentRef;
  74. -(NSString *)currentFilename;
  75. -(NSArray *)currentProperties;
  76. -(BOOL)isFullscreen;
  77. -(float)zoom;
  78. -(void)setImageSource:(XeeImageSource *)newsource;
  79. -(void)setImage:(XeeImage *)image;
  80. -(void)setZoom:(float)newzoom;
  81. -(void)setFrame:(int)frame;
  82. -(void)updateWindowPosition;
  83. -(void)setImageSize:(NSSize)size;
  84. -(void)setImageSize:(NSSize)size resetFocus:(BOOL)reset;
  85. -(void)setStandardImageSize;
  86. -(void)setResizeBlock:(BOOL)block;
  87. -(void)setResizeBlockFromSender:(id)sender;
  88. -(BOOL)isResizeBlocked;
  89. -(NSSize)maxViewSize;
  90. -(NSSize)minViewSize;
  91. -(NSRect)availableScreenSpace;
  92. -(void)displayErrorMessage:(NSString *)title text:(NSString *)text;
  93. -(void)displayPossibleError:(NSError *)error;
  94. -(void)displayAlert:(NSAlert *)alert;
  95. -(void)detachBackgroundTaskWithMessage:(NSString *)message selector:(SEL)selector target:(id)target object:(id)object;
  96. -(void)detachBackgroundTask:(NSDictionary *)task;
  97. -(NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)identifier willBeInsertedIntoToolbar:(BOOL)flag;
  98. -(NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar;
  99. -(void)setupToolbarItems;
  100. -(NSArray *)makeToolbarItems;
  101. -(BOOL)validateMenuItem:(NSMenuItem *)item;
  102. -(BOOL)validateAction:(SEL)action;
  103. -(void)updateStatusBar;
  104. -(void)setStatusBarHidden:(BOOL)hidden;
  105. -(BOOL)isStatusBarHidden;
  106. -(IBAction)toggleStatusBar:(id)sender;
  107. -(void)setDrawerEnableState;
  108. -(IBAction)fullScreen:(id)sender;
  109. -(void)autoFullScreen;
  110. -(IBAction)confirm:(id)sender;
  111. -(IBAction)cancel:(id)sender;
  112. @end
  113. @interface XeeFullScreenWindow:NSWindow
  114. {
  115. }
  116. -(BOOL)canBecomeKeyWindow;
  117. @end