1 /* 2 * Copyright (c) 2005-2010, Haiku, Inc. 3 * Distributed under the terms of the MIT license. 4 * 5 * Author: 6 * DarkWyrm <darkwyrm@gmail.com> 7 */ 8 #include "PreviewColumn.h" 9 #include "ResFields.h" 10 11 #include <stdio.h> 12 13 PreviewColumn::PreviewColumn(const char *title, float width, 14 float minWidth, float maxWidth) 15 : BTitledColumn(title, width, minWidth, maxWidth) 16 { 17 } 18 19 void 20 PreviewColumn::DrawField(BField* field, BRect rect, BView* parent) 21 { 22 PreviewField *pField = (PreviewField*)field; 23 pField->DrawField(rect, parent); 24 } 25 26 bool 27 PreviewColumn::AcceptsField(const BField* field) const 28 { 29 return dynamic_cast<const PreviewField*>(field); 30 } 31