File: toolbar.html

package info (click to toggle)
doublecmd-help 1.1.30-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,812 kB
  • sloc: makefile: 12
file content (247 lines) | stat: -rw-r--r-- 15,930 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <title>DC - Toolbars</title>
    <link rel="stylesheet" type="text/css" href="doublecmd.css">
    <link rel="shortcut icon" href="../../pixmaps/common/favicon.ico">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>

  <body>
    <a name="topofpage"></a>
    <div class="header"><a href="index.html"><img src="../../pixmaps/common/dclogo2017.png" alt="Double Commander" height="48" width="374"></a>
      <div id="global-nav" class="nav"><a title="Double Commander Home Page" href="https://doublecmd.sourceforge.io/" target="_blank">Homepage</a> | <a title="Double Commander Wiki" href="https://github.com/doublecmd/doublecmd/wiki" target="_blank">Wiki</a></div>
    </div>
    <div class="footer"><div class="nav"><a title="Index" href="index.html">Index</a> | <a title="Previous page" href="multiarc.html">Previous</a> | <a title="Next page" href="variables.html">Next</a></div></div>

    <div class="dchelpage">
      <div>
        <h1>2.11. Toolbar</h1>
      </div>

      <div>
        <h2>Content</h2>
        <dl>
          <dt>1. <a href="#toolbardefinition">What is the toolbar and how it could be used</a></dt>
          <dt>2. <a href="#toolbarshowit">How to display it</a></dt>
          <dt>3. <a href="#toolbarelementlist">What could be inside the toolbar</a></dt>
          <dt>4. <a href="#toolbarconfig">How to configure the toolbar</a></dt>
          <dt>5. <a href="#toolbardescription">Description of elements</a></dt>
          <dd>
            <dl>
              <dd>5.1. <a href="#catseparator">Separator</a></dd>
              <dd>5.2. <a href="#catinternal">Internal Command</a></dd>
              <dd>5.3. <a href="#catexternal">External Command</a></dd>
              <dd>5.4. <a href="#catmenu">Menu</a></dd>
            </dl>
          </dd>
        </dl>
      </div>

      <div>
        <h2><a name="toolbardefinition">1. What is the toolbar and how it could be used</a></h2>
        <p>When working heavily with two-panels file manager like Double Commander, it comes a time that it would be more useful to launch the application we're using directly from our manager instead of having to reach a shortcut on the desktop, in a task bar or in a start menu.</p>
        <p>This is especially true for task we do often.</p>
        <p>The idea of the toolbar it to allow each one to customize buttons inside a bar for functions we need to do often.</p>
        <p>Double Commander proposes also to use numerous possible parameters based on current displayed/selected files to allow us to pass them as parameters to the application to launch.</p>
        <p>Here follows the default toolbar of DC shown above the file panels after a default installation. But don't worry: you may configure it the way you want to adapt to your need and your taste.</p>
        <p class="figure"><img class="largeimage" title="Toolbar sample" alt="Toolbar sample" src="images/imgDC/toolbarsample.png" width="756" height="38"></p>
        <p>The middle toolbar is also available, it is located between the file panels. The capabilities and process of configuring the middle toolbar are similar to the main one.</p>
        <p class="navback"><a href="#topofpage">(back to top)</a></p>
      </div>

      <div>
        <h2><a name="toolbarshowit">2. How to display it</a></h2>
        <p>The toolbar will be displayed or not depending of what is set in the <a href="#ConfigLayout">Layout</a> configuration settings.</p>
        <p>To activate it, we just make sure we've set the <span class="italic">Show toolbar</span> option.</p>
        <p class="figure"><img class="largeimage" title="Show toolbar" alt="Show toolbar" src="images/imgDC/toolbarshowit.png" width="640" height="165"></p>
        <p class="navback"><a href="#topofpage">(back to top)</a></p>
      </div>

      <div>
        <h2><a name="toolbarelementlist">3. What could be inside the toolbar</a></h2>
        <p>Here is a table of what may be present into a toolbar</p>
        <table class="category">
          <tr class="rowcategorytable"><th colspan="2">Possible element inside a toolbar</th></tr>
          <tr class="rowcategorysubtitle"><th class="categorynamecolumn">Elements</th><th class="categorydesccolumn">Description</th></tr>
          <tr>
            <td class="categorycell"><div class="categoryname"><a href="#catseparator">Separator</a></div></td>
            <td class="categorydesc">Vertical bar to help us to group together similar functions and/or similar context.</td>
          </tr>
          <tr>
            <td class="categorycell"><div class="categoryname"><a href="#catinternal">Internal command</a></div></td>
            <td class="categorydesc">To invoke internal command present in Double Commander.</td>
          </tr>
          <tr>
            <td class="categorycell"><div class="categoryname"><a href="#catexternal">External command</a></div></td>
            <td class="categorydesc">To launch external application, executable, script, etc.</td>
          </tr>
          <tr>
            <td class="categorycell"><div class="categoryname"><a href="#catmenu">Menu</a></div></td>
            <td class="categorydesc">To configure other toolbar element that will be displayed as drop menu from the main toolbar.</td>
          </tr>
        </table>
        <p class="navback"><a href="#topofpage">(back to top)</a></p>
      </div>

      <div>
        <h2><a name="toolbarconfig">4. How to configure the toolbar</a></h2>
        <p>To configure what will be present in our toolbar, we will need to configure it.</p>
        <p>We may certainly go to the main configuration of Double Commander, scroll in the left column and select "Toolbar" and we'll have access to it.</p>
        <p class="figure"><img class="largeimage" title="Toolbar configuration" alt="Toolbar configuration" src="images/imgDC/toolbarconfig1.png" width="646" height="156"></p>
        <p>The other quick way to reach the configuration is to directly right click in an empty area of the toolbar and select <span class="italic">Edit</span>.</p>
        <p class="figure"><img class="largeimage" title="Toolbar configuration" alt="Toolbar configuration" src="images/imgDC/toolbarconfig2.png" width="200" height="72"></p>
        <p>As we're getting familiar with the toolbar, we'll also probably right click directly on a button from the toolbar to not only open the toolbar editor but beeing ready to immediately edit the associated action of the toolbar button we've right clicked on.</p>
        <p class="figure"><img class="largeimage" title="Toolbar configuration" alt="Toolbar configuration" src="images/imgDC/toolbarconfig3.png" width="618" height="254"></p>
        <p>In addition, the context menu allows to delete the selected button, cut or copy to the clipboard or insert a button from the clipboard.</p>
        <p>We can also change the order of the toolbar elements without opening the settings window: Double Commander supports dragging buttons with the mouse while holding down the <kbd>Shift</kbd> key.</p>
        <p class="navback"><a href="#topofpage">(back to top)</a></p>
      </div>

      <div>
        <h2><a name="catseparator">5.1. Description of elements - Separator</a></h2>
        <p>The separator has no real active functions, it's just decorative for pleasant looking. Can be used to separate group of buttons to have similar related actions grouped together.</p>
        <p>The following styles are available:</p>
        <ul>
          <li><p><span class="italic">Separator</span>&nbsp;&ndash; is simply a vertical bar (horizontal in the middle toolbar).</p></li>
          <li><p><span class="italic">Space</span>&nbsp;&ndash; adds an empty space, its width corresponds to the size of the button.</p></li>
        </ul>
        <p>The menu will use the first one regardless of the style selected.</p>
        <p>In the following example, the person used separator to isolate together functions related with comparisons, then the ones related with clipboard, etc.</p>
        <p class="figure"><img class="largeimage" title="Example of separator" alt="Example of separator" src="images/imgDC/toolbarseparator.png" width="420" height="192"></p>
      </div>
      <br>

      <div>
        <h2><a name="catinternal">5.2. Description of elements - Internal Command</a></h2>
        <p>The internal commands are related with actions made directly by Double Commander that doesn't need to call an external application.</p>
        <p>The commands are extremely varied. Please see <a href="cmds.html">this page</a> which is dedicated to described all the internal commands.</p>
        <p>For example if we want a toolbar button to allow to launch a search, we'll just select the <tt>cm_Search</tt> command from the drop box of command.</p>
        <p>As we see in the following image, we may select a custom icon for it but generally just choosing the command from the drop box of command is enough and command already have an internal associated icon.</p>
        <p>The tooltip is also there to allow us to write an easy to remember little words to remember us the task of the button as we move cursor over.</p>
        <p>Here is an example with that <a href="cmds.html#cm_Search">cm_Search</a> command:</p>
        <p class="figure"><img class="largeimage" title="Example of internal command with no parameter" alt="Example of internal command with no parameter" src="images/imgDC/toolbarinternal1.png" width="610" height="289"></p>
        <p>Some internal commands might accept parameters to configure their actions. When this is required, we'll simply write the parameter for in the parameter box: most parameters must be added as <i>parameter=value</i> (unless otherwise stated), each must be in a separate line, without quotes and other ways of escaping special characters and spaces.</p>
        <p>In the following example, we use the internal command <a href="cmds.html#cm_ChangeDir">cm_ChangeDir</a> and we're providing two parameters to indicate which directory to load and show in each panel.</p>
        <p class="figure"><img class="largeimage" title="Example of internal command with parameters" alt="Example of internal command with parameters" src="images/imgDC/toolbarinternal2.png" width="610" height="210"></p>
      </div>
      <br>

      <div>
        <h2><a name="catexternal">5.3. Description of elements - External Command</a></h2>
        <p>The external commands are related with actions that require to call external program.</p>
        <p>For the external commands we have the possibility to set a few more settings that will allow us to configure precisely the command we want to launch, in which directory we want to launch it and what we want to provide as parameters, if necessary, to the commands.</p>
        <p>The "Command" field is for the executable file only (as is, without quotes): we can specify the file name or the file name with the full path, we can also use <a href="variables.html#envvariables">environment variables</a>.</p>
        <p>Regarding the parameters, we may select user variables that will be substituted by their actual value based on the current selected file of the active panel and so on. See the dedicated page of the possible variable to use as parameter under <a href="variables.html">this link</a> (please note the use of <a href="variables.html#quotation">quotation marks</a>). To run a command in the terminal, we can use the variables <a href="variables.html#executeterm">%t0 and %t1</a>.</p>
        <p>In the following example, we've set a toolbar button to launch the application GIMP and the <code>%p</code> as parameter means that when we click the button to launch GIMP, the complete filename of the current selected file in the active panel will be passed as parameter, since that's what <code>%p</code> stands for.</p>
        <p class="figure"><img class="largeimage" title="Example of external command" alt="Example of external command" src="images/imgDC/toolbarexternal.png" width="610" height="229"></p>
        <p>If we do not need to explicitly specify the working directory, then we can leave the "Start Path" field empty, in this case, the working directory will be the current directory of the active file panel. Here we can use the variable <a href="variables.html#pathpanel">%D</a>, <a href="variables.html#basicvar">%d</a> or <a href="variables.html#envvariables">environment variables</a>.</p>
      </div>
      <br>

      <div>
        <h2><a name="catmenu">5.4. Description of elements - Menu</a></h2>
        <p>If we're configuring a lot of toolbar button, we may run out of space to have all our buttons on the same horizontal line.</p>
        <p>So to allow us to add more buttons, we may add a special button type that will make appear a drop menu below the button to give us access to something similar to a toolbar of buttons but presented as a drop menu.</p>
        <p>See the following example where we added a button type of "Menu".</p>
        <p>This will make appear a new sub toolbar below that we can populate as we needed with new toolbar buttons pointing to different tasks.</p>
        <p>This example also shows us that it could help to group together buttons related to the same projects, the same areas.</p>
        <p>In this example the sub toolbar has functions related with different type of OS's installed in virtual machines.</p>
        <p class="figure"><img class="largeimage" title="Example of menu" alt="Example of menu" src="images/imgDC/toolbarmenu.png" width="610" height="318"></p>
        <p>Below is displayed how the configured sub toolbar will appear in the application:</p>
        <p class="figure"><img class="largeimage" title="Example of drop menu" alt="Example of drop menu" src="images/imgDC/toolbarmenudrop.png" width="250" height="342"></p>
        <p>The sub toolbar configured this way may contains the same type of button type presented before.</p>
        <p>We may even have a sub toolbar inside a subtoolbar and so on.</p>
        <p>This will simply be displayed in the application as a sub menu from a menu element.</p>
        <p>See below an example:</p>
        <p class="figure"><img class="largeimage" title="Example of toolbar in a toolbar" alt="Example of toolbar in a toolbar" src="images/imgDC/toolbarinbar.png" width="732" height="558"></p>
      </div>

      <div>
        <p class="navback"><a href="#topofpage">(back to top)</a></p>
        <br>
      </div>
    </div>
    <div class="footer"><div class="nav"><a title="Index" href="index.html">Index</a> | <a title="Previous page" href="multiarc.html">Previous</a> | <a title="Next page" href="variables.html">Next</a></div></div>
    <div class="checker">
      <a href="https://validator.w3.org/check?uri=referer" target="_blank"><img src="https://www.w3.org/Icons/valid-html40" alt="Valid HTML 4.0 Transitional" height="31" width="88"></a>
      <a href="https://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img style="border:0;width:88px;height:31px" src="https://jigsaw.w3.org/css-validator/images/vcss" alt="CSS Valid!"></a>
    </div>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
  </body>
</html>