Chat-O-Matic/application/views/ConversationListView.h
Jaidyn Ann 057e7fba9b Add "system buffer" per protocol
Now, per each account, there is a read-only chat view associated with
it, accessible through its item in the conversations list. This can be
used to place system messages, MOTDs, insignificant errors, etc.

Protocols can send text to this buffer by specifying no "chat_id" in
an IM_MESSAGE_RECEIVED message.
2021-08-12 15:43:52 -05:00

36 lines
844 B
C++

/*
* Copyright 2021, Jaidyn Levesque <jadedctrl@teknik.io>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#ifndef _CONVERSATION_LIST_H
#define _CONVERSATION_LIST_H
#include <OutlineListView.h>
class BPopUpMenu;
class Conversation;
class ConversationAccountItem;
class ConversationListView : public BOutlineListView {
public:
ConversationListView(const char* name);
virtual void MessageReceived(BMessage* msg);
virtual void SelectionChanged();
virtual void MouseDown(BPoint where);
void AddConversation(Conversation* chat);
void RemoveConversation(Conversation* chat);
void SortConversation(Conversation* chat);
private:
BPopUpMenu* _ConversationPopUp();
BPopUpMenu* _BlankPopUp();
ConversationAccountItem*
_EnsureAccountItem(Conversation* chat);
};
#endif // _CONVERSATION_LIST_H