1 /* 2 * Copyright 2005-2011, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT license. 4 * 5 * Authors: 6 * Robert Polic 7 * 8 * Copyright 1999, Be Incorporated. All Rights Reserved. 9 * This file may be used under the terms of the Be Sample Code License. 10 */ 11 #ifndef ATTRIBUTE_TEXT_CONTROL_H 12 #define ATTRIBUTE_TEXT_CONTROL_H 13 14 #include <String.h> 15 #include <TextControl.h> 16 17 18 class AttributeTextControl : public BTextControl { 19 public: 20 AttributeTextControl(const char* label, 21 const char* attribute); 22 virtual ~AttributeTextControl(); 23 24 bool HasChanged(); 25 void Revert(); 26 void Update(); 27 28 const BString& Attribute() const 29 { return fAttribute; } 30 31 private: 32 BString fAttribute; 33 BString fOriginalValue; 34 }; 35 36 #endif // ATTRIBUTE_TEXT_CONTROL_H 37