/* ParaGUI - crossplatform widgetset Copyright (C) 2000,2001,2002 Alexander Pipelka This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Alexander Pipelka pipelka@teleweb.at Last Update: $Author: braindead $ Update Date: $Date: 2003/02/11 14:14:10 $ Source File: $Source: /cvsroot/paragui/paragui/src/widgets/pgcolumnitem.cpp,v $ CVS/RCS Revision: $Revision: 1.3.6.1 $ Status: $State: Exp $ */ #include "pgcolumnitem.h" PG_ColumnItem::PG_ColumnItem(Uint32 columns, Uint32 height, void* userdata) : PG_ListBoxItem(height) { SetUserData(userdata); my_columncount = columns; // fill our vectors with the default values for(Uint32 i=0; iw; } for(Uint32 i=0; i my_width) { cw -= ((xshift + cw) - my_width); } DrawText(xshift, (my_itemheight - h)/2, my_columntext[i].c_str(), PG_Rect(xshift, 0, cw-5, my_itemheight)); //DrawText(xshift, (my_itemheight - h) >> 1, my_columntext[i].c_str()); xshift += my_columnwidth[i]; } } int PG_ColumnItem::GetColumnWidth(Uint32 column) { return my_columnwidth[column]; } const char* PG_ColumnItem::GetColumnText(Uint32 column) { return my_columntext[column].c_str(); } int PG_ColumnItem::GetColumnCount() { return my_columncount; }