89ff195c8d
If the user has permission to change a room's subject or name, they can now edit the text views displaying them (toward the top of the window). When enter is pressed, the changes will be sent to the protocol. To do this, a BTextView subclass was added to libinterface (splitting somewhat from SendTextView)― EnterTextView sends a message containing the text to the given target when the user hits enter sans modifiers.
29 lines
576 B
C++
29 lines
576 B
C++
/*
|
|
* Copyright 2021, Jaidyn Levesque <jadedctrl@teknik.io>
|
|
* All rights reserved. Distributed under the terms of the MIT license.
|
|
*/
|
|
#ifndef _SEND_TEXT_VIEW_H
|
|
#define _SEND_TEXT_VIEW_H
|
|
|
|
#include <libinterface/EnterTextView.h>
|
|
|
|
#include "ConversationView.h"
|
|
|
|
|
|
class SendTextView : public EnterTextView {
|
|
public:
|
|
SendTextView(const char* name, ConversationView* convView);
|
|
|
|
void KeyDown(const char* bytes, int32 numBytes);
|
|
|
|
private:
|
|
void _AutoComplete();
|
|
|
|
ConversationView* fConversationView;
|
|
|
|
int32 fCurrentIndex;
|
|
BString fCurrentWord;
|
|
};
|
|
|
|
#endif // _SEND_TEXT_VIEW_H
|