Opera 12.15 Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

OpDocumentEditLayoutModifier.h 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
  2. *
  3. * Copyright (C) 1995-2005 Opera Software AS. All rights reserved.
  4. *
  5. * This file is part of the Opera web browser. It may not be distributed
  6. * under any circumstances.
  7. */
  8. #ifndef OPDOCUMENTEDIT_LAYOUT_MODIFIER_H
  9. #define OPDOCUMENTEDIT_LAYOUT_MODIFIER_H
  10. #ifdef DOCUMENT_EDIT_SUPPORT
  11. #include "modules/documentedit/OpDocumentEdit.h"
  12. /**
  13. OpDocumentEditLayoutModifier handles interaction with misc stuff by mouse.
  14. F.ex. resizing/moving of replaced elements (images/forms/iframes..), tables and positioned boxes.
  15. It paints necessary handles and overrides mouseinput.
  16. */
  17. class OpDocumentEditLayoutModifier
  18. #ifdef _DOCEDIT_DEBUG
  19. : public OpDocumentEditDebugCheckerObject
  20. #endif
  21. {
  22. public:
  23. OpDocumentEditLayoutModifier(OpDocumentEdit* edit);
  24. virtual ~OpDocumentEditLayoutModifier();
  25. void Paint(VisualDevice* vis_dev);
  26. void UpdateRect();
  27. BOOL IsLayoutModifiable(HTML_Element* helm);
  28. CursorType GetCursorType(HTML_Element* helm, int x, int y);
  29. BOOL HandleMouseEvent(HTML_Element* helm, DOM_EventType event, int x, long y, MouseButton button);
  30. void Delete();
  31. void Unactivate();
  32. BOOL IsActive() { return m_helm ? TRUE : FALSE; }
  33. public:
  34. OpDocumentEdit* m_edit;
  35. HTML_Element* m_helm;
  36. OpRect m_rect;
  37. };
  38. #endif // DOCUMENT_EDIT_SUPPORT
  39. #endif // OPDOCUMENTEDIT_LAYOUT_MODIFIER_H