forked from michaelvillar/chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMVDiscussionView.h
61 lines (54 loc) · 2.78 KB
/
MVDiscussionView.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
#import <TwUI/TUIKit.h>
#import <QuickLook/QuickLook.h>
#import <Quartz/Quartz.h>
#define kMVDiscussionViewStyleBlueGradient 1
#define kMVDiscussionViewStyleTransparent 2
#define kMVDiscussionViewMessageDraggingType @"kMVDiscussionViewMessageDraggingType"
@class MVDiscussionView;
@class MVDiscussionMessageItem;
@class MVRoundedTextView;
@protocol MVDiscussionViewDelegate <TUIScrollViewDelegate>
@optional
- (void)discussionViewShouldBeFront:(MVDiscussionView*)discussionView;
- (void)discussionViewShouldNotBeFront:(MVDiscussionView*)discussionView;
- (void)discussionView:(MVDiscussionView*)discussionView
keyDown:(NSEvent*)event;
- (void)discussionViewShouldGiveFocusToTextField:(MVDiscussionView*)discussionView;
- (void)discussionViewShouldLoadPreviousItems:(MVDiscussionView*)discussionView;
- (void)discussionViewShouldLoadNextItems:(MVDiscussionView*)discussionView;
- (BOOL)discussionView:(MVDiscussionView *)discussionView
didDropPasteboard:(NSPasteboard*)pboard;
- (void)discussionView:(MVDiscussionView *)discussionView
didClickNotification:(MVDiscussionMessageItem*)discussionItem;
- (void)discussionView:(MVDiscussionView *)discussionView
shouldRetryFileTransfer:(MVDiscussionMessageItem*)discussionItem;
- (void)discussionView:(MVDiscussionView *)discussionView
shouldRetrySendingMessage:(MVDiscussionMessageItem*)discussionItem;
@end
@interface MVDiscussionView : TUIScrollView
@property (unsafe_unretained, readwrite, nonatomic) NSObject <MVDiscussionViewDelegate> *delegate;
@property (readwrite) int style;
@property (readwrite) BOOL hasNotLoadedPreviousItems;
@property (readwrite) BOOL hasNotLoadedNextItems;
@property (readonly, nonatomic) int countItems;
@property (readwrite) BOOL allowsBlankslate;
@property (readonly, nonatomic) MVDiscussionMessageItem *lastVisibleItemHavingMessage;
@property (nonatomic, readonly) NSString *selectedString;
- (void)removeAllDiscussionItems;
- (void)insertDiscussionItemAtTop:(MVDiscussionMessageItem*)discussionItem;
- (void)addDiscussionItem:(MVDiscussionMessageItem*)discussionItem;
- (void)addDiscussionItem:(MVDiscussionMessageItem*)discussionItem
animated:(BOOL)animated;
- (void)addDiscussionItem:(MVDiscussionMessageItem*)discussionItem
animateFromTextView:(MVRoundedTextView*)textView;
- (void)removeDiscussionItem:(MVDiscussionMessageItem*)discussionItem;
- (MVDiscussionMessageItem*)discussionItemAtIndex:(int)index;
- (MVDiscussionMessageItem*)discussionItemForRepresentedObject:(NSObject*)representedObject;
- (NSOrderedSet*)discussionItemsForRepresentedObject:(NSObject*)representedObject;
- (void)layoutSubviews:(BOOL)animated;
- (void)resetSelection;
- (void)selectUp;
- (void)selectDown;
- (void)resetSelectedItem;
- (void)scrollToCenterItem:(MVDiscussionMessageItem*)discussionItem animated:(BOOL)animated;
@end