git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
		
			
				
	
	
		
			198 lines
		
	
	
		
			9.3 KiB
		
	
	
	
		
			TeX
		
	
	
	
	
	
			
		
		
	
	
			198 lines
		
	
	
		
			9.3 KiB
		
	
	
	
		
			TeX
		
	
	
	
	
	
| \chapter{Introduction}\label{introduction}
 | |
| \pagenumbering{arabic}%
 | |
| \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
 | |
| \setfooter{\thepage}{}{}{}{}{\thepage}%
 | |
| 
 | |
| The wxWindows Dialog Editor is a tool for creating dialog resource files, in {\tt .wxr} format.
 | |
| It differs from wxBuilder in the following respectes:
 | |
| 
 | |
| \begin{enumerate}\itemsep=0pt
 | |
| \item Scope. It is written for dialog editing only, and is therefore more convenient than wxBuilder for this purpose.
 | |
| \item File format. Dialog editor reads and writes wxWindows resource files (extension {\tt .wxr}) and has
 | |
| no independent file format.
 | |
| \item Robustness. It is written in a more principled way than wxBuilder, and is less ambitious.
 | |
| \item Ease of use. Windows are edited using the mouse or via consistent {\it property editors}, which
 | |
| provide immediate visual feedback of changed properties.
 | |
| \end{enumerate}
 | |
| 
 | |
| Dialog Editor should be compiled and used with wxWindows 1.65 or later.
 | |
| 
 | |
| \section{Current status}
 | |
| 
 | |
| Dialog Editor currently runs under MS Windows. It has yet to
 | |
| be tested under Motif and XView: see \helpref{Technical notes}{technotes} for a discussion
 | |
| of what needs to be done.
 | |
| 
 | |
| \section{Future developments}
 | |
| 
 | |
| \begin{itemize}\itemsep=0pt
 | |
| \item XView and Motif versions.
 | |
| \item It would be nice to have a dialog browser, showing thumbnails of
 | |
| all dialogs in a particular directory.
 | |
| \item Maybe add a menubar editor (from wxBuilder).
 | |
| \item Maybe convert Windows .rc files.
 | |
| \end{itemize}
 | |
| 
 | |
| \chapter{Commands}\label{commands}
 | |
| \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
 | |
| \setfooter{\thepage}{}{}{}{}{\thepage}%
 | |
| 
 | |
| \section{Dialog editor menu bar}
 | |
| 
 | |
| \subsection{File menu}
 | |
| 
 | |
| \begin{twocollist}\itemsep=0pt
 | |
| \twocolitem{New project}{Creates a new project (clears index and resets project name).}
 | |
| \twocolitem{New dialog}{Creates a new dialog resource.}
 | |
| \twocolitem{Open}{Opens an existing resource file.}
 | |
| \twocolitem{Save}{Saves the current resources.}
 | |
| \twocolitem{Save as}{Saves the current resources in a named file.}
 | |
| \twocolitem{Clear}{Clears the current resources.}
 | |
| \twocolitem{Exit}{Exit the program.}
 | |
| \end{twocollist}
 | |
| 
 | |
| \subsection{Edit menu}
 | |
| 
 | |
| \begin{twocollist}\itemsep=0pt
 | |
| \twocolitem{Recreate}{Recreates the currently selected panel item from the underlying resource. This may be necessary
 | |
| to regenerate items that cannot be changed dynamically, and which have got out of sync with the displayed
 | |
| item.}
 | |
| \twocolitem{Delete}{Deletes the currently selected resource.}
 | |
| \twocolitem{Toggle edit/test mode}{Toggles from edit to test mode, and vice versa. Edit mode is used for editing
 | |
| dialogs, test mode allows panel items to be manipulated as they will appear to the user.}
 | |
| \end{twocollist}
 | |
| 
 | |
| \subsection{Help menu}
 | |
| 
 | |
| \begin{twocollist}\itemsep=0pt
 | |
| \twocolitem{Help topics}{Displays on-line help at the contents page.}
 | |
| \twocolitem{About}{Displays an dialog showing the Dialog Editor version and author.}
 | |
| \end{twocollist}
 | |
| 
 | |
| \latexonly{\newpage}
 | |
| \section{Command toolbar}
 | |
| 
 | |
| The command toolbar consists of the following tools:
 | |
| 
 | |
| \begin{twocollist}%\itemsep=0pt
 | |
| \twocolitem{\icon{new.eps}{New}}{Clears the project.}
 | |
| \twocolitem{\icon{open.eps}{Open}}{Opens an existing resource file.}
 | |
| \twocolitem{\icon{save.eps}{Save}}{Saves the current resources.}
 | |
| \twocolitem{\icon{vert.eps}{Horizontal align}}{Aligns the centre of the selected items horizontally.}
 | |
| \twocolitem{\icon{alignt.eps}{Horizontal top-align}}{Aligns the top sides of the selected items horizontally.}
 | |
| \twocolitem{\icon{alignb.eps}{Horizontal bottom-align}}{Aligns the bottom sides of the selected items horizontally.}
 | |
| \twocolitem{\icon{horiz.eps}{Vertical align}}{Aligns the centre of the selected items vertically.}
 | |
| \twocolitem{\icon{alignl.eps}{Vertical left-align}}{Aligns the left sides of the selected items vertically.}
 | |
| \twocolitem{\icon{alignr.eps}{Vertical right-align}}{Aligns the right sides of the selected items vertically.}
 | |
| \twocolitem{\icon{copysize.eps}{Copy size}}{Copies the size of the first selected item to the subsequently selected item(s).}
 | |
| \twocolitem{\icon{tofront.eps}{To front}}{Puts the selected item(s) to the front of the display list.}
 | |
| \twocolitem{\icon{toback.eps}{To back}}{Puts the selected item(s) to the back of the display list.}
 | |
| \twocolitem{\icon{help.eps}{Help}}{Invokes Dialog Editor help.}
 | |
| \end{twocollist}
 | |
| 
 | |
| \latexonly{\newpage}
 | |
| \section{Tool palette}
 | |
| 
 | |
| The tool palette is used to select a type of panel item to create on the dialog.
 | |
| To create a new panel item, select a tool with left-click, then left-click on the dialog to 
 | |
| window. Select the pointer tool to use left-click for selecting and deselecting
 | |
| items.
 | |
| 
 | |
| The tool palette consists of the following tools.
 | |
| 
 | |
| \begin{twocollist}%\itemsep=0pt
 | |
| \twocolitem{\icon{arrow.eps}{Pointer}}{Click this to select/deselect items on a dialog.}
 | |
| \twocolitem{\icon{message.eps}{Message}}{Text message item.}
 | |
| \twocolitem{\icon{picture.eps}{Bitmap message}}{Bitmap message item.}
 | |
| \twocolitem{\icon{button.eps}{Button}}{Text button item.}
 | |
| \twocolitem{\icon{bmpbuttn.eps}{Bitmap button}}{Bitmap button item.}
 | |
| \twocolitem{\icon{check.eps}{Checkbox}}{Checkbox item.}
 | |
| \twocolitem{\icon{radio.eps}{Radiobox}}{Radiobox item.}
 | |
| \twocolitem{\icon{listbox.eps}{Listbox}}{Listbox item.}
 | |
| \twocolitem{\icon{choice.eps}{Choice}}{Choice item.}
 | |
| \twocolitem{\icon{text.eps}{Text}}{Single-line text item.}
 | |
| \twocolitem{\icon{mtext.eps}{Multitext}}{Multi-line text item.}
 | |
| \twocolitem{\icon{slider.eps}{Slider}}{Slider item.}
 | |
| \twocolitem{\icon{group.eps}{Groupbpx}}{Groupbox item.}
 | |
| \twocolitem{\icon{gauge.eps}{Gauge}}{Gauge item.}
 | |
| \twocolitem{\icon{scroll.eps}{Scrollbar}}{Scrollbar item.}
 | |
| \end{twocollist}
 | |
| 
 | |
| \section{Resource list}
 | |
| 
 | |
| The resource list shows a list of the dialogs, panel items and bitmaps currently loaded
 | |
| in Dialog Editor. Double-clicking on a dialog item shows the associated dialog box.
 | |
| 
 | |
| \chapter{Procedures}\label{procedures}
 | |
| \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
 | |
| \setfooter{\thepage}{}{}{}{}{\thepage}%
 | |
| 
 | |
| \section{Running Dialog Editor}
 | |
| 
 | |
| To run Dialog Editor under Windows, click on the Program Manager or Explorer icon.
 | |
| Under UNIX, run from the command line.
 | |
| 
 | |
| The main window shows a menu bar, command toolbar, tool palette, resource list, and
 | |
| status line.
 | |
| 
 | |
| \section{Creating a dialog}
 | |
| 
 | |
| To create a new dialog, click on the {\bf File: New} menu item, or equivalent
 | |
| toolbar button. A dialog will appear. To put a panel item on the dialog, left-click
 | |
| on the appropriate palette icon and then left-click on the dialog. A new item
 | |
| will appear at the place you clicked.
 | |
| 
 | |
| You can edit any panel item or dialog by control-left clicking. A property editor
 | |
| will appear, allowing any property to be selected and edited (see \helpref{Using property editors}{propeditors}).
 | |
| You can also edit items by right-clicking to show a menu, and then selecting {\it Edit properties}.
 | |
| 
 | |
| To move a panel item, drag the item with the left mouse button, or edit
 | |
| the position values in the property editor. To resize a panel item, you
 | |
| can either select it by left-clicking and then dragging on a selection
 | |
| handle, or edit the size values in the property editor. 
 | |
| 
 | |
| You can delete items from the right-click menu, or by selecting the item and
 | |
| choosing {\bf Edit: Delete} from the menu bar.
 | |
| 
 | |
| \section{Using property editors}\label{propeditors}
 | |
| 
 | |
| Property editors consist of a list of properties and current values, plus controls at the top of
 | |
| the editor. If the property is of an appropriate type, you can edit the value directly in the
 | |
| text field, and confirm or cancel the value using the two buttons to the left of it.
 | |
| If the property has a predefined range of values, such as labelFontFamily, you can
 | |
| see a list of permissable values by clicking on the button labelled with an ellipsis symbol ({\bf ...}).
 | |
| This will show a listbox with possible values and current selection. You may also be able
 | |
| to cycle through values by double-clicking the value in the listbox.
 | |
| 
 | |
| Properties may have special editors appropriate to the type. Filename properties invoke
 | |
| the file selector, and properties containing list of user-definable strings use a
 | |
| string editor.
 | |
| 
 | |
| When you change a property value, this value is immediately reflected in
 | |
| the dialog or panel item.  If the item allows this value to be changed
 | |
| dynamically, the relevant wxWindows function will be called internally
 | |
| to effect the change.  If the value cannot be changed dynamically, the
 | |
| item will be destroyed and re-created, which means that there will be
 | |
| more flickering associated with some kinds of property changes than
 | |
| others.
 | |
| 
 | |
| \section{Saving and loading files}
 | |
| 
 | |
| Use {\it File: Save} and {\it File: Save as} or the equivalent toolbar button
 | |
| to save the current dialog(s) in a wxWindows resource file (extension {\tt .wxr}).
 | |
| 
 | |
| The {\tt .wxr} file can be used directly in a wxWindows program, if
 | |
| wxWindows resources have been enabled when building the wxWindows library.
 | |
| These files can be loaded dynamically, or included directly into program source
 | |
| with a \verb$#include$ directive. See the wxWindows user manual for further details.
 | |
| 
 | |
| \section{Multi-platform development}
 | |
| 
 | |
| {\tt .wxr} files generated on one environment (e.g. Windows) can be used in another (e.g. Motif).
 | |
| However, because the same panel item can have different sizes on different GUIs,
 | |
| the user should be cautious in assuming that one resource file will work for all
 | |
| platforms. It may be better to plan to conditionally include or load different
 | |
| resource files for different platforms, with spacing modified to suit each
 | |
| environment.
 | |
| 
 |