Numeric.cpp 575 B

12345678910111213141516171819202122232425262728293031
  1. #include "UnitTest.h"
  2. #include "Gwen/Controls/NumericUpDown.h"
  3. using namespace Gwen;
  4. class Numeric : public GUnit
  5. {
  6. public:
  7. GWEN_CONTROL_INLINE( Numeric, GUnit )
  8. {
  9. Controls::NumericUpDown* pCtrl = new Controls::NumericUpDown( this );
  10. pCtrl->SetBounds( 10, 10, 50, 20 );
  11. pCtrl->SetValue( 50 );
  12. pCtrl->SetMax( 1000 );
  13. pCtrl->SetMin( -1000 );
  14. // pCtrl->onPress.Add( this, &ThisClass::onButtonA );
  15. }
  16. void onButtonA( Controls::Base* pControl )
  17. {
  18. // UnitPrint( L"Button Pressed (using 'OnPress' event)" );
  19. }
  20. };
  21. DEFINE_UNIT_TEST( Numeric, L"Numeric" );