1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
|
//
// Lynkeos
// $Id: MyImageListWindow.h,v 1.15 2005/01/27 23:03:52 j-etienne Exp $
//
// Created by Jean-Etienne LAMIAUD on Sat Jan 17 2004.
// Copyright (c) 2003-2005. Jean-Etienne LAMIAUD
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
#ifndef __MYIMAGELISTWINDOW_H
#define __MYIMAGELISTWINDOW_H
#ifdef GNUSTEP
#else
#import <Cocoa/Cocoa.h>
#endif
#include "MyImageListItem.h"
#include "MyObjectImageList.h"
#include "MyImageView.h"
typedef enum
{
ListMode,
AlignMode, Aligning,
AnalyzeMode, Analyzing,
StackMode, Stacking,
ProcessMode
} MyImageListWindowState;
typedef enum
{
DarkFrameMode,
FlatFieldMode,
ImageMode
} MyImageListWindowMode;
/*!
* @class MyImageListWindow
* @abstract The document window controler
* @discussion This class controls the document window.
* It is the first responder for every user action,
* which are propagated to MyDocument.
* It has a direct read access to MyImageList and MyObjectImageList
* for optimisation purpose (document is still called for write accesses).
*
* Its behaviour is controlled by its state :
* <ul>
* <li>ListMode : The list tab is selected,
* <li>AlignMode : The align tab is selected and no alignment is in progress,
* <li>Aligning : The align tab is selected and an alignment is in progress,
* <li>AnalyzeMode : The analyze tab is selected and no analyze is in
* progress,
* <li>Analyzing : The analyze tab is selected and an analyze is in progress,
* <li>StackMode : The stack tab is selected and no stacking is in progress,
* <li>Stacking : The stack tab is selected and stacking is in progress,
* <li>ProcessMode : The process tab is selected.
* </ul>
* @ingroup Controlers
*/
@interface MyImageListWindow : NSWindowController <MyImageViewDelegate>
{
@private
// Related user interface objects
// Views
IBOutlet NSOutlineView* _textView;
IBOutlet NSTabView* _tabPane;
IBOutlet MyImageView* _imageView;
IBOutlet NSPopUpButton* _listMenu;
// List tab
IBOutlet NSButton* _plusButton;
IBOutlet NSButton* _minusButton;
IBOutlet NSButton* _prevButton;
IBOutlet NSButton* _nextButton;
IBOutlet NSButton* _toggleButton;
// Alignment tab
IBOutlet NSTextField *_searchFieldX, *_searchFieldY;
IBOutlet NSPopUpButton* _searchSideMenu;
IBOutlet NSButton* _refCheckBox;
IBOutlet NSButton* _alignButton;
// Analyze tab
IBOutlet NSTextField *_analyzeFieldX, *_analyzeFieldY;
IBOutlet NSPopUpButton* _analyzeSideMenu;
IBOutlet NSButton* _analyzeButton;
IBOutlet NSPopUpButton* _analyzeMethodMenu;
IBOutlet NSSlider* _selectThresholdSlide;
IBOutlet NSTextField *_minQualityText, *_maxQualityText;
// Stack tab
IBOutlet NSTextField *_cropX, *_cropY, *_cropW, *_cropH;
IBOutlet NSButton *_doubleButton, *_monoStackButton;
IBOutlet NSButton *_stackButton;
// Process tab
IBOutlet NSSlider *_deconvRadius, *_deconvThreshold;
IBOutlet NSSlider *_unsharpRadius, *_unsharpGain;
IBOutlet NSSlider *_blackLevel, *_whiteLevel;
IBOutlet NSTextField *_deconvTextRadius, *_deconvTextThreshold;
IBOutlet NSTextField *_unsharpTextRadius, *_unsharpTextGain;
IBOutlet NSTextField *_blackTextLevel, *_whiteTextLevel;
// Window state
MyImageListWindowMode _windowMode;
MyImageListWindowState _windowState;
MyImageListItem* _highlightedItem;
u_short _sideMenuLimit;
bool _processImageUpdate;
bool _fillSideArmed;
double _minQuality, _qualityScale;
// document contents (optimisation to jump over a redirection for reads,
// document is still called for writing)
MyImageList* _currentList;
}
/// \name Accessors
/// Read and write accessors to the class attributes
//@{
- (MyImageListWindowMode) windowMode ;
- (MyImageListWindowState) windowState ;
- (MyImageListItem*) highlightedItem ;
- (void) setWindowState :(MyImageListWindowState)state ;
//@}
/// \name Actions
///Actions comming from the document controller
//@{
- (void) refreshOutline ;
- (void) highlightItem :(MyImageListItem*)item ;
// GUI updating
- (void) updateSidePopup ;
- (void) updateAlignControls ;
- (void) addFiles :(NSArray*)files ;
//@}
/// \name Outline
/// Outline view management
//@{
- (void) outlineViewSelectionDidChange :(NSNotification*)aNotification;
- (id) outlineView:(NSOutlineView *)outlineView child:(int)index
ofItem:(id)item;
- (BOOL) outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item;
- (int) outlineView:(NSOutlineView *)outlineView
numberOfChildrenOfItem:(id)item;
- (id) outlineView:(NSOutlineView *)outlineView
objectValueForTableColumn:(NSTableColumn *)tableColumn
byItem:(id)item;
- (void)outlineView:(NSOutlineView *)outlineView setObjectValue:(id)object
forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item;
//@}
/// \name TabView
/// Tab view management
//@{
- (void)tabView:(NSTabView *)tabView
didSelectTabViewItem:(NSTabViewItem *)tabViewItem;
//@}
/// \name GUIActions
/// Actions which are target of NIB objects
//@{
// Control actions
- (void) searchSquareChange :(id)sender ;
- (void) analyzeSquareChange :(id)sender ;
- (void) analyzeMethodChange :(id)sender ;
- (void) cropRectangleChange :(id)sender ;
// Buttons or menu actions
- (void) modeMenuAction :(id)sender ;
- (void) addAction :(id)sender ;
- (void) deleteAction :(id)sender ;
- (void) referenceAction :(id)sender ;
- (void) toggleEntrySelection :(id)sender ;
- (void) highlightNext :(id)sender ;
- (void) highlightPrevious :(id)sender ;
- (void) doubleButtonAction :(id)sender ;
- (void) monochromeButtonAction :(id)sender ;
- (void) alignAction :(id)sender ;
- (void) autoSelectAction :(id)sender ;
- (void) analyzeAction :(id)sender ;
- (void) stackAction :(id)sender ;
- (void) postProcessAction :(id)sender ;
- (void) changeLevelsAction : (id)sender ;
//@}
@end
#endif
|