37453ba2af
Windows using RosterView (like for the invitiation/new chat dialogues) have a search-box for filtering between contacts. This allows the user to type a user ID into this search-box that isn't a contact's ID, which can then be selected as the user. This makes common operations (inviting a user/adding a new contact) a little easier.
41 lines
855 B
C++
41 lines
855 B
C++
/*
|
|
* Copyright 2009, Pier Luigi Fiorini. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _ROSTER_LIST_VIEW_H
|
|
#define _ROSTER_LIST_VIEW_H
|
|
|
|
#include <OutlineListView.h>
|
|
|
|
class BPopUpMenu;
|
|
|
|
class Contact;
|
|
class RosterItem;
|
|
|
|
class RosterListView : public BOutlineListView
|
|
{
|
|
public:
|
|
RosterListView(const char* name);
|
|
|
|
virtual void MessageReceived(BMessage* msg);
|
|
virtual void MouseMoved(BPoint where, uint32 code, const BMessage*);
|
|
virtual void MouseDown(BPoint where);
|
|
virtual void Draw(BRect updateRect);
|
|
virtual void AttachedToWindow();
|
|
|
|
virtual bool AddItem(BListItem* item);
|
|
virtual bool RemoveItem(BListItem* item);
|
|
RosterItem* RosterItemAt(int32 index);
|
|
|
|
void Sort();
|
|
|
|
private:
|
|
|
|
void _InfoWindow(Contact* linker);
|
|
|
|
BPopUpMenu* fPopUp;
|
|
RosterItem* fPrevItem;
|
|
};
|
|
|
|
#endif // _ROSTER_LIST_VIEW_H
|