[Igarden-commit] CommonSource/YAAFExtensions RGTableCell.cpp, 1.46.2.22, 1.46.2.23 RGTableCell.h, 1
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2008-04-12 22:42:09
|
Update of /cvsroot/igarden/CommonSource/YAAFExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv25195/YAAFExtensions Modified Files: Tag: Release_branch_v1 RGTableCell.cpp RGTableCell.h Log Message: Make sure that the elipses for over-long cell text get written Index: RGTableCell.h =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGTableCell.h,v retrieving revision 1.23.2.11 retrieving revision 1.23.2.12 diff -C2 -d -r1.23.2.11 -r1.23.2.12 *** RGTableCell.h 8 Apr 2008 22:22:36 -0000 1.23.2.11 --- RGTableCell.h 12 Apr 2008 22:42:08 -0000 1.23.2.12 *************** *** 176,181 **** void InputError(const char *msg); ! static void DrawWrappedText(XGDraw &, titleJust_t, Rect &, char *text); ! static short SizeWrappedText(XGDraw &, Rect &, char *text); int GetRow(); --- 176,181 ---- void InputError(const char *msg); ! static void DrawWrappedText(XGDraw &, titleJust_t, Rect &, char *); ! static short SizeWrappedText(XGDraw &, Rect &, char *); int GetRow(); Index: RGTableCell.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGTableCell.cpp,v retrieving revision 1.46.2.22 retrieving revision 1.46.2.23 diff -C2 -d -r1.46.2.22 -r1.46.2.23 *** RGTableCell.cpp 8 Apr 2008 22:22:36 -0000 1.46.2.22 --- RGTableCell.cpp 12 Apr 2008 22:42:07 -0000 1.46.2.23 *************** *** 56,59 **** --- 56,61 ---- const long kTableReadOnlyColor = RGB(0xFF,0xE0,0xE0); const long kTableGreyColor = RGB(0xF0,0xF0,0xF0); + const long kMaxTextLines = 3; + uint32 sFlexMenu = 0; *************** *** 1184,1188 **** } ! if(lineCount >= 3) break; } --- 1186,1190 ---- } ! if(lineCount >= kMaxTextLines) break; } *************** *** 1209,1212 **** --- 1211,1219 ---- while(*lineStart != 0) { + if((lineCount == (kMaxTextLines-1))) + { + w -= draw.StringWidth("..."); + } + for(next = lineStart; ; next++) { *************** *** 1216,1220 **** if(draw.StringWidth(lineStart, (next-lineStart)) + 4 > w) // If need to split a word { ! while(draw.StringWidth(lineStart, (next-lineStart)) + 4 > w) { wordSplit = true; --- 1223,1227 ---- if(draw.StringWidth(lineStart, (next-lineStart)) + 4 > w) // If need to split a word { ! while((next >= lineStart) && draw.StringWidth(lineStart, (next-lineStart)) + 4 > w) { wordSplit = true; *************** *** 1288,1295 **** break; } - - } ! if(lineCount >= 3) { draw.DrawString("...",3); --- 1295,1301 ---- break; } } ! ! if((strlen(lineStart) > 0) && (lineCount >= kMaxTextLines)) { draw.DrawString("...",3); |