2005-09-23 16:01:21 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2005, Jérôme DUVAL. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2009-04-24 14:08:11 +00:00
|
|
|
#ifndef PARTITION_MENU_ITEM_H
|
|
|
|
#define PARTITION_MENU_ITEM_H
|
2005-09-23 16:01:21 +00:00
|
|
|
|
|
|
|
#include <MenuItem.h>
|
2005-10-26 15:42:22 +00:00
|
|
|
#include <Partition.h>
|
2005-09-23 16:01:21 +00:00
|
|
|
|
2009-04-24 14:08:11 +00:00
|
|
|
|
2009-07-28 17:35:51 +00:00
|
|
|
const uint32 SOURCE_PARTITION = 'iSPT';
|
2005-10-26 15:42:22 +00:00
|
|
|
const uint32 TARGET_PARTITION = 'iTPT';
|
2005-09-23 16:01:21 +00:00
|
|
|
|
2009-04-24 14:08:11 +00:00
|
|
|
|
2005-09-23 16:01:21 +00:00
|
|
|
class PartitionMenuItem : public BMenuItem {
|
2009-04-24 14:08:11 +00:00
|
|
|
public:
|
|
|
|
PartitionMenuItem(const char* name,
|
|
|
|
const char* label, const char* menuLabel,
|
|
|
|
BMessage* msg, partition_id id);
|
|
|
|
virtual ~PartitionMenuItem();
|
|
|
|
|
|
|
|
partition_id ID() const;
|
|
|
|
const char* MenuLabel() const;
|
|
|
|
const char* Name() const;
|
|
|
|
|
2009-05-03 17:35:09 +00:00
|
|
|
void SetIsValidTarget(bool isValidTarget);
|
|
|
|
bool IsValidTarget() const;
|
|
|
|
|
2009-04-24 14:08:11 +00:00
|
|
|
private:
|
|
|
|
partition_id fID;
|
|
|
|
char* fMenuLabel;
|
|
|
|
char* fName;
|
2009-05-03 17:35:09 +00:00
|
|
|
bool fIsValidTarget;
|
2005-09-23 16:01:21 +00:00
|
|
|
};
|
|
|
|
|
2009-04-24 14:08:11 +00:00
|
|
|
#endif // PARTITION_MENU_ITEM_H_
|