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
8namespace bWidgets {
9
10struct bwContext;
11namespace bwScreenGraph {
12class ScreenGraph;
13class Node;
14} // namespace bwScreenGraph
15
25 public:
27
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
Mangages sending events to screen-graph nodes based on current state.
Definition: bwEventDispatcher.h:24
void dispatchMouseButtonPress(bwMouseButtonEvent &)
Definition: bwEventDispatcher.cc:72
bwEventDispatcher(bwScreenGraph::ScreenGraph &_screen_graph)
Definition: bwEventDispatcher.cc:14
void dispatchMouseButtonRelease(bwMouseButtonEvent &)
Definition: bwEventDispatcher.cc:86
void dispatchMouseMovement(bwEvent)
Definition: bwEventDispatcher.cc:50
void dispatchMouseWheelScroll(bwMouseWheelEvent &)
Definition: bwEventDispatcher.cc:104
Definition: bwEvent.h:8
Definition: bwEvent.h:24
Definition: bwEvent.h:56
The base data-structure for a screen-graph node.
Definition: Node.h:36
Definition: ScreenGraph.h:12
Definition: bwContext.h:3
Important state information for the screen-graph.
Definition: bwContext.h:19