Chat-O-Matic/application/ChatWindow.h

52 lines
1.1 KiB
C
Raw Normal View History

/*
2011-12-03 16:38:03 -06:00
* Copyright 2009-2011, Andrea Anzani. All rights reserved.
* Distributed under the terms of the MIT License.
*/
2010-05-20 16:31:55 -05:00
#ifndef _CHAT_WINDOW_H
#define _CHAT_WINDOW_H
#include <Window.h>
#include <TextView.h>
#include <StringView.h>
#include <Notification.h>
#include "Observer.h"
2010-05-20 16:31:55 -05:00
#include "CayaConstants.h"
class BitmapView;
2021-05-23 14:39:07 -05:00
class Contact;
class CayaRenderView;
class ChatWindow : public BWindow, public Observer {
2010-05-20 16:31:55 -05:00
public:
2021-05-23 14:39:07 -05:00
ChatWindow(Contact* cl);
virtual void ShowWindow();
2010-05-20 16:31:55 -05:00
virtual void MessageReceived(BMessage* message);
void WindowActivated(bool active);
2010-05-20 16:31:55 -05:00
virtual bool QuitRequested();
void UpdateAvatar();
void UpdatePersonalMessage();
2010-05-20 16:31:55 -05:00
void ImMessage(BMessage* msg);
2010-05-20 16:31:55 -05:00
void ObserveString(int32 what, BString str);
void ObservePointer(int32 what, void* ptr);
void ObserveInteger(int32 what, int32 val);
void AppendStatus(CayaStatus status);
void AvoidFocus(bool avoid);
2010-05-20 16:31:55 -05:00
private:
BTextView* fSendView;
2021-05-23 14:39:07 -05:00
Contact* fContact;
2010-05-20 16:31:55 -05:00
CayaRenderView* fReceiveView;
BStringView* fStatus;
BTextView* fPersonalMessage;
BitmapView* fAvatar;
int32 fMessageCount;
2010-05-20 16:31:55 -05:00
};
2010-05-20 16:31:55 -05:00
#endif // _CHAT_WINDOW_H