vsg: include/vsg/ui/PrintEvents.h Source File

vsg 1.1.13 VulkanSceneGraph library

Loading...
Searching...
No Matches
PrintEvents.h
1#pragma once
2
3/* <editor-fold desc="MIT License">
4
5Copyright(c) 2018 Robert Osfield
6
7Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
9The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
11THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12
13</editor-fold> */
14
15#include <vsg/core/Visitor.h>
16#include <vsg/ui/UIEvent.h>
17
18namespace vsg
19{
20
22 class VSG_DECLSPEC PrintEvents : public Inherit<Visitor, PrintEvents>
23 {
24 public:
25 explicit PrintEvents(clock::time_point in_start_point);
26 PrintEvents(std::ostream& out, clock::time_point in_start_point);
27
28 std::ostream& output;
29 clock::time_point start_point;
30
31 virtual std::ostream& print(UIEvent& event);
32
33 void apply(Object& object) override;
34 void apply(UIEvent& event) override;
35 void apply(FrameEvent& event) override;
36 void apply(ExposeWindowEvent& event) override;
37 void apply(CloseWindowEvent& event) override;
38 void apply(KeyReleaseEvent& keyRelease) override;
39 void apply(KeyPressEvent& keyPress) override;
40 void apply(ButtonPressEvent& buttonPress) override;
41 void apply(ButtonReleaseEvent& buttonRelease) override;
42 void apply(MoveEvent& move) override;
43 void apply(ScrollWheelEvent& scrollWheel) override;
44 };
45 VSG_type_name(vsg::PrintEvents);
46
47} // namespace vsg
vsg::ButtonPressEvent
ButtonPressEvent represents a button press event.
Definition PointerEvent.h:55
vsg::ButtonReleaseEvent
ButtonReleaseEvent represents a button release event.
Definition PointerEvent.h:72
vsg::CloseWindowEvent
CloseWindowEvent represents a window close event.
Definition WindowEvent.h:87
vsg::ExposeWindowEvent
ExposeWindowEvent represents a window expose event.
Definition WindowEvent.h:41
vsg::FrameEvent
Definition ApplicationEvent.h:37
vsg::KeyPressEvent
KeyPressEvent represents a key press event.
Definition KeyEvent.h:309
vsg::KeyReleaseEvent
KeyReleaseEvent represents a key release event.
Definition KeyEvent.h:320
vsg::MoveEvent
MoveEvent represents a pointer move event.
Definition PointerEvent.h:89
vsg::Object
Definition Object.h:60
vsg::PrintEvents
PrintEvents prints ui event settings to stream, used for tracking/debugging event handling in applica...
Definition PrintEvents.h:23
vsg::ScrollWheelEvent
ScrollWheelEvent represents a scroll wheel event.
Definition ScrollWheelEvent.h:22
vsg::UIEvent
UIEvent is a base class for user interface events.
Definition UIEvent.h:28