Chat-O-Matic/application/views/ConversationItem.h
Jaidyn Ann 6f73db12b7 Highlight room list-items, auto-scroll in chat
When a new message is posted (or the user is messaged), the room's item
in the roomlist is now highlighted, like Vision.

Chat also auto-scrolls when new messages are posted.
2021-07-17 00:23:56 -05:00

32 lines
679 B
C++

/*
* Copyright 2021, Jaidyn Levesque <jadedctrl@teknik.io>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#ifndef _CONVERSATION_ITEM_H
#define _CONVERSATION_ITEM_H
#include <StringItem.h>
#include "Observer.h"
class Conversation;
class ConversationItem : public BStringItem, public Observer {
public:
ConversationItem(const char* name, Conversation* chat);
virtual void DrawItem(BView* owner, BRect frame, bool complete=false);
Conversation* GetConversation();
void ObserveString(int32 what, BString str);
void ObserveInteger(int32 what, int32 num);
private:
Conversation* fChat;
int8 fStatus;
};
#endif // _CONVERSATION_ITEM_H