1 /* 2 * Copyright 2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef STRING_VIEW_H 6 #define STRING_VIEW_H 7 8 9 class BLayoutItem; 10 class BGroupView; 11 class BStringView; 12 13 class StringView { 14 public: 15 StringView(const char* label, 16 const char* text); 17 18 void SetEnabled(bool enabled); 19 20 void SetLabel(const char* label); 21 const char* Label() const; 22 void SetText(const char* text); 23 const char* Text() const; 24 25 BLayoutItem* GetLabelLayoutItem(); 26 BView* LabelView(); 27 BLayoutItem* GetTextLayoutItem(); 28 BView* TextView(); 29 30 operator BView*(); 31 32 private: 33 34 BGroupView* fView; 35 BStringView* fLabel; 36 BLayoutItem* fLabelItem; 37 BStringView* fText; 38 BLayoutItem* fTextItem; 39 }; 40 41 42 #endif // STRING_VIEW_H 43