# Features

Screem has a very wide range of useful features, and probably some not so useful ones :-)

The following section of this manual describes in depth each of those features, along with any currently know bugs so you know how to avoid them while they are being fixed

## Multiple pages open at once

As can be expected in any reasonable editor multiple pages can be edited at once. Notebook tabs for each page are present below the editor window, and can be switched between by clicking with the left mouse button. Clicking on them with the right mouse button will present a popup menu allowing you to do the following:

- Save the page

- Save the page as a different filename

- Close the page

- Rename the page

## Multiple projects (or Sites) open at once

As well as multiple pages open at once you can also have multiple projects, or Sites, open at once. These can be switched between from the box at the top of the site view. There is a special project call "Single Pages" which is used as a fake project for when you want to edit individual files which are not associated with any specific project.

## Syntax Highlighting

As already mentioned in the Getting Started Section Screem supports syntax highlighting. There are a couple of ways to edit the highlighting colours.

- via the Settings Preferences menu item.

- editing the syntax highlighting files

Obviously the first option is the simplest to do. Select the Colours option in the preferences dialog. This will present you with a selection of frames, allowing you to change the colours for the different syntax groups.

The latter is more compicated. The syntax files themselves utilise XML. The files are stored in `~/.screem/syntax`. A simple syntax file is as follows:

    <?xml version="1.0"?>
    <screem_syntax>
    	<type>mime type goes here</type>

    	<group name="group name">
    		<fore use="1" red="65535" green="0" blue="0">
    		<back use="0" red="0" green="0" blue="0">
    		<pattern>regexp to match goes here</pattern>
    	</group>
    </screem_syntax>

You can have multiple <type> tags for each mime-type that the highlighting is for. There is no limit on the number of <group> section there can be. The <fore> and<back> elements control the foreground and background colour highlighting. The use attribute determines if highlighting is in use, and the red, green, and blue attributes control the colour.

### Known problems

- The syntax highlighting causes horrible flickering in the editor on slower machines.

- Doesn't like some expressions in syntax files.

- May cause a crash due to the GtkText widget being so buggy.

## Previewing Pages

An internal preview view is provided by Screem should you wish to check your work quickly without having to resort to an external browser / viewer. The preview currently only handles plain HTML, ie no javascript, PHP etc. Later versions will support these and also other document formats such as Docbook, and also possibly the use of Mozilla as the preview widget.

Any links in the preview view which link to pages in the site being edited can be clicked on, and the page will be opened up in the editor, ready to be modified. External links will not work.

### Known Problems

There are two different preview widgets that can be used, the default is GtkXmHTML and does a very poor job. The second which screem will use if it was available when compiled is GtkHTML. Problems from the GtkXmHTML preview will not be supported. To tell if which one you are using type the following in a terminal window: `ldd `which screem` | grep html`

## External Browsers

Should you wish to see what your web documents look like in specific browsers Screem has support for 4 different ones. The first is the default GNOME viewer for HTML documents which can be set from `gnomecc`. The other three are user definable. If one is not set then left clicking on the toolbar button will display a dialog where you can set the icon to display, and the application to use. If already set the left clicking will display the page, whereas right clicking will display the configuration dialog allowing you to change the application and/or the icon.

## Site Wide Templates

There are two different types of template that are supported.

- Page Templates

- Site Templates

### Page Templates

Page templates are as can be expected for individual pages. You can use these to create standard page styles/ layouts to quickly create large numbers of pages which share the same basic features. When working on a site you can set a template which will be used by default for all new pages created for that project.

### Site Templates

Site Templates describe a layout of an entire sites directory structure and files. You can use this feature to have a standard directory layout for sites and hence quickly build a basic site with a few clicks. A very nice feature of site templates is that they can include page templates as well, so not only do you get the directory heirarchy but you also get the basic page layouts as well.

### Known problems

The site template feature needs a lot of work, especially on the interface used to create them.

## CVS

CVS is a version control system that allows multiple developers to work on a project and handle merging the different changes made by individuals. Screem supports CVS so multiple developers can work on a website without stepping on each others toes. It is recommended that only 1 developer handles uploading the site at the moment if the upload wizard is used.

## Drag and Drop

Extensive Drag and Drop support is available in Screem The main area which supports this the text editor itself. The following areas support drag and drop:

- The editor

- The Site file list

- The document structure view

- All the standard Gnome widgets that feature DnD, such as entry widgets.

### Editor DnD

The action taken when dropping items onto the editor depends on whether the draw was performed with the left mouse button, or the middle mouse button. Left button drops will insert text into the editor, the text itself will depend on what the drop was.

#### File Drop

Dropping a file onto the editor with a left button drag/drop will insert that filename at the position it is dropped at. The filename will be converted to a relative path if it is within the site being edited.

Dropping a file onto the editor with a middle button drag/drop will present a menu allowing you to select the action to be taken.

#### URI Drop

Dropping a URI onto the editor will insert that URI into the editor as text, drops from Netscape are supported, however drops from Mozilla are not currently supported.

#### Colour Drop

Dropping a colour onto the editor with a left button drag/drop will insert that colour code in quotes, eg:

    "#ffa500"

Although there are no applications that currently support middle button drag/drop of colours, if one does occur on the editor you will be presented with a popup menu of what action to take.

### Site File List DnD (and Browse File List)

The site file list will behave in the expected manner, drag/drops copy/move files/directories around. A normal left button drag/drop will attempt to move the dragged/dropped item. A middle button drop will give you the option.

### Document Structure DnD

The document structure view drag/drop support allows you to move sections of SGML/XML documents around by dragging the elements. As always a middle button drop presents a menu inquiring what action should be performed with the drop.

## User definable tag list

The tag list provides a convinient way to access data that you commonly want to insert in the editor. By default the tag list is populated with HTML 4.0 data. You will also find the contents of your resources folders there as well. One other group of items which may appear there is the function information from Bluefish, which will be available if Bluefish is installed on your system.

The tag list has a tree like organisation, where nodes with no children will insert data when clicked. Now although it is nice having all the preset items available you may also add your own items here for quick access. There is currently no graphical interface for this, but it is very easy to do as it is built up from XML files. Here's a quick example:

    <?xml version="1.0"?>
    <TagTree>
    <node name="group name">
    <node name="example" open="&lt;opentag&gt;" close="&lt;/opentag&gt;"/>
    </node>
    </TagTree>

This will create a group called "group name" with a single node in it which will insert <opentag></opentag> when clicked on. You do not need to provide both open and close, an open attribute is required though, although it may be any string you wish. For a larger example see `$prefix/share/screem/screem.tagtree` or the development manual.

## User definable key macros

As well as the tag list for insertion of commonly used text you may also assigned key combinations to do the same task. You can edit them via Settings Preferences and selecting the Keys item.

To add a new key combo type the combo you want, or click the Grab Key button which will wait for you to press the combo and insert the text in the New key combo entry. The Action/Text entry is where you either enter the text that will be inserted upon pressing the key combo in the editor, or you can select a specific action to be performed from one of the preset options. When you are happy with the combo clicked the Add button.

To update a key combination click on it in the list, then edit the information as per adding a new key combo. When you are happy with it click Update, or if you decide you want it to be a new combo you can also click Add

Should you decide that you no longer want a specific combo select it in the list, then click on the Remove button.

## Guile Scripting

Although Screem has many features you may find that you want more. To help with this you can create a script written in Guile that can perform the task you want. For more information on scripting read the development manual for Screem

## Project Todo list

Managing a website may involve many tasks, and it can be difficult to keep track of them all. Therefore Screem provides a project todo list when editing any site. To access it simply click on the toolbar button.

The todo dialog shows all the current tasks for the project, along with their status. To add a new item to the list click the Add button. This will popup a dialog allowing you to enter the task details.

Obviously you will want to manipulate tasks once they have been added. When a task has been completed select it in the list, then click the Complete button and it will be removed. To modify the details of the task select it in the list and click the Edit button.

## HTML tag help

Whether you are new to HTML, or an expert there are times when you will need to lookup some information, such as the allowed values of an attribute. Screem provides help for HTML 4.0 tags. You can view this help either by selecting the tag name in the toolbar combo and clicked in the help button, or the more powerful and useful way is via the editor popup menu, which will provide a help item if available.

### Known Problems

Without using GtkHTML the help doesn't work, this is due to the GtkXmHTML widget which isn't very good.

## Inline tagging

Inline tagging is a very powerful feature which comes in useful more often than not. When the cursor is inside a tag, and you press space a popup menu will appear containing the valid attributes. Where possible those attributes will have a submenu which will contain the legal values for that attribute. Should you actually want the space character to be inserted into the editor just continue your typing and it will be inserted. However if you only wish to insert a single space character you will need to press it twice.

The inline tagging works from the DTD for the current page, as such if it isn't available then the inline tagging will not work. The menu is also accessable via the editor popup menu when clicking on a tag.

### Known Problems

Due to utilising the DTD support the inline tagging will only work if the DTD could be parsed.

## Search/Replace

As can be expected there are search/replace features available, either from the toolbar, or the menu. By default the find/replace just performs a straight forward comparison on the strings. Once ready to start search/replacing click the Find Next button, this will jump to the next occurance of the string. If you are replacing then you can click the Replace button to perform the action, or the Replace All button to replace every occurance without prompting.

Sometimes matching against a string isn't enough, therefore Screem supports the use of regular expressions in the find string. This can be enabled by clicking on the checkbutton.

Project wide search/replace is also provided. A list of all files where a match is found is shown in the find/replace dialog. Clicking on a file in that list will view that file and allow you to perform the find/replace as usual.

## Printing

Printing support is included for both the editor, so you can print the text, and the HTML preview (GtkHTML preview required). Along with the ability to print a print preview can also be viewed for both the editor and the preview. Printing can be to a normal printer, or to a file. gnome-print support is required when the binary is built.

## PHP function tooltips

PHP has a wide range of functions, as such you may not be able to remember the parameters a function requires. To aid in solving this problem you can point the mouse over the name of a PHP function and the function prototype will be displayed in the status bar of the main application window.

### Known Problems

Not all PHP functions are supported.

## Site Navigation View

Large sites can have many pages, images, script files etc, therefore it can be useful to see how everything links together and see an overview of your site. The Site Navigation View is centred around the current file being edited. It allows you to control the depth of links that will be displayed, scroll around the view, and even zoom in / out so that more / less of your site is displayed.

Just viewing the linkage is useful, but you may also decide you want to edit one of the pages in the view, this can be done by simply double clicking on the file in the view. A popup menu, identical to that available in the Site file list is also available by right clicking on the file in the view.

### Known Problems

- Processor usage will go to 100% sometimes, just quit Screem and restart it.

- Sometimes links will stay in the "Checking" state, this is a problem with gnome-vfs

## Document structure view

The document structure view provides the tree structure of the current document. Clicking on a item in the tree will take you to the line in the editor that contains that tag. This can be useful for naviating around a large document. You can also reorganise your document by dragging parts of the tree around and placing them elsewhere.

## Tag Properties View

The tag properties view is an alternative method for setting the attributes in a tag. Its shows every legal attribute for a tag, based on the DTD in use, and allows you to enter/select the value for those attributes. Pressing enter/return in each text area will insert that attribute. Using this view you can easily enter all the attributes for a tag that you want without having to type them all in the editor.

### Known Problems

Requires that the DTD in use is parsed correctly.

## Spell Checking

Intelligent spell checking is available from the toolbar. It is intelligent in so much as it will not try and correct and markup, namely tags and attributes. Attribute values are not currently spell checked although this is on the list of things to be implemented.

### Known Problems

Lots

## Intelligent tag closing

Ever get sick of having to type all those closing tags? Well now you don't have to! Screem will automatically fill in the correct closing tag name when you enter the / character part of the close tag. This is based on the currently loaded DTD. If the tag shouldn't be closed you will receive a message on the status bar of the main application window. If the tag is already closed you will also receive a message in the status bar.

## Intelligent entity insertion

Can't remember the SGML entity name for a character you want to insert? It doesn't matter with Screem as the correct entity can be inserted when you press the character. There are some special exceptions to this, such as for &, <, and > which requires you to enter the & then press the character.

If you aren't using the ISO-8859-1 character set then you may not actually want the entity insertion. In that case you can turn the feature off, or have it enabled on a character set basis.

## Internationalisation

English not your native language? Well Screem supports GNU gettext style internationalisation, and currently has support for 13 non English languages. These are:

- Danish

- German

- Spanish

- French

- Italian

- Japanese

- Norwegian

- Polish

- Brazilian Portuguese

- Russian

- Swedish

- Turkish

- Ukrainian

Some of the internationalisation may not be up to date with the current release version.

## Automatic link updating

Don't feel like going through every file in your web site whenever you change the name or move a file? Well you don't have to! Screem will automatically update links to files which you move/rename within Screem itself. If you perform the move or rename outside of Screem then you will still have to do it all by hand.

Relative links will be kept relative, and absolute links will stay as absolute links.

## Plugin Support

In order for Screem to be more extensible plugin support has been present from day one. The plugin support allows separate features to be released and/or distributed separetly from the main Screem pacakge, and also allows you to lessen the memory usage by not loading the plugins you don't want.

Currently the only plugins available are those that come with the main package. For information on creating plugins see the development manual.

## DTD Support

Screem has support for looking at the <!DOCTYPE> tag and reading the DTD file, if present on the system, or downloading the DTD if not. Other features, such as inline tagging for example will then use the DTD to decide what to present to you.

The following features utilise DTD support

- inline tagging

- auto closing tag completion

- invalid element warning

- element properties view

### Known problems

Currently there are problems parsing some DTDs and so only simple ones, such as HTML will probably parse correctly, others such as Docbook are known to have some problems.