element-ios/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.h

98 lines
2.9 KiB
C
Raw Normal View History

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.
*/
#import <MatrixKit/MatrixKit.h>
#import "MediaPickerViewController.h"
/**
Destination of the message in the composer
*/
typedef enum : NSUInteger
{
RoomInputToolbarViewSendModeSend,
RoomInputToolbarViewSendModeReply,
RoomInputToolbarViewSendModeEdit
} RoomInputToolbarViewSendMode;
@protocol RoomInputToolbarViewDelegate <MXKRoomInputToolbarViewDelegate>
/**
Tells the delegate that the user wants to display the sticker picker.
@param toolbarView the room input toolbar view.
*/
- (void)roomInputToolbarViewPresentStickerPicker:(MXKRoomInputToolbarView*)toolbarView;
/**
Tells the delegate that the user wants to send external files.
@param toolbarView the room input toolbar view
*/
- (void)roomInputToolbarViewDidTapFileUpload:(MXKRoomInputToolbarView*)toolbarView;
/**
Tells the delegate that the user wants to take photo or video with camera.
@param toolbarView the room input toolbar view
*/
- (void)roomInputToolbarViewDidTapCamera:(MXKRoomInputToolbarView*)toolbarView;
/**
Tells the delegate that the user wants to show media library.
@param toolbarView the room input toolbar view
*/
- (void)roomInputToolbarViewDidTapMediaLibrary:(MXKRoomInputToolbarView*)toolbarView;
@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...).
*/
2019-12-26 22:24:09 +00:00
@interface RoomInputToolbarView : MXKRoomInputToolbarViewWithHPGrowingText
2015-08-18 08:04:30 +00:00
/**
The delegate notified when inputs are ready.
*/
@property (nonatomic, weak) id<RoomInputToolbarViewDelegate> delegate;
@property (weak, nonatomic) IBOutlet UIView *mainToolbarView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *mainToolbarMinHeightConstraint;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *mainToolbarHeightConstraint;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *messageComposerContainerLeadingConstraint;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *messageComposerContainerTrailingConstraint;
2015-08-18 08:51:28 +00:00
@property (weak, nonatomic) IBOutlet UIButton *attachMediaButton;
2015-08-18 08:04:30 +00:00
@property (weak, nonatomic) IBOutlet UIImageView *inputTextBackgroundView;
/**
Tell whether the filled data will be sent encrypted. NO by default.
*/
@property (nonatomic) BOOL isEncryptionEnabled;
/**
Destination of the message in the composer.
*/
@property (nonatomic) RoomInputToolbarViewSendMode sendMode;
2015-08-18 08:04:30 +00:00
@end