BTRFS: Implement BTree::Path and change _Find.
[haiku.git] / src / apps / devices / PropertyList.h
blob7ba5b0b931af9158fd9717e4b7c05ac723d79814
1 /*
2 * Copyright 2009 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT license.
5 * Authors:
6 * Pieter Panman
7 */
8 #ifndef PROPERTYLIST_H
9 #define PROPERTYLIST_H
12 #include <ColumnListView.h>
13 #include <String.h>
15 #include "Device.h"
17 struct Attribute;
19 enum {
20 kNameColumn,
21 kValueColumn
25 class PropertyRow : public BRow {
26 public:
27 PropertyRow(const char* name, const char* value);
28 virtual ~PropertyRow();
30 const char* Name() const { return fName.String(); }
31 const char* Value() const { return fValue.String(); }
32 void SetName(const char* name);
33 void SetValue(const char* value);
34 private:
35 BString fName;
36 BString fValue;
40 class PropertyList : public BColumnListView {
41 public:
42 PropertyList(const char* name);
43 virtual ~PropertyList();
44 void RemoveAll();
45 void AddAttributes(const Attributes& attributes);
47 void MessageReceived(BMessage* msg);
48 protected:
49 virtual void SelectionChanged();
52 #endif /* PROPERTYLIST_H*/