xref: /haiku/src/apps/resedit/PreviewColumn.cpp (revision 09a03cb8270174f8b983db85c0f7c91821239cd8)
108cf72ceSDarkWyrm /*
2e234c034SDarkWyrm  * Copyright (c) 2005-2010, Haiku, Inc.
308cf72ceSDarkWyrm  * Distributed under the terms of the MIT license.
408cf72ceSDarkWyrm  *
508cf72ceSDarkWyrm  * Author:
6e234c034SDarkWyrm  *		DarkWyrm <darkwyrm@gmail.com>
708cf72ceSDarkWyrm  */
808cf72ceSDarkWyrm #include "PreviewColumn.h"
9e61a091fSDarkWyrm #include "ResFields.h"
10*09a03cb8SDarkWyrm 
1108cf72ceSDarkWyrm #include <stdio.h>
1208cf72ceSDarkWyrm 
PreviewColumn(const char * title,float width,float minWidth,float maxWidth)1308cf72ceSDarkWyrm PreviewColumn::PreviewColumn(const char *title, float width,
1408cf72ceSDarkWyrm 						 float minWidth, float maxWidth)
1508cf72ceSDarkWyrm   :	BTitledColumn(title, width, minWidth, maxWidth)
1608cf72ceSDarkWyrm {
1708cf72ceSDarkWyrm }
1808cf72ceSDarkWyrm 
1908cf72ceSDarkWyrm void
DrawField(BField * field,BRect rect,BView * parent)2008cf72ceSDarkWyrm PreviewColumn::DrawField(BField* field, BRect rect, BView* parent)
2108cf72ceSDarkWyrm {
22e61a091fSDarkWyrm 	PreviewField *pField = (PreviewField*)field;
23e61a091fSDarkWyrm 	pField->DrawField(rect, parent);
2408cf72ceSDarkWyrm }
2508cf72ceSDarkWyrm 
26e61a091fSDarkWyrm bool
AcceptsField(const BField * field) const27e61a091fSDarkWyrm PreviewColumn::AcceptsField(const BField* field) const
28e61a091fSDarkWyrm {
29e61a091fSDarkWyrm 	return dynamic_cast<const PreviewField*>(field);
3008cf72ceSDarkWyrm }
31