@@ -36,15 +36,17 @@ namespace RTEGUI {
36
36
GUICollectionBox *filePanel = dynamic_cast <GUICollectionBox *>(m_EditorControlManager->AddControl (" FilePanel" , " COLLECTIONBOX" , m_LeftColumn.get (), 5 , 5 , 270 , 55 ));
37
37
filePanel->SetDrawType (GUICollectionBox::Panel);
38
38
39
- GUIButton *toolboxButton = dynamic_cast <GUIButton *>(m_EditorControlManager->AddControl (" LoadButton" , " BUTTON" , filePanel, 10 , 5 , 80 , 20 ));
39
+ GUIButton *toolboxButton = dynamic_cast <GUIButton *>(m_EditorControlManager->AddControl (" NewButton" , " BUTTON" , filePanel, 6 , 5 , 61 , 20 ));
40
+ toolboxButton->SetText (" New" );
41
+ toolboxButton = dynamic_cast <GUIButton *>(m_EditorControlManager->AddControl (" LoadButton" , " BUTTON" , filePanel, 71 , 5 , 62 , 20 ));
40
42
toolboxButton->SetText (" Load" );
41
- toolboxButton = dynamic_cast <GUIButton *>(m_EditorControlManager->AddControl (" AddButton" , " BUTTON" , filePanel, 10 , 30 , 80 , 20 ));
43
+ toolboxButton = dynamic_cast <GUIButton *>(m_EditorControlManager->AddControl (" AddButton" , " BUTTON" , filePanel, 71 , 30 , 62 , 20 ));
42
44
toolboxButton->SetText (" Add File" );
43
- toolboxButton = dynamic_cast <GUIButton *>(m_EditorControlManager->AddControl (" SaveButton" , " BUTTON" , filePanel, 95 , 5 , 80 , 20 ));
45
+ toolboxButton = dynamic_cast <GUIButton *>(m_EditorControlManager->AddControl (" SaveButton" , " BUTTON" , filePanel, 137 , 5 , 62 , 20 ));
44
46
toolboxButton->SetText (" Save" );
45
- toolboxButton = dynamic_cast <GUIButton *>(m_EditorControlManager->AddControl (" SaveAsButton" , " BUTTON" , filePanel, 95 , 30 , 80 , 20 ));
47
+ toolboxButton = dynamic_cast <GUIButton *>(m_EditorControlManager->AddControl (" SaveAsButton" , " BUTTON" , filePanel, 137 , 30 , 62 , 20 ));
46
48
toolboxButton->SetText (" Save As" );
47
- toolboxButton = dynamic_cast <GUIButton *>(m_EditorControlManager->AddControl (" QuitButton" , " BUTTON" , filePanel, 180 , 5 , 80 , 20 ));
49
+ toolboxButton = dynamic_cast <GUIButton *>(m_EditorControlManager->AddControl (" QuitButton" , " BUTTON" , filePanel, 203 , 5 , 61 , 20 ));
48
50
toolboxButton->SetText (" Quit" );
49
51
50
52
GUICollectionBox *editorControls = dynamic_cast <GUICollectionBox *>(m_EditorControlManager->AddControl (" EditorControlsPanel" , " COLLECTIONBOX" , m_LeftColumn.get (), filePanel->GetRelXPos (), filePanel->GetRelYPos () + 65 , 270 , 155 ));
@@ -109,10 +111,15 @@ namespace RTEGUI {
109
111
workspace->SetDrawColor (makecol (64 , 64 , 64 ));
110
112
workspace->SetDrawType (GUICollectionBox::Color);
111
113
112
- // Create the root CollectionBox for the edited document and add it to the CollectionBox list
113
- GUICollectionBox *rootBox = dynamic_cast <GUICollectionBox *>(m_WorkspaceManager->AddControl (" root" , " COLLECTIONBOX" , nullptr , m_WorkspacePosX, m_WorkspacePosY, m_WorkspaceWidth, m_WorkspaceHeight));
114
- rootBox->SetDrawBackground (false );
115
- m_RootControl = rootBox;
114
+ CreateRootControl ();
115
+ }
116
+
117
+ // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
118
+
119
+ void EditorManager::CreateRootControl () {
120
+ GUICollectionBox *rootCollectionBox = dynamic_cast <GUICollectionBox *>(m_WorkspaceManager->AddControl (" root" , " COLLECTIONBOX" , nullptr , m_WorkspacePosX, m_WorkspacePosY, m_WorkspaceWidth, m_WorkspaceHeight));
121
+ rootCollectionBox->SetDrawBackground (false );
122
+ m_RootControl = rootCollectionBox;
116
123
m_CollectionBoxList->AddItem (m_RootControl->GetName ());
117
124
}
118
125
0 commit comments