ConversationItem.h 679 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright 2021, Jaidyn Levesque <jadedctrl@teknik.io>
  3. * All rights reserved. Distributed under the terms of the MIT license.
  4. */
  5. #ifndef _CONVERSATION_ITEM_H
  6. #define _CONVERSATION_ITEM_H
  7. #include <StringItem.h>
  8. #include "Observer.h"
  9. class Conversation;
  10. class ConversationItem : public BStringItem, public Observer {
  11. public:
  12. ConversationItem(const char* name, Conversation* chat);
  13. virtual void DrawItem(BView* owner, BRect frame, bool complete=false);
  14. Conversation* GetConversation();
  15. void ObserveString(int32 what, BString str);
  16. void ObserveInteger(int32 what, int32 num);
  17. private:
  18. Conversation* fChat;
  19. int8 fStatus;
  20. };
  21. #endif // _CONVERSATION_ITEM_H