1159764Sobrien/* 2159764Sobrien * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3226048Sobrien * Distributed under the terms of the MIT License. 4159764Sobrien */ 5159764Sobrien#ifndef ABSTRACT_GENERAL_PAGE_H 6159764Sobrien#define ABSTRACT_GENERAL_PAGE_H 7159764Sobrien 8159764Sobrien#include <GroupView.h> 9159764Sobrien#include <StringView.h> 10159764Sobrien 11159764Sobrien 12159764Sobrienclass BGridView; 13186690Sobrien 14159764Sobrien 15class LabelView : public BStringView { 16public: 17 LabelView(const char* text) 18 : 19 BStringView(NULL, text) 20 { 21 SetExplicitAlignment(BAlignment(B_ALIGN_RIGHT, 22 B_ALIGN_VERTICAL_CENTER)); 23 } 24}; 25 26 27class TextDataView : public BStringView { 28public: 29 TextDataView() 30 : 31 BStringView(NULL, "") 32 { 33 SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET)); 34 } 35 36 TextDataView(const char* text) 37 : 38 BStringView(NULL, text) 39 { 40 SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET)); 41 } 42}; 43 44 45class AbstractGeneralPage : public BGroupView { 46public: 47 AbstractGeneralPage(); 48 virtual ~AbstractGeneralPage(); 49 50protected: 51 TextDataView* AddDataView(const char* label, 52 const char* text = NULL); 53 54protected: 55 BGridView* fDataView; 56}; 57 58 59 60#endif // ABSTRACT_GENERAL_PAGE_H 61