2015-11-30 13:34:12 +00:00
|
|
|
/*
|
|
|
|
Copyright 2015 OpenMarket Ltd
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2016-01-13 18:03:27 +00:00
|
|
|
#import <MatrixKit/MatrixKit.h>
|
2015-11-30 13:34:12 +00:00
|
|
|
|
2016-06-10 15:15:42 +00:00
|
|
|
#import "RoomPreviewData.h"
|
|
|
|
|
2016-02-10 09:59:48 +00:00
|
|
|
// We add here a protocol to handle tap gesture in title view.
|
|
|
|
@class RoomTitleView;
|
|
|
|
@protocol RoomTitleViewTapGestureDelegate <NSObject>
|
|
|
|
|
|
|
|
/**
|
|
|
|
Tells the delegate that a tap gesture has been recognized.
|
|
|
|
|
|
|
|
@param titleView the room title view.
|
|
|
|
@param tapGestureRecognizer the recognized gesture.
|
|
|
|
*/
|
|
|
|
- (void)roomTitleView:(RoomTitleView*)titleView recognizeTapGesture:(UITapGestureRecognizer*)tapGestureRecognizer;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface RoomTitleView : MXKRoomTitleView <UIGestureRecognizerDelegate>
|
|
|
|
|
|
|
|
@property (weak, nonatomic) IBOutlet UIView *titleMask;
|
2020-04-08 13:06:59 +00:00
|
|
|
@property (weak, nonatomic) IBOutlet UIImageView *badgeImageView;
|
2021-03-15 13:27:59 +00:00
|
|
|
@property (weak, nonatomic) IBOutlet MXKImageView *pictureView;
|
|
|
|
@property (weak, nonatomic) IBOutlet UILabel *missedDiscussionsBadgeLabel;
|
|
|
|
@property (weak, nonatomic) IBOutlet UILabel *typingLabel;
|
|
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *displayNameCenterYConstraint;
|
2021-03-24 21:17:09 +00:00
|
|
|
@property (weak, nonatomic) IBOutlet UIView *dotView;
|
|
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *missedDiscussionsBadgeLabelLeadingConstraint;
|
|
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *pictureViewHeightConstraint;
|
|
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *pictureViewWidthConstraint;
|
2021-03-29 21:04:01 +00:00
|
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *dotViewCenterXConstraint;
|
|
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *dotViewCenterYConstraint;
|
2016-02-10 09:59:48 +00:00
|
|
|
|
2016-06-10 15:15:42 +00:00
|
|
|
/**
|
|
|
|
The room preview data may be used when mxRoom instance is not available
|
|
|
|
*/
|
|
|
|
@property (strong, nonatomic) RoomPreviewData *roomPreviewData;
|
|
|
|
|
2016-02-10 09:59:48 +00:00
|
|
|
/**
|
|
|
|
The tap gesture delegate.
|
|
|
|
*/
|
|
|
|
@property (nonatomic) id<RoomTitleViewTapGestureDelegate> tapGestureDelegate;
|
|
|
|
|
2021-03-15 13:27:59 +00:00
|
|
|
/**
|
|
|
|
the typing notification string to be displayed (default nil if notification is hidden).
|
|
|
|
*/
|
|
|
|
@property (copy, nonatomic) NSString *typingNotificationString;
|
|
|
|
|
2016-04-14 00:34:30 +00:00
|
|
|
/**
|
|
|
|
The method used to handle the gesture recognized by a receiver.
|
|
|
|
*/
|
|
|
|
- (void)reportTapGesture:(UITapGestureRecognizer*)tapGestureRecognizer;
|
|
|
|
|
2021-03-24 21:17:09 +00:00
|
|
|
/**
|
|
|
|
update the layout of the title view according to the target orientation
|
|
|
|
*/
|
|
|
|
- (void)updateLayoutForOrientation:(UIInterfaceOrientation)orientation;
|
|
|
|
|
2017-06-20 09:32:54 +00:00
|
|
|
@end
|