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 9class BLayoutItem; 10class BGroupView; 11class BStringView; 12 13class 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