2015-08-18 08:04:30 +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.
|
|
|
|
*/
|
|
|
|
|
2021-11-30 15:09:53 +00:00
|
|
|
#import "MatrixKit.h"
|
2015-08-18 08:04:30 +00:00
|
|
|
|
|
|
|
#import "MediaPickerViewController.h"
|
|
|
|
|
2021-03-25 21:15:18 +00:00
|
|
|
@class RoomActionsBar;
|
|
|
|
|
2019-04-30 15:07:43 +00:00
|
|
|
/**
|
|
|
|
Destination of the message in the composer
|
|
|
|
*/
|
|
|
|
typedef enum : NSUInteger
|
|
|
|
{
|
|
|
|
RoomInputToolbarViewSendModeSend,
|
|
|
|
RoomInputToolbarViewSendModeReply,
|
2019-06-13 14:37:28 +00:00
|
|
|
RoomInputToolbarViewSendModeEdit
|
2019-04-30 15:07:43 +00:00
|
|
|
} RoomInputToolbarViewSendMode;
|
|
|
|
|
|
|
|
|
2018-05-24 09:56:33 +00:00
|
|
|
@protocol RoomInputToolbarViewDelegate <MXKRoomInputToolbarViewDelegate>
|
|
|
|
|
2021-03-24 21:17:09 +00:00
|
|
|
/**
|
|
|
|
Tells the delegate that the user wants to cancel the current edition / reply.
|
|
|
|
|
|
|
|
@param toolbarView the room input toolbar view
|
|
|
|
*/
|
|
|
|
- (void)roomInputToolbarViewDidTapCancel:(MXKRoomInputToolbarView*)toolbarView;
|
|
|
|
|
2021-10-06 12:51:41 +00:00
|
|
|
/**
|
2021-10-07 09:21:40 +00:00
|
|
|
Inform the delegate that the text message has changed.
|
2021-10-06 12:51:41 +00:00
|
|
|
|
|
|
|
@param toolbarView the room input toolbar view
|
|
|
|
*/
|
|
|
|
- (void)roomInputToolbarViewDidChangeTextMessage:(MXKRoomInputToolbarView*)toolbarView;
|
|
|
|
|
2018-05-24 09:56:33 +00:00
|
|
|
@end
|
|
|
|
|
2015-08-18 08:04:30 +00:00
|
|
|
/**
|
|
|
|
`RoomInputToolbarView` instance is a view used to handle all kinds of available inputs
|
|
|
|
for a room (message composer, attachments selection...).
|
|
|
|
*/
|
2021-10-11 07:33:17 +00:00
|
|
|
@interface RoomInputToolbarView : MXKRoomInputToolbarView
|
2015-08-18 08:04:30 +00:00
|
|
|
|
2018-05-24 09:56:33 +00:00
|
|
|
/**
|
|
|
|
The delegate notified when inputs are ready.
|
|
|
|
*/
|
2019-06-13 14:37:28 +00:00
|
|
|
@property (nonatomic, weak) id<RoomInputToolbarViewDelegate> delegate;
|
2018-05-24 09:56:33 +00:00
|
|
|
|
2016-11-07 10:36:32 +00:00
|
|
|
/**
|
2016-11-09 09:58:11 +00:00
|
|
|
Tell whether the filled data will be sent encrypted. NO by default.
|
2016-11-07 10:36:32 +00:00
|
|
|
*/
|
2021-10-26 13:27:51 +00:00
|
|
|
@property (nonatomic, assign) BOOL isEncryptionEnabled;
|
2016-11-07 10:36:32 +00:00
|
|
|
|
2021-03-24 21:17:09 +00:00
|
|
|
/**
|
|
|
|
Sender of the event being edited / replied.
|
|
|
|
*/
|
|
|
|
@property (nonatomic, strong) NSString *eventSenderDisplayName;
|
|
|
|
|
2018-07-23 14:54:23 +00:00
|
|
|
/**
|
2019-04-30 15:07:43 +00:00
|
|
|
Destination of the message in the composer.
|
2018-07-23 14:54:23 +00:00
|
|
|
*/
|
2021-10-26 13:27:51 +00:00
|
|
|
@property (nonatomic, assign) RoomInputToolbarViewSendMode sendMode;
|
2018-07-23 14:54:23 +00:00
|
|
|
|
2021-03-25 21:15:18 +00:00
|
|
|
/**
|
|
|
|
YES if action menu is opened. NO otherwise
|
|
|
|
*/
|
2021-10-26 13:27:51 +00:00
|
|
|
@property (nonatomic, assign) BOOL actionMenuOpened;
|
|
|
|
|
|
|
|
/**
|
|
|
|
The input toolbar's main height constraint
|
|
|
|
*/
|
|
|
|
@property (nonatomic, weak, readonly) NSLayoutConstraint *mainToolbarHeightConstraint;
|
|
|
|
|
|
|
|
/**
|
|
|
|
The input toolbar's action bar
|
|
|
|
*/
|
|
|
|
@property (nonatomic, weak, readonly) RoomActionsBar *actionsBar;
|
|
|
|
|
|
|
|
/**
|
|
|
|
The attach media button
|
|
|
|
*/
|
|
|
|
@property (nonatomic, weak, readonly) UIButton *attachMediaButton;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Adds a voice message toolbar view to be displayed inside this input toolbar
|
|
|
|
*/
|
|
|
|
- (void)setVoiceMessageToolbarView:(UIView *)toolbarView;
|
2021-03-25 21:15:18 +00:00
|
|
|
|
2015-08-18 08:04:30 +00:00
|
|
|
@end
|