2010-05-07 04:47:10 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2009, 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
|
2010-05-28 17:38:16 -05:00
|
|
|
|
2010-05-07 04:47:10 -05:00
|
|
|
#include <Window.h>
|
|
|
|
#include <TextView.h>
|
2010-05-28 17:38:16 -05:00
|
|
|
#include <StringView.h>
|
2010-05-07 04:47:10 -05:00
|
|
|
#include "Observer.h"
|
2010-05-20 16:31:55 -05:00
|
|
|
|
2010-05-07 04:47:10 -05:00
|
|
|
#include "CayaConstants.h"
|
|
|
|
|
|
|
|
class ContactLinker;
|
|
|
|
class CayaRenderView;
|
|
|
|
|
2010-05-20 16:31:55 -05:00
|
|
|
class ChatWindow: public BWindow, public Observer {
|
|
|
|
public:
|
|
|
|
ChatWindow(ContactLinker* cl);
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2010-05-20 16:31:55 -05:00
|
|
|
virtual void MessageReceived(BMessage* message);
|
|
|
|
virtual bool QuitRequested();
|
|
|
|
|
|
|
|
void ImMessage(BMessage* msg);
|
2010-05-07 04:47:10 -05:00
|
|
|
|
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);
|
|
|
|
|
|
|
|
private:
|
|
|
|
BTextView* fSendView;
|
2010-05-28 17:38:16 -05:00
|
|
|
ContactLinker* fContactLinker;
|
2010-05-20 16:31:55 -05:00
|
|
|
CayaRenderView* fReceiveView;
|
2010-05-28 17:38:16 -05:00
|
|
|
BStringView* fStatus;
|
|
|
|
|
2010-05-20 16:31:55 -05:00
|
|
|
};
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2010-05-20 16:31:55 -05:00
|
|
|
#endif // _CHAT_WINDOW_H
|