Clone of Akilla's ac2d @ https://github.com/deregtd/AC2D

IWindow.h 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #ifndef IWINDOW_H
  2. #define IWINDOW_H
  3. class IWindow;
  4. #include "IMoveEvent.h"
  5. #include "IResizeEvent.h"
  6. #include "IMouseEvents.h"
  7. #include "IKeyboardEvents.h"
  8. #include "IRenderEvent.h"
  9. #include "IFocusEvents.h"
  10. #include "IClipboardEvents.h"
  11. #include <list>
  12. class IWindowManager;
  13. class IWindowEvents
  14. {
  15. };
  16. class IWindow /* : public IMoveEvent, public IResizeEvent, public IMouseEvents, public IKeyboardEvents, public IRenderEvent, public IFocusEvents, public IClipboardEvents */
  17. {
  18. public:
  19. virtual bool AddMoveEventHandler( IMoveEvent &MoveEvents ) = 0;
  20. virtual bool AddResizeEventHandler( IResizeEvent &ResizeEvent ) = 0;
  21. virtual bool AddMouseEventHandler( IMouseEvents &MouseEvents ) = 0;
  22. virtual bool AddKeyboardEventHandler( IKeyboardEvents &KeyboardEvents ) = 0;
  23. virtual bool AddRenderEventHandler( IRenderEvent &RenderEvent ) = 0;
  24. virtual bool AddFocusEventHandler( IFocusEvents &FocusEvents ) = 0;
  25. virtual bool AddClipboardEventHandler( IClipboardEvents &ClipboardEvents ) = 0;
  26. virtual bool AddWindowEventHandler( IWindowEvents &WindowEvents ) = 0;
  27. virtual bool SetWidth( float NewWidth ) = 0;
  28. virtual bool SetHeight( float NewHeight ) = 0;
  29. virtual bool SetSize( float NewWidth, float NewHeight ) = 0;
  30. virtual bool SetTop( float NewTop ) = 0;
  31. virtual bool SetLeft( float NewLeft ) = 0;
  32. virtual bool SetPosition( float NewLeft, float NewTop ) = 0;
  33. virtual float GetLeft() const = 0;
  34. virtual float GetTop() const = 0;
  35. virtual float GetWidth() const = 0;
  36. virtual float GetHeight() const = 0;
  37. virtual float GetAbsoluteLeft() const = 0;
  38. virtual float GetAbsoluteTop() const = 0;
  39. virtual bool SetAnchorTop( bool NewAnchorTop ) = 0;
  40. virtual bool SetAnchorLeft( bool NewAnchorLeft ) = 0;
  41. virtual bool SetAnchorBottom( bool NewAnchorBottom ) = 0;
  42. virtual bool SetAnchorRight( bool NewAnchorRight ) = 0;
  43. virtual bool GetAnchorTop() const = 0;
  44. virtual bool GetAnchorLeft() const = 0;
  45. virtual bool GetAnchorBottom() const = 0;
  46. virtual bool GetAnchorRight() const = 0;
  47. virtual bool SetVisible( bool NewVisible ) = 0;
  48. virtual bool GetVisible() const = 0;
  49. virtual bool JumpToFront() = 0;
  50. virtual bool JumpToBack() = 0;
  51. virtual bool AddChild( IWindow &Child, bool AddToBack = false ) = 0;
  52. virtual bool RemoveChild( IWindow &Child ) = 0;
  53. virtual bool SetParent( IWindow *NewParent ) = 0;
  54. virtual IWindow *GetParent() const = 0;
  55. virtual const std::list< IWindow * > &GetChildren() const = 0;
  56. virtual bool FireRender( double TimeSlice ) = 0;
  57. virtual bool FireResize( float NewWidth, float NewHeight ) = 0;
  58. virtual bool FireResized() = 0;
  59. virtual bool FireMove( float NewLeft, float NewTop ) = 0;
  60. virtual bool FireClick( float X, float Y, unsigned long Button ) = 0;
  61. virtual bool FireDoubleClick( float X, float Y, unsigned long Button ) = 0;
  62. virtual bool FireMouseWheel( float X, float Y, unsigned long Button ) = 0;
  63. virtual bool FireMouseDown( float X, float Y, unsigned long Button ) = 0;
  64. virtual bool FireMouseUp( float X, float Y, unsigned long Button ) = 0;
  65. virtual bool FireMouseMove( float X, float Y, unsigned long Button ) = 0;
  66. virtual bool FireMouseEnter( float X, float Y, unsigned long Button ) = 0;
  67. virtual bool FireMouseExit( float X, float Y, unsigned long Button ) = 0;
  68. virtual bool FireKeyPress( unsigned long KeyCode ) = 0;
  69. virtual bool FireKeyDown( unsigned long KeyCode ) = 0;
  70. virtual bool FireKeyUp( unsigned long KeyCode ) = 0;
  71. virtual bool FireGotFocus( IWindow *FromWindow ) = 0;
  72. virtual bool FireLostFocus( IWindow *ToWindow ) = 0;
  73. virtual bool FireCut( IClipboard &Clipboard ) = 0;
  74. virtual bool FireCopy( IClipboard &Clipboard ) = 0;
  75. virtual bool FirePaste( const IClipboard &Clipboard ) = 0;
  76. };
  77. #endif