1 /* 2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #include "table/TableColumn.h" 7 8 #include <String.h> 9 10 11 TableColumn::TableColumn(int32 modelIndex, float width, float minWidth, 12 float maxWidth, alignment align) 13 : 14 fModelIndex(modelIndex), 15 fWidth(width), 16 fMinWidth(minWidth), 17 fMaxWidth(maxWidth), 18 fAlignment(align) 19 { 20 } 21 22 23 TableColumn::~TableColumn() 24 { 25 } 26 27 28 void 29 TableColumn::GetColumnName(BString* into) const 30 { 31 *into = ""; 32 } 33 34 35 void 36 TableColumn::DrawTitle(BRect rect, BView* targetView) 37 { 38 } 39 40 41 void 42 TableColumn::DrawValue(const BVariant& value, BRect rect, BView* targetView) 43 { 44 } 45 46 47 int 48 TableColumn::CompareValues(const BVariant& a, const BVariant& b) 49 { 50 return 0; 51 } 52 53 54 float 55 TableColumn::GetPreferredWidth(const BVariant& value, BView* parent) const 56 { 57 return Width(); 58 } 59