NAP
sequenceeditorguistate.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 
5 #pragma once
6 
7 // Local Includes
8 #include "sequenceeditorgui.h"
9 #include "sequenceeditorguiactions.h"
10 #include "sequenceeditorguiclipboard.h"
11 
12 // External Includes
13 #include <imgui/imgui.h>
14 
15 namespace nap
16 {
18 
23  struct NAPAPI SequenceEditorGUIState
24  {
25  public:
26  // action
28 
29  // clipboard
31 
32  // dirty means view has changed, and content of tracks need to be redrawn and cached
33  bool mDirty = false;
34 
35  // window focused
36  bool mIsWindowFocused = false;
37 
38  // mouse delte
39  ImVec2 mMouseDelta;
40 
41  // current mouse position
42  ImVec2 mMousePos;
43 
44  // current window position
45  ImVec2 mWindowPos;
46 
47  // current window size
48  ImVec2 mWindowSize;
49 
50  // current timeline controller position
52 
53  // current timelinewidth
55 
56  // height of all tracks with their respective heights
58 
59  // stepsize amount pixels per second
60  float mStepSize;
61 
62  // width of inspector box
64 
65  // previous window position
67 
68  // previous window scroll
69  ImVec2 mScroll;
70 
71  // horizontal resolution (not scaled)
72  float mHorizontalResolution = 100.0f;
73 
74  // current time in sequence of mouse cursor
76 
77  // current cursor pos
78  ImVec2 mCursorPos;
79 
80  // scroll follows player position
81  bool mFollow = false;
82 
83  // current gui scaling factor
84  float mScale = 1.0f;
85 
86  // current sequence name
87  std::string mSequenceName;
88  };
89 }
nap::SequenceEditorGUIState::mWindowSize
ImVec2 mWindowSize
Definition: sequenceeditorguistate.h:48
nap::SequenceEditorGUIState::mInspectorWidth
float mInspectorWidth
Definition: sequenceeditorguistate.h:63
nap::SequenceEditorGUIState
Definition: sequenceeditorguistate.h:23
nap::SequenceEditorGUIState::mCursorPos
ImVec2 mCursorPos
Definition: sequenceeditorguistate.h:78
nap::SequenceEditorGUIState::mMouseCursorTime
double mMouseCursorTime
Definition: sequenceeditorguistate.h:75
nap::SequenceEditorGUIState::mTimelineControllerPos
ImVec2 mTimelineControllerPos
Definition: sequenceeditorguistate.h:51
nap::SequenceEditorGUIState::mSequenceName
std::string mSequenceName
Definition: sequenceeditorguistate.h:87
nap::SequenceEditorGUIState::mTimelineWidth
float mTimelineWidth
Definition: sequenceeditorguistate.h:54
nap::SequenceEditorGUIState::mTotalTracksHeight
float mTotalTracksHeight
Definition: sequenceeditorguistate.h:57
nap::SequenceEditorGUIState::mScroll
ImVec2 mScroll
Definition: sequenceeditorguistate.h:69
nap::SequenceEditorGUIState::mStepSize
float mStepSize
Definition: sequenceeditorguistate.h:60
nap::sequenceguiactions::SequenceActionPtr
std::unique_ptr< Action > SequenceActionPtr
Definition: sequenceeditorguiactions.h:50
nap::SequenceEditorGUIState::mWindowPos
ImVec2 mWindowPos
Definition: sequenceeditorguistate.h:45
nap::SequenceEditorGUIState::mPrevWindowPos
ImVec2 mPrevWindowPos
Definition: sequenceeditorguistate.h:66
nap::SequenceEditorGUIState::mMouseDelta
ImVec2 mMouseDelta
Definition: sequenceeditorguistate.h:39
nap::SequenceEditorGUIState::mMousePos
ImVec2 mMousePos
Definition: sequenceeditorguistate.h:42
nap::sequenceguiclipboard::SequenceClipboardPtr
std::unique_ptr< Clipboard > SequenceClipboardPtr
Definition: sequenceeditorguiclipboard.h:153
nap
Definition: templateapp.h:17