Update of /cvsroot/gcblue/gcb_wx/src/graphics
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv21251/src/graphics
Modified Files:
tc3DWindow.cpp tcDatabaseInfoPanel.cpp
tcDatabaseInfoWindow.cpp tcScrollBar.cpp
Log Message:
Index: tcDatabaseInfoPanel.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcDatabaseInfoPanel.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** tcDatabaseInfoPanel.cpp 17 Aug 2006 01:28:04 -0000 1.1
--- tcDatabaseInfoPanel.cpp 20 Aug 2006 22:24:02 -0000 1.2
***************
*** 285,289 ****
void tcDatabaseInfoPanel::PrintText(float x, float& y, const char* formatString, ...)
{
! enum {STR_LENGTH = 256};
static char textBuffer[STR_LENGTH];
static osg::Vec4 color(0.4f, 1.0f, 0.4f, 1.0f);
--- 285,289 ----
void tcDatabaseInfoPanel::PrintText(float x, float& y, const char* formatString, ...)
{
! enum {STR_LENGTH = 512};
static char textBuffer[STR_LENGTH];
static osg::Vec4 color(0.4f, 1.0f, 0.4f, 1.0f);
***************
*** 297,303 ****
va_start(arguments, formatString);
! _vsnprintf(textBuffer, STR_LENGTH, formatString, arguments);
va_end(arguments);
float maxWidth = float(mnWidth - 20) - x;
--- 297,308 ----
va_start(arguments, formatString);
! _vsnprintf(textBuffer, STR_LENGTH-8 , formatString, arguments); //STR_LENGTH-1
va_end(arguments);
+ if (strlen(textBuffer) >= STR_LENGTH-8)
+ {
+ strncat(textBuffer, "...", 4);
+ }
+
float maxWidth = float(mnWidth - 20) - x;
Index: tcScrollBar.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcScrollBar.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** tcScrollBar.cpp 17 Aug 2006 01:28:04 -0000 1.1
--- tcScrollBar.cpp 20 Aug 2006 22:24:02 -0000 1.2
***************
*** 162,166 ****
CaptureMouse();
}
! else if (buttonUpRect.ContainsPoint(pos.x, pos.y))
{
UpdateYbar(ybar - clickScrollAmount);
--- 162,166 ----
CaptureMouse();
}
! else if ((buttonUpRect.ContainsPoint(pos.x, pos.y)) || (pos.y < (int)barRect.GetTop()))
{
UpdateYbar(ybar - clickScrollAmount);
***************
*** 168,172 ****
autoScrollIncrement = -clickScrollAmount;
}
! else if (buttonDownRect.ContainsPoint(pos.x, pos.y))
{
UpdateYbar(ybar + clickScrollAmount);
--- 168,172 ----
autoScrollIncrement = -clickScrollAmount;
}
! else if ((buttonDownRect.ContainsPoint(pos.x, pos.y)) || (pos.y > (int)barRect.GetBottom()))
{
UpdateYbar(ybar + clickScrollAmount);
Index: tc3DWindow.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tc3DWindow.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** tc3DWindow.cpp 17 Aug 2006 01:28:04 -0000 1.37
--- tc3DWindow.cpp 20 Aug 2006 22:24:02 -0000 1.38
***************
*** 1928,1932 ****
text->setText("UNINTIALIZED");
! text->setUseDisplayList(false);
--- 1928,1932 ----
text->setText("UNINTIALIZED");
! text->setUseDisplayList(true);
Index: tcDatabaseInfoWindow.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcDatabaseInfoWindow.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** tcDatabaseInfoWindow.cpp 17 Aug 2006 01:28:04 -0000 1.7
--- tcDatabaseInfoWindow.cpp 20 Aug 2006 22:24:02 -0000 1.8
***************
*** 146,150 ****
void tcDatabaseInfoWindow::PrintText(float x, float& y, const char* formatString, ...)
{
! enum {STR_LENGTH = 256};
static char textBuffer[STR_LENGTH];
static osg::Vec4 color(0.4f, 1.0f, 0.4f, 1.0f);
--- 146,150 ----
void tcDatabaseInfoWindow::PrintText(float x, float& y, const char* formatString, ...)
{
! enum {STR_LENGTH = 512};
static char textBuffer[STR_LENGTH];
static osg::Vec4 color(0.4f, 1.0f, 0.4f, 1.0f);
***************
*** 158,164 ****
va_start(arguments, formatString);
! _vsnprintf(textBuffer, STR_LENGTH, formatString, arguments);
va_end(arguments);
float maxWidth = (y < yImage) ? xImage - x : float(mnWidth) - x;
--- 158,169 ----
va_start(arguments, formatString);
! _vsnprintf(textBuffer, STR_LENGTH-8, formatString, arguments);
va_end(arguments);
+ if (strlen(textBuffer) >= STR_LENGTH-8)
+ {
+ strncat(textBuffer, "...", 4);
+ }
+
float maxWidth = (y < yImage) ? xImage - x : float(mnWidth) - x;
|