forked from DanteBortone/episodic-notes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBWCalendarSplitView.h
90 lines (65 loc) · 3.27 KB
/
BWCalendarSplitView.h
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
/*
Episodic Notes: A personal wiki, note taking app for Mac OSX. Create notes through any application on your computer and keep them in one place.
Copyright (C) 2014. Dante Bortone
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 3 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.
*/
/*
This class was built using BWSplitView.h from BWToolkit
Created by Brandon Walkin (www.brandonwalkin.com) and Fraser Kuyvenhoven.
All code is provided under the New BSD license.
*/
//---------------------------------------------
#import <Cocoa/Cocoa.h>
//---------------------------------------------
@interface BWCalendarSplitView : NSSplitView <NSSplitViewDelegate>
{
NSColor *color;
BOOL colorIsEnabled, dividerCanCollapse, collapsibleSubviewCollapsed;
NSMutableDictionary *minValues, *maxValues, *minUnits, *maxUnits; //minUnits - 0 sets units as points; 1 as percent
NSMutableDictionary *resizableSubviewPreferredProportion, *nonresizableSubviewPreferredSize;
NSArray *stateForLastPreferredCalculations;
int collapsiblePopupSelection;
float uncollapsedSize;
float dimpleDimension;
// Collapse button
NSButton *toggleCollapseButton;
BOOL isAnimating;
//bwsplitview user defined attributes
// for units: value of 0 is points; 1 is percent
NSNumber *minValue1, *minValue2, *minUnit1, *minUnit2, *maxValue1, *maxValue2, *maxUnit1, *maxUnit2;
NSNumber * userDefinedDimpleDimension;
NSNumber * dividerThickness;
//to store size of collapsed view after closing program and when restoring the size of the collapsed view
NSString * userDefaultUncollapseSizeKey;
NSString * userDefaultHiddenStateKey;
//for optional settings:
// 0 neither pane
// 1 left/top pane
// 2 right/bottom pane
int preventResizingOfView;
int setCollapsibleView;
BOOL collapseByDrag;
BOOL collapseByDividerClick;
}
@property (strong) NSNumber *userUncollapseSize;
@property (nonatomic, strong) NSMutableDictionary *minValues, *maxValues, *minUnits, *maxUnits;
@property (strong) NSMutableDictionary *resizableSubviewPreferredProportion, *nonresizableSubviewPreferredSize;
@property (strong) NSArray *stateForLastPreferredCalculations;
@property (unsafe_unretained) id secondaryDelegate;
@property (nonatomic) BOOL collapsibleSubviewCollapsed;
@property int collapsiblePopupSelection;
@property BOOL dividerCanCollapse;//sets if the width of the divider collapses
// dragging the divider will always collapse the view
//@property BOOL hasAToggleCollapseButton;
// The split view divider color
@property (copy) NSColor *color;
// Flag for whether a custom divider color is enabled. If not, the standard divider color is used.
@property (nonatomic) BOOL colorIsEnabled;
@property (strong) IBOutlet NSButton *toggleCollapseButton;
//declared for debugging purposes--------
- (BOOL)collapsibleSubviewIsCollapsed;
- (NSView *)collapsibleSubview;
//---------------------------------------
- (IBAction)toggleCollapse:(id)sender;
@end