xref: /haiku/src/apps/resedit/PreviewColumn.cpp (revision 09a03cb8270174f8b983db85c0f7c91821239cd8)
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 
PreviewColumn(const char * title,float width,float minWidth,float maxWidth)13 PreviewColumn::PreviewColumn(const char *title, float width,
14 						 float minWidth, float maxWidth)
15   :	BTitledColumn(title, width, minWidth, maxWidth)
16 {
17 }
18 
19 void
DrawField(BField * field,BRect rect,BView * parent)20 PreviewColumn::DrawField(BField* field, BRect rect, BView* parent)
21 {
22 	PreviewField *pField = (PreviewField*)field;
23 	pField->DrawField(rect, parent);
24 }
25 
26 bool
AcceptsField(const BField * field) const27 PreviewColumn::AcceptsField(const BField* field) const
28 {
29 	return dynamic_cast<const PreviewField*>(field);
30 }
31