Chat-O-Matic/application/views/ConversationListView.h

42 lines
1.0 KiB
C
Raw Permalink Normal View History

/*
* Copyright 2021, Jaidyn Levesque <jadedctrl@teknik.io>
* All rights reserved. Distributed under the terms of the MIT license.
*/
2021-07-25 14:42:38 -05:00
#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);
2021-07-25 14:42:38 -05:00
virtual void MessageReceived(BMessage* msg);
virtual void SelectionChanged();
virtual void MouseDown(BPoint where);
// After removing item, select another
void RemoveItemSelecting(BListItem* item);
2021-07-25 14:42:38 -05:00
void AddConversation(Conversation* chat);
void RemoveConversation(Conversation* chat);
void AddAccount(int64 instance);
void RemoveAccount(int64 instance);
2021-07-25 14:42:38 -05:00
void SortConversation(Conversation* chat);
private:
2021-07-25 14:42:38 -05:00
BPopUpMenu* _ConversationPopUp();
void _AddDefaultItems(BPopUpMenu* menu, Conversation* chat);
2021-07-25 14:42:38 -05:00
BPopUpMenu* _BlankPopUp();
2021-07-25 14:42:38 -05:00
ConversationAccountItem*
_EnsureAccountItem(Conversation* chat);
};
2021-07-25 14:42:38 -05:00
#endif // _CONVERSATION_LIST_H