PolyUICheckBox.h 773 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * PolyUICheckBox.h
  3. * Poly
  4. *
  5. * Created by Ivan Safrin on 8/8/08.
  6. * Copyright 2008 __MyCompanyName__. All rights reserved.
  7. *
  8. */
  9. // @package UI
  10. #pragma once
  11. #include "PolyGlobals.h"
  12. #include "PolyScreenImage.h"
  13. #include "PolyScreenLabel.h"
  14. #include "PolyScreenShape.h"
  15. #include "PolyScreenEntity.h"
  16. #include "PolyUIEvent.h"
  17. namespace Polycode {
  18. class _PolyExport UICheckBox : public ScreenEntity {
  19. public:
  20. UICheckBox(Font *font, String checkImage, String caption, bool checked);
  21. ~UICheckBox();
  22. void changeCheck();
  23. bool isChecked();
  24. void handleEvent(Event *event);
  25. private:
  26. bool checked;
  27. ScreenLabel *captionLabel;
  28. ScreenShape *buttonRect;
  29. ScreenShape *shadowRect;
  30. ScreenImage *buttonImage;
  31. bool pressedDown;
  32. };
  33. }