mouse-cursor.cpp 764 B

12345678910111213141516171819202122232425262728293031323334
  1. #if defined(Hiro_MouseCursor)
  2. const string MouseCursor::Default = "";
  3. const string MouseCursor::Hand = "{hand}";
  4. const string MouseCursor::HorizontalResize = "{horizontal-resize}";
  5. const string MouseCursor::VerticalResize = "{vertical-resize}";
  6. MouseCursor::MouseCursor(const string& name) {
  7. setName(name);
  8. }
  9. MouseCursor::operator bool() const {
  10. return state.name;
  11. }
  12. auto MouseCursor::operator==(const MouseCursor& source) const -> bool {
  13. return name() == source.name();
  14. }
  15. auto MouseCursor::operator!=(const MouseCursor& source) const -> bool {
  16. return name() != source.name();
  17. }
  18. auto MouseCursor::name() const -> string {
  19. return state.name;
  20. }
  21. auto MouseCursor::setName(const string& name) -> type& {
  22. state.name = name;
  23. return *this;
  24. }
  25. #endif