예제 #1
0
void ListWidget::DUMP(const char *szText /*= 0*/)
{
  if(szText != 0) {
    DEBUG_PRINT(szText);
  }
  DEBUG_PRINT(" ListWidget@"); DEBUG_PRINTDEC((int)this); DEBUG_PRINT(" m_selectionMode="); DEBUG_PRINTDEC((int)m_selectionMode); 
  DEBUG_PRINT(" m_iCurSel="); DEBUG_PRINTDEC((int)m_iCurSel);  DEBUG_PRINT(" m_iFirstDisplayed="); DEBUG_PRINTDEC((int)m_iFirstDisplayed); 
  
  m_position.DUMP(" m_position: ");
  m_rectClient.DUMP("m_rectClient: ");  
  
}
예제 #2
0
void printfloat( float val){
    // prints val with number of decimal places determine by precision
    // precision is a number from 0 to 6 indicating the desired decimial places
    // example: //printfloat( 3.1415, 2); // //prints 3.14 (two decimal places)

    int precision = 7;
    DEBUG_PRINT (int(val));  ////prints the int part
    if( precision > 0) {
        DEBUG_PRINT("."); // //print the decimal point
        unsigned long frac;
        unsigned long mult = 1;
        byte padding = precision -1;
        while(precision--)
            mult *=10;

        if(val >= 0)
            frac = (val - int(val)) * mult;
        else
            frac = (int(val)- val ) * mult;
        unsigned long frac1 = frac;
        while( frac1 /= 10 )
            padding--;
        while(  padding--)
            DEBUG_PRINT("0");
        DEBUG_PRINTDEC(frac) ;

    }
}
예제 #3
0
void Widget::DUMP(const char *szText /*= 0*/) const
{
  if(szText != 0) {
    DEBUG_PRINT(szText);
  }
  DEBUG_PRINT(" Widget@"); DEBUG_PRINTDEC((int)this); 
  m_position.DUMP(" m_position: ");
  m_rectClient.DUMP("m_rectClient: ");  
}