Creating Toolbars
Prev
Next

Creating Toolbars

The following will show you how to create toolbars for a DTEP. Toolbars are graphical elements that are assigned to actions. Actions, in Quanta Plus, are the basis for nearly all the extensions that Quanta Plus has and will acquire in the future. The same mechanism that defines an action in Quanta Plus also enables auto-completion and tag dialogs. With actions, the limit of what you can do is virtually limitless. For means of an example, we will use HTML tidy on our web pages.

From Scratch to Complete

To begin, you will need to create a user toolbar. Select Toolbars->Add User Toolbar.

If there are many tags for the markup language, it is recommended that you split up the tags into logical groups. You will need to create a new user toolbar for each group. In this case, there are not many, so we will be making one toolbar and naming it with the name of the markup.

Once all your toolbars are created, you must add and configure the actions. To do this, select Settings->Configure Actions .

The parts of this window are pretty straight forward. Press the New action button at the bottom of the window to enter the editing mode.

Fill in all of the necessary fields and add the tag to the appropriate toolbar(s).

Complete the rest and, if the tag has attributes and you always plan to use them, check the Run "Edit tag" dialog if available box so that you will be prompted every time the action is used.

You should now have something much like the following.



Press the Apply button and you will see the action added to the toolbar(s) you have selected.



Egad! That's an awful icon. How will yourself and others remember that icon goes with that action? Let's replace it before trouble arises.

To create an icon that more accurately describes that action, we will be using TDEIconEdit. Select it from the TDE menu, Graphics->More Programs (or where ever your distribution placed it).

TDEIconEdit defaults to the size 32x32 pixels, but we need 22x22. To change this, select Edit->Resize.

Keep in mind that you are creating an icon that will assist in helping not only yourself to remember which action does what, but also other users of the DTEP.

Since the tag I am creating the icon for is called “start,” I have decided to create a “Start sign.” Using the color green (green often interpreted as “go,” “start,” or “proceed”) will, or, at least, should, convey a message to the user that clicking this action will place the <start> tag in the current document.



Now that I am finished with the creation of the icon, I will save it.

Once you are done with creating the icon(s), you must associate the icon with the action. To do this, open Settings->Configure Actions again (in Quanta Plus) and select the action you made the icon for. Beside the Text field, you will see a button, click it.

Select Other Icons and then click the Browse button.

Goto the folder in which you saved the icon, select the icon, and click OK.

Press the Apply button and either continue to do the same with the other tags, if any, or click OK to finish.



Let us say you would like to add some common Quanta Plus functions to your toolbar or maybe you think the toolbar would be better off organized in a different manner with some separators to group the actions. Open the Configure Toolbars dialog by going Settings->Configure Toolbars. Make sure your toolbar is selected.

I will be choosing the separator (top of the left column) for my toolbar. Once you have selected the item you wish to add to your toolbar, press the right arrow button. This will add it to your toolbar.



I think I would like a quick way to access the Konqueror Preview. I will select it and add it to the toolbar.



Note how the separator helps in grouping. Someone new to my toolbar might have thought that the Konqueror button was like or the opposite of the start button.



Apply your changes and, when you are done, press OK to finish.

Ah, look at the fantastic new toolbar! Much more handy now.



Remember to test your toolbar, by clicking all the buttons, so that you know the output is correct.



Now to save the toolbar, we will select Toolbars->Save Toolbars->Save as Local Toolbar.

Save it to the correct folder. Since NeXML does not exist, I will just have it to the top-level folder, but your toolbar(s) should be saved to the correct folder. Make sure to adjust your description.rc to have it load your toolbar(s) when a new file of that type is created.

Prev
Next
Home


Would you like to comment or contribute an update to this page?
Send feedback to the TDE Development Team