You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Editor/EditorManager.h
+25Lines changed: 25 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -142,13 +142,23 @@ namespace RTEGUI {
142
142
#pragma endregion
143
143
144
144
#pragma region GUI Element Creation
145
+
/// <summary>
146
+
/// Stores the properties of the currently selected GUI element in the workspace for later recreation.
147
+
/// </summary>
148
+
voidStoreCurrentSelectionCopyInfo() const;
149
+
145
150
/// <summary>
146
151
/// Create a new GUI element in the workspace.
147
152
/// </summary>
148
153
/// <param name="editorEvent">The editor event (button press) to create the element from.</param>
149
154
/// <retruns>True to set unsaved changes state.</returns>
150
155
boolAddNewControl(GUIEvent &editorEvent);
151
156
157
+
/// <summary>
158
+
/// Create a new GUI element in the workspace from stored copy info.
159
+
/// </summary>
160
+
voidAddNewControlFromStoredCopyInfo() const;
161
+
152
162
/// <summary>
153
163
///
154
164
/// </summary>
@@ -253,7 +263,22 @@ namespace RTEGUI {
253
263
254
264
private:
255
265
266
+
/// <summary>
267
+
/// Struct containing property information for creating an identical GUI element in the workspace. Used for copy-pasting.
268
+
/// </summary>
269
+
structEditorSelectionCopyInfo {
270
+
std::string Name = "";
271
+
std::string Class = "";
272
+
int PosX = 0;
273
+
int PosY = 0;
274
+
int Width = 0;
275
+
int Height = 0;
276
+
GUIControl *Parent = nullptr;
277
+
GUIProperties *Properties = nullptr;
278
+
};
279
+
256
280
static EditorSelection s_SelectionInfo; //!< EditorSelection instance that contains the information of the currently selected element in the workspace.
281
+
static EditorSelectionCopyInfo s_SelectionCopyInfo; //!< A copy of an existing GUIControl. Used for copy-pasting.
257
282
258
283
std::unique_ptr<GUIControlManager> m_EditorControlManager = nullptr; //!< The GUIControlManager that handles this EditorManager.
259
284
std::unique_ptr<GUICollectionBox> m_EditorBase = nullptr; //!< The lowest level collection box containing the workspace.
0 commit comments