1 /***************************************************************************** 2 * VLCDefaultValueSliderCell.h: SliderCell subclass for VLCDefaultValueSlider 3 ***************************************************************************** 4 * Copyright (C) 2016 VLC authors and VideoLAN 5 * $Id: a907faabfb1759e841b3450a3fdb199b2be0f8ea $ 6 * 7 * Authors: Marvin Scholz <epirat07 -at- gmail -dot- com> 8 * 9 * This program is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License as published by 11 * the Free Software Foundation; either version 2 of the License, or 12 * (at your option) any later version. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this program; if not, write to the Free Software 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 *****************************************************************************/ 23 24 #import <Cocoa/Cocoa.h> 25 26 /** 27 \c VLCDefaultValueSliderCell is the cell use by the 28 \c VLCDefaultValueSlider class. 29 */ 30 @interface VLCDefaultValueSliderCell : NSSliderCell 31 32 /** 33 Indicates if a tickmark should be drawn for the \c defaultValue 34 */ 35 @property (readwrite) BOOL drawTickMarkForDefault; 36 37 /** 38 Indicates if the slider knob should snap to the \c defaultValue 39 */ 40 @property (readwrite) BOOL snapsToDefault; 41 42 /** 43 The default value of the slider 44 45 \note It may not be equal to \c DBL_MAX, as this is the value 46 that it should be set to, if no defaultValue is desired. 47 */ 48 @property (getter=defaultValue, setter=setDefaultValue:) double defaultValue; 49 50 /** 51 Color of the default tick mark 52 */ 53 @property (getter=defaultTickMarkColor, setter=setDefaultTickMarkColor:) NSColor *defaultTickMarkColor; 54 55 /** 56 Draws the tick mark for the \c defaultValue in the 57 given rect. 58 59 \note Override this in a subclass if you need to customize the 60 tickmark that is drawn for the \c defaultValue 61 62 \param rect The rect in which the tickMark should be drawn 63 */ 64 - (void)drawDefaultTickMarkWithFrame:(NSRect)rect; 65 66 @end 67