CGUIColorSelectDialog.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Copyright (C) 2002-2012 Nikolaus Gebhardt
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #ifndef __C_GUI_COLOR_SELECT_DIALOG_H_INCLUDED__
  5. #define __C_GUI_COLOR_SELECT_DIALOG_H_INCLUDED__
  6. #include "IrrCompileConfig.h"
  7. #ifdef _IRR_COMPILE_WITH_GUI_
  8. #include "IGUIColorSelectDialog.h"
  9. #include "IGUIButton.h"
  10. #include "IGUISpinBox.h"
  11. #include "IGUIImage.h"
  12. #include "irrArray.h"
  13. namespace irr
  14. {
  15. namespace gui
  16. {
  17. class CGUIColorSelectDialog : public IGUIColorSelectDialog
  18. {
  19. public:
  20. //! constructor
  21. CGUIColorSelectDialog(const wchar_t* title, IGUIEnvironment* environment, IGUIElement* parent, s32 id);
  22. //! destructor
  23. virtual ~CGUIColorSelectDialog();
  24. //! called if an event happened.
  25. virtual bool OnEvent(const SEvent& event);
  26. //! draws the element and its children
  27. virtual void draw();
  28. virtual video::SColor getColor();
  29. virtual video::SColorHSL getColorHSL();
  30. private:
  31. //! sends the event that the file has been selected.
  32. void sendSelectedEvent();
  33. //! sends the event that the file choose process has been canceld
  34. void sendCancelEvent();
  35. core::position2d<s32> DragStart;
  36. bool Dragging;
  37. IGUIButton* CloseButton;
  38. IGUIButton* OKButton;
  39. IGUIButton* CancelButton;
  40. core::array<IGUISpinBox*> Battery;
  41. struct SColorCircle
  42. {
  43. IGUIImage * Control;
  44. video::ITexture * Texture;
  45. };
  46. SColorCircle ColorRing;
  47. void buildColorRing( const core::dimension2d<u32> & dim, s32 supersample, const video::SColor& borderColor );
  48. };
  49. } // end namespace gui
  50. } // end namespace irr
  51. #endif // _IRR_COMPILE_WITH_GUI_
  52. #endif // __C_GUI_COLOR_SELECT_DIALOG_H_INCLUDED__