XAML code
The toolbars on the Pages main tab are defined by means of XAML commands in the <ToolBarList under <Menuset Name="Fred4Main"> within the <GN4ShellMenus> in the Fred4_TabItems.xml file. Such XAML commands define which icons and in which order a toolbar contains, and in which row and in which order it appears on the toolbar docking zone.
The default code in the Fred4_TabItems.xml (for the version 2.1) is shown on the following screenshot. The comments explain which toolbars are shown where:
Row and order of toolbars
The row and order of toolbars in the given zone is defined by the following XAML tags: Band="0" BandIndex="0". The Band="0" is the first row, Band="1" is the second row and so on. The BandIndex="0" is the first element in the given row, the BandIndex="1" is the second element and so on. Please note that XAML doesn't define the docking zone (top, left, bottom, right) - this is handled in the VB.Net script as explained below.
System add-ins declarations
All toolbars on the Pages main tab are declared also in the system add-in file Shell.vb, under Public Class MainToolBar. There, the docking zone (top, left, bottom, or right) is defined. Those two definitions work together, so you are not supposed to change the first one without adjusting the second one.
Toggle scripts
The toolbars are displayed by means of a series of scripts in the #Region "Toolbars of Fred, Ted, Tracy" of the system add-in file Shellvb. The names of such scripts reflect the toolbar names, therefore Public Overridable Sub ToggleToolboxToolBar() applies to the <l:ShellToolBar Title="Toolbox" ShortTitle="Toolbox" Name="MainToolbox" XAML definition and to the Public Shared Toolbox As New ToolBarFactory("MainToolbox") VB.Net definition.
Have in mind that the Togglexxx scripts also contain the hard-coded dock zone of every single toolbar, e.g.
<ShellCommand(IsChecked:="Chk_IsToolboxToolBarChecked")> _
Public Overridable Sub ToggleToolboxToolBar()
Main.ToggleToolBar(MainToolBar.Toolbox, "Main", "Left", ToggleAction.Toggle)
End Sub
On the previous piece of the code, you can see that the Toolbox toolbar goes in the Left docking zone.
Default toolbars display script
The default toolbars are displayed by the ShowDefToolbarsPages script in the system add-in file Fred.vb.
Public Overridable Sub ShowDefToolbarsPages(ByVal tab As IShellTabItem)
' show these toolbars in the top zone
tab.ToggleToolBar(MainToolBar.Main, "Main", "Top", ToggleAction.Open)
tab.ToggleToolBar(MainToolBar.TextStyle, "Main", "Top", ToggleAction.Open)
tab.ToggleToolBar(MainToolBar.Formatting, "Main", "Top", ToggleAction.Open)
tab.ToggleToolBar(MainToolBar.Fit, "Main", "Top", ToggleAction.Open)
tab.ToggleToolBar(MainToolBar.Table, "Main", "Top", ToggleAction.Open)
tab.ToggleToolBar(MainToolBar.ArticleElts, "Main", "Top", ToggleAction.Open)
' show this toolbar in the left zone
tab.ToggleToolBar(MainToolBar.Toolbox, "Main", "Left", ToggleAction.Open)
' show these toolbars in the bottom zone
tab.ToggleToolBar(MainToolBar.Layout, "Main", "Bottom", ToggleAction.Open)
tab.ToggleToolBar(MainToolBar.PageTools, "Main", "Bottom", ToggleAction.Open)
tab.ToggleToolBar(MainToolBar.Pictures, "Main", "Bottom", ToggleAction.Open)
tab.ToggleToolBar(MainToolBar.Alignment, "Main", "Bottom", ToggleAction.Open)
tab.ToggleToolBar(MainToolBar.ArticleFrames, "Main", "Bottom", ToggleAction.Open)
tab.ToggleToolBar(MainToolBar.Search, "Main", "Bottom", ToggleAction.Open)
tab.ToggleToolBar(MainToolBar.GlobalSearch, "Main", "Bottom", ToggleAction.Open)
tab.ToggleToolBar(MainToolBar.Delete, "Main", "Bottom", ToggleAction.Open)
End Sub
Have in mind that the commands in the ShowDefToolbarsPages script define again in which zone a toolbar will appear. Therefore, to keep the things clean make sure that the Togglexxx scripts and the ShowDefToolbarsPages script specify the zones coherently.