Subversion Repositories TruePreview

[/] [trunk/] [Source/] [TruePreviewPreferenceValueTransformer.h] - Blame information for rev 42

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 jhriggs
/*
2 42 jhriggs
 * Copyright (c) 2009-2011, Jim Riggs, Christian Serving, L.L.C.
3 14 jhriggs
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are
7
 * met:
8
 *     * Redistributions of source code must retain the above copyright
9
 *       notice, this list of conditions and the following disclaimer.
10
 *     * Redistributions in binary form must reproduce the above
11
 *       copyright notice, this list of conditions and the following
12
 *       disclaimer in the documentation and/or other materials provided
13
 *       with the distribution.
14
 *     * Neither the name of Christian Serving, L.L.C. nor the names of
15
 *       its contributors may be used to endorse or promote products
16
 *       derived from this software without specific prior written
17
 *       permission.
18
 *
19
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
 */
31
 
32
/*!
33
 * @header
34
 * Defines the <code>TruePreviewPreferenceValueTransformer</code>
35
 * <code>NSValueTransformer</code> subclasses.
36 42 jhriggs
 * @copyright Copyright (c) 2009-2011 Jim Riggs, Christian Serving, L.L.C. All rights reserved.
37 14 jhriggs
 * @version \@(#) $Id: TruePreviewPreferencesModule.h 2 2009-06-27 07:02:45Z jhriggs $
38
 * @updated $Date: 2009-06-27 02:02:45 -0500 (Sat, 27 Jun 2009) $
39
 */
40
 
41
/*!
42
 * @class
43
 * The <code>TruePreviewPreferenceValueTransformer</code> class is the subclass
44
 * of <code>NSValueTransformer</code> that selects the correct radio button in
45
 * the TruePreview preferences panel.
46
 * @version \@(#) $Id: TruePreviewPreferencesModule.h 2 2009-06-27 07:02:45Z jhriggs $
47
 * @updated $Date: 2009-06-27 02:02:45 -0500 (Sat, 27 Jun 2009) $
48
 */
49
@interface TruePreviewPreferenceValueTransformer : NSValueTransformer {
50
}
51
 
52
#pragma mark NSValueTransformer class methods
53
/*! @group NSValueTransformer class methods */
54
 
55
/*!
56
 * Returns the class of transformed values for this value transformer
57
 * (NSNumber).
58
 * @result
59
 *   <code>[NSNumber class]</code>.
60
 */
61
+ (Class)transformedValueClass;
62
 
63
#pragma mark NSValueTransformer instance methods
64
/*! @group NSValueTransformer instance methods */
65
 
66
/*!
67
 * Returns an <code>NSNumber</code> equivalent to the provided value if the
68
 * value is <code>TRUEPREVIEW_DELAY_IMMEDIATE</code>,
69
 * <code>TRUEPREVIEW_DELAY_DEFAULT</code>,
70
 * <code>TRUEPREVIEW_DELAY_NEVER</code>, or &gt; 0 to
71
 * <code>TRUEPREVIEW_DELAY_MAX</code>; otherwise,
72
 * <code>TRUEPREVIEW_DELAY_DEFAULT</code> is returned.
73
 * @param inValue
74
 *   The value being transformed.
75
 * @result
76
 *   An <code>NSNumber</code> containing the transformed value.
77
 */
78
- (id)transformedValue:(id)inValue;
79
 
80
@end
81
 
82
/*!
83
 * @class
84
 * The <code>TruePreviewPreferenceValueTransformerDelay</code> class is the
85
 * subclass of <code>NSValueTransformer</code> that provides a value appropriate
86
 * to display in controls in the TruePreview preferences panel.
87
 * @version \@(#) $Id: TruePreviewPreferencesModule.h 2 2009-06-27 07:02:45Z jhriggs $
88
 * @updated $Date: 2009-06-27 02:02:45 -0500 (Sat, 27 Jun 2009) $
89
 */
90
@interface TruePreviewPreferenceValueTransformerDelay : NSValueTransformer {
91
}
92
 
93
#pragma mark NSValueTransformer class methods
94
/*! @group NSValueTransformer class methods */
95
 
96
/*!
97
 * Returns the class of transformed values for this value transformer
98
 * (NSNumber).
99
 * @result
100
 *   <code>[NSNumber class]</code>.
101
 */
102
+ (Class)transformedValueClass;
103
 
104
#pragma mark NSValueTransformer instance methods
105
/*! @group NSValueTransformer instance methods */
106
 
107
/*!
108
 * Returns an <code>NSNumber</code> for displaying the delay in controls (i.e.
109
 * &gt; 0 to <code>TRUEPREVIEW_DELAY_MAX</code> or <code>nil</code>).
110
 * @param inValue
111
 *   The value being transformed.
112
 * @result
113
 *   An <code>NSNumber</code> containing the transformed value.
114
 */
115
- (id)transformedValue:(id)inValue;
116
 
117
@end
118
 
119
/*!
120
 * @class
121
 * The <code>TruePreviewPreferenceValueTransformerDelayEditIndicator</code>
122
 * class is the subclass of <code>NSValueTransformer</code> that indicates
123
 * whether or not delay controls should be enabled in the TruePreview
124
 * preferences panel.
125
 * @version \@(#) $Id: TruePreviewPreferencesModule.h 2 2009-06-27 07:02:45Z jhriggs $
126
 * @updated $Date: 2009-06-27 02:02:45 -0500 (Sat, 27 Jun 2009) $
127
 */
128
@interface TruePreviewPreferenceValueTransformerDelayEditIndicator : NSValueTransformer {
129
}
130
 
131
#pragma mark NSValueTransformer class methods
132
/*! @group NSValueTransformer class methods */
133
 
134
/*!
135
 * Returns the class of transformed values for this value transformer
136
 * (NSNumber).
137
 * @result
138
 *   <code>[NSNumber class]</code>.
139
 */
140
+ (Class)transformedValueClass;
141
 
142
#pragma mark NSValueTransformer instance methods
143
/*! @group NSValueTransformer instance methods */
144
 
145
/*!
146
 * Returns an <code>NSNumber</code> indicating whether or not delay controls
147
 * should be enabled (i.e. delay is &gt; 0 to
148
 * <code>TRUEPREVIEW_DELAY_MAX</code>).
149
 * @param inValue
150
 *   The value being transformed.
151
 * @result
152
 *   An <code>NSNumber</code> containing the transformed value.
153
 */
154
- (id)transformedValue:(id)inValue;
155
 
156
@end