PageRenderTime 27ms CodeModel.GetById 15ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

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