bWidgets
Core widget toolkit designed for Blender
bwEventDispatcher.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <optional>
4
5
#include "
bwEvent.h
"
6
#include "
bwPoint.h
"
7
8
namespace
bWidgets
{
9
10
struct
bwContext;
11
namespace
bwScreenGraph {
12
class
ScreenGraph;
13
class
Node;
14
}
// namespace bwScreenGraph
15
24
class
bwEventDispatcher
{
25
public
:
26
bwEventDispatcher
(
bwScreenGraph::ScreenGraph
& _screen_graph);
27
28
void
dispatchMouseMovement
(
bwEvent
);
29
void
dispatchMouseButtonPress
(
bwMouseButtonEvent
&);
30
void
dispatchMouseButtonRelease
(
bwMouseButtonEvent
&);
31
void
dispatchMouseWheelScroll
(
bwMouseWheelEvent
&);
32
33
private
:
34
auto
isDragging() -> bool;
35
void
changeContextHovered(
bwScreenGraph::Node
*,
bwEvent
&);
36
38
bwScreenGraph::ScreenGraph
& screen_graph;
40
bwContext
& context;
41
42
std::optional<bwMouseButtonDragEvent> drag_event;
43
};
44
45
}
// namespace bWidgets
bwEvent.h
bwPoint.h
bWidgets::bwEventDispatcher
Mangages sending events to screen-graph nodes based on current state.
Definition:
bwEventDispatcher.h:24
bWidgets::bwEventDispatcher::dispatchMouseButtonPress
void dispatchMouseButtonPress(bwMouseButtonEvent &)
Definition:
bwEventDispatcher.cc:72
bWidgets::bwEventDispatcher::bwEventDispatcher
bwEventDispatcher(bwScreenGraph::ScreenGraph &_screen_graph)
Definition:
bwEventDispatcher.cc:14
bWidgets::bwEventDispatcher::dispatchMouseButtonRelease
void dispatchMouseButtonRelease(bwMouseButtonEvent &)
Definition:
bwEventDispatcher.cc:86
bWidgets::bwEventDispatcher::dispatchMouseMovement
void dispatchMouseMovement(bwEvent)
Definition:
bwEventDispatcher.cc:50
bWidgets::bwEventDispatcher::dispatchMouseWheelScroll
void dispatchMouseWheelScroll(bwMouseWheelEvent &)
Definition:
bwEventDispatcher.cc:104
bWidgets::bwEvent
Definition:
bwEvent.h:8
bWidgets::bwMouseButtonEvent
Definition:
bwEvent.h:24
bWidgets::bwMouseWheelEvent
Definition:
bwEvent.h:56
bWidgets::bwScreenGraph::Node
The base data-structure for a screen-graph node.
Definition:
Node.h:36
bWidgets::bwScreenGraph::ScreenGraph
Definition:
ScreenGraph.h:12
bWidgets
Definition:
bwContext.h:3
bWidgets::bwContext
Important state information for the screen-graph.
Definition:
bwContext.h:19
bwidgets
bwEventDispatcher.h
Generated by
1.9.3