haiku/src/servers/input/MethodReplicant.h
Jérôme Duval 1cafa90eda code style
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20704 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-15 14:17:02 +00:00

64 lines
1.5 KiB
C++

// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
//
// Copyright (c) 2004, Haiku
//
// This software is part of the Haiku distribution and is covered
// by the Haiku license.
//
//
// File: MethodReplicant.h
// Authors: Jérôme Duval,
//
// Description: Input Server
// Created: October 13, 2004
//
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
#ifndef METHOD_REPLICANT_H_
#define METHOD_REPLICANT_H_
#include <PopUpMenu.h>
#include <View.h>
#include "MethodMenuItem.h"
#define REPLICANT_CTL_NAME "MethodReplicant"
class _EXPORT MethodReplicant;
class MethodReplicant : public BView {
public:
MethodReplicant(const char* signature);
MethodReplicant(BMessage *);
// BMessage * based constructor needed to support archiving
virtual ~MethodReplicant();
// archiving overrides
static MethodReplicant *Instantiate(BMessage *data);
virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual void AttachedToWindow();
// misc BView overrides
virtual void MouseDown(BPoint);
virtual void MouseUp(BPoint);
virtual void Draw(BRect);
virtual void MessageReceived(BMessage *);
private:
BBitmap *fSegments;
char *fSignature;
BPopUpMenu fMenu;
void UpdateMethod(BMessage *);
void UpdateMethodIcon(BMessage *);
void UpdateMethodMenu(BMessage *);
void UpdateMethodName(BMessage *);
void AddMethod(BMessage *message);
void RemoveMethod(BMessage *message);
MethodMenuItem *FindItemByCookie(int32 cookie);
};
#endif