\hy-9{0}{
}







\hy-5{2}{User Manual for wxBuilder 1.0 beta}

\hy-6{3}{Julian Smart
Decision Support Group
Artificial Intelligence Applications Institute
80 South Bridge
University of Edinburgh
EH1 1HN}

February 1994







\hy-5{1}{

Contents

}
\hy-6{4}{Introduction}

\hy-6{16}{Creating a project with wxBuilder}

\hy-6{37}{Procedures}

\hy-6{278}{Code generation details}

\hy-6{285}{Resources}

\hy-6{311}{Error and warning messages}



\hy-10{5}{Introduction}


wxBuilder is a tool for interactively building the GUI (Graphical User
Interface) component of a wxWindows application. The user chooses and
places frames, dialog boxes, subwindows and panel items, and wxBuilder
generates appropriate C++ code for compiling with the wxWindows library
on Windows or X.

The user may then populate this skeleton program with further code to
complete the application, or use the results as a design and prototyping
aid. wxBuilder could also find use as a learning aid for a beginning
wxWindows user, since there is a clear correspondence between GUI and
C++ code.

wxBuilder may also be used as a migration tool from straight Windows to
wxWindows, by importing existing Windows resource (.RC) files.

wxBuilder is not unique in the kind of facilities it provides, but it is
the only known freely available tool to generate multi-platform code,
and is the only one to support wxWindows.

\hy-8{6}{Status of wxBuilder}


\hy-10{17}{Creating a project with wxBuilder}


This chapter guides the user through the main processes involved
in creating a new application.

\hy-8{18}{Running wxBuilder}

\hy-8{25}{Setting up for a new project}

\hy-8{32}{Creating a main window}


\hy-10{38}{Procedures}


\hy-8{39}{Changing project and global settings}

\hy-8{41}{Using the object editor}

\hy-8{46}{Generating C++}

\hy-8{52}{Viewing the window hierarchy}

\hy-8{54}{Creating a frame}

\hy-8{79}{Creating a dialog box}

\hy-8{89}{Creating a menu bar}

\hy-8{117}{Creating a tool bar}

\hy-8{139}{Creating a panel subwindow}

\hy-8{152}{Creating a canvas subwindow}

\hy-8{170}{Creating a text subwindow}

\hy-8{182}{Creating a button item}

\hy-8{188}{Creating a checkbox item}

\hy-8{195}{Creating a listbox item}

\hy-8{206}{Creating a choice item}

\hy-8{217}{Creating a radiobox item}

\hy-8{229}{Creating a message item}

\hy-8{235}{Creating a text item}

\hy-8{243}{Creating a multi-line text item}

\hy-8{251}{Editing a window object's properties}

\hy-8{258}{Deleting a window object}

\hy-8{262}{Associating actions with events}

\hy-8{271}{Converting Windows resource files}


\hy-10{279}{Code generation details}


Some or all of the following files may be generated:


\hy-8{280}{o}  a header file (.H)
\hy-8{281}{o}  a main source file (.CC)
\hy-8{282}{o}  UNIX and DOS makefiles
\hy-8{283}{o}  a module definition file (.DEF)
\hy-8{284}{o}  a Windows resource file (.RC)


For every frame, dialog box and subwindow, a class is generated, to
allow customization for each window instance except for panel items.

Frames, dialog boxes and subwindows are generated with data members
for their contained windows. Pointers to all frame objects are held
in the wxApp-derived class.

The description property is used to document class declarations
and definitions.

If the user has specified actions for menu commands, buttons or tool bar
tools, the appropriate wxFrame::OnMenuCommand members functions,
wxToolBar::OnLeftClick member functions, or button callbacks are
generated with working code, otherwise empty stubs (or case statements)
are generated for the user to fill in.

Platform-specific resource loading is dealt with using conditional
compilation statements.


\hy-10{286}{Resources}


The following is a list of the WIN.INI or .Xdefaults resources
associated with wxBuilder. Under Windows, the resources follow the \hy-14{287}{
[wxBuilder]} section in WIN.INI. Under X, each resource name
should be prefixed by \hy-14{288}{wxBuilder.} in the .Xdefaults file.


\hy-8{289}{autoCompile}  1 or 0.
\hy-8{290}{autoRun}  1 or 0.
\hy-8{291}{compilerDOS}  The name of the compiler in the DOS/Windows environment.
\hy-8{292}{compilerUNIX}  The name of the compiler in the UNIX environment.
\hy-8{293}{xIncludes}  List of X include directories.
\hy-8{294}{xLib}   List of X include directories.
\hy-8{295}{wxDirUNIX}  wxWindows directory under UNIX.
\hy-8{296}{wxDirDOS}  wxWindows directory under DOS.
\hy-8{297}{mainX}  Main wxBuilder window X coordinate.
\hy-8{298}{mainY}  Main wxBuilder window Y coordinate.
\hy-8{299}{mainWidth}  Main wxBuilder window width.
\hy-8{300}{mainHeight}  Main wxBuilder window height.
\hy-8{301}{reportX}  Report window X coordinate.
\hy-8{302}{reportY}  Report window Y coordinate.
\hy-8{303}{reportWidth}  Report window width.
\hy-8{304}{reportHeight}  Report window height.
\hy-8{305}{treeX}  Tree window X coordinate.
\hy-8{306}{treeY}  Tree window Y coordinate.
\hy-8{307}{treeWidth}  Tree window width.
\hy-8{308}{treeHeight}  Tree window height.
\hy-8{309}{paletteX}  Palette X coordinate.
\hy-8{310}{paletteY}  Palette Y coordinate.



\hy-10{312}{Error and warning messages}







\hy-10{7}{Status of wxBuilder}

wxBuilder is in its first beta, although I hope that it is quite stable
already. It compiles and runs under Windows only at present, and the X
platform should follow shortly.

Various facilities are planned for a later release, including:


\hy-8{8}{o}  one source file per window option
\hy-8{9}{o}  MDI support
\hy-8{10}{o}  command line parser generation
\hy-8{11}{o}  help file generation
\hy-8{12}{o}  wxCLIPS generation
\hy-8{13}{o}  repertoire of GDI object, such fonts, pens, brushes.
\hy-8{14}{o}  Output of RC files
\hy-8{15}{o}  Support for wxForm



\hy-10{19}{Running wxBuilder}

Run \hy-14{20}{wxbuild.exe} (Windows) or \hy-14{21}{wxbuild} (UNIX) with an optional
project filename. Project files contain all information relevant to an
application except bitmap files and icons; their extension is \hy-14{22}{.WXP}
(for wxWindows Project).

Below is a screen shot of the main wxBuilder window, with a project
already loaded. A menu bar is supplemented by a tool bar to accelerate
certain commands. The \hy-7{23}{object editor} canvas displays a
representation of the actual windows (also displayed, but not in the
figure). This representation is used for creating, deleting, positiong,
sizing and editing windows interactively, and the actual windows will
immediately reflect these operations.

Below the object editor canvas is a listbox containing a list of all
top-level windows (all the frames and dialog boxes). Clicking on a
window in this listbox creates the window and updates the object editor
to show a representation of this window.


10cm;0cmscreen1.ps
Figure 2.1: Main wxBuilder window


The status line is divided into two fields: the left field displays help
messages, and the right field shows the current `mode', either edit or
test mode. In test mode, certain events from project windows (such as
pressing buttons or selecting menu items) will do the user-defined action,
whereas in edit mode, the same events will pop up a dialog to allow editing
of that action.

An \hy-7{24}{object palette} is displayed in a sepearate frame. This allows
selection of a window object (such as a canvas or button) -- the cursor in the object
editor window changes to a cross, and left-clicking in the object editor creates an
object of that kind.


10cm;0cmpalette.ps
Figure 2.2: Object palette



\hy-10{26}{Setting up for a new project}

It's wise to set things up properly before starting to create windows.
The \hy-8{27}{Generate} menu has two items you should look at: \hy-8{28}{Edit project
settings} and \hy-8{29}{Edit global settings}.

Project settings are saved with the project file and are changed on a
per-project basis. These include project name (used as a base for
generating files), and project directory name.

Global settings are variables that are likely to change on a per-user
basis, and are stored in WIN.INI (under Windows) or .Xdefaults (under X).
Under X, the .Xdefaults file should be edited by hand, since it may not
be changed by applications.

In addition, set the name of the application class (to be used as a derivative
of wxApp) and a brief description of the project, using the \hy-8{30}{Edit application
properties} item on the \hy-8{31}{File} menu.


\hy-10{33}{Creating a main window}

Every wxWindows must have a frame which is the main window (in C++, returned from
the \hy-8{34}{wxApp::OnInit} function).

The first frame you create is taken to be this main window. Choose \hy-8{35}{Edit:
New frame} or click on the frame tool on the palette, and then on the object editor.

You can size and position this frame using the representation on the object
editor (try to resist the temptation to edit the real windows directly!).
See \hy-13{36}{Using the object editor} for further details.


\hy-10{40}{Changing project and global settings}

Project settings are saved with the project file and are changed on a
per-project basis. These include project name (used as a base for
generating files), and project directory name.

Global settings are variables that are likely to change on a per-user
basis, and are stored in WIN.INI (under Windows) or .Xdefaults (under X).
Under X, the .Xdefaults file should be edited by hand, since it may not
be changed by applications.


\hy-10{42}{Using the object editor}

The object editor is the scrollable canvas in the main wxBuilder window.
When a window is being edited, it is represented in the object editor
as rectangles, each with the name of the object.

To edit a window, you may create a new frame or dialog box, or click
on a window name in the listbox on the main wxBuilder window, or
click on a window name in the object hierarchy display (see \hy-13{43}{Window
hierarchy}).

Most windows may be repositioned by dragging with the left mouse button,
selected and deselected with shift-left click, and resized by dragging
on the handles visible when the object is selected.

Each type of window has a property editor associated with it, allowing
tailoring of specific window characteristics. To invoke a property
editor, either right-click on the object, or select the object and
choose \hy-8{44}{Edit properties for selection} from the \hy-8{45}{Edit menu}.

To align panel items, select two or more items, and use an alignment
tool on the tool bar. The first item selected is taken as the
reference for aligning the other items.


\hy-10{47}{Generating C++}

Click on the \hy-8{48}{C++} tool on the tool bar, or choose \hy-8{49}{Generate C++}
from the \hy-8{50}{Generate} menu. A report window will be displayed with
error and warning messages, and if successful, source files will be
written in the current project directory.

See also \hy-13{51}{Error and warning messages}.


\hy-10{53}{Viewing the window hierarchy}

Click on the tree tool on the tool bar to view the structure of
your interface. Left-clicking on a dialog box or frame will
associate the window with the object editor. Right-clicking
on any window in the hierarchy will invoke the appropriate
property editor.


\hy-10{55}{Creating a frame}

Left-click on the frame icon on the object palette, and left-click
again on the object editor canvas, or choose \hy-8{56}{New frame} from
the \hy-8{57}{Edit} menu. The frame properties editor will be shown,
with the following controls.


\hy-8{58}{Name}  The name of this frame instance.
\hy-8{59}{Description}  A textual description of the frame.
\hy-8{60}{Class name}  The name of the C++ class that will be created for
this frame. At present, each frame must have a unique class.
\hy-8{61}{Icon name}  The name of the icon file to be used for this frame.
\hy-8{62}{Title}  The default title for the frame.
\hy-8{63}{No. status line fields}  The number of divisions for the status line.
Zero indicates no status line.
\hy-8{64}{Vertical subwindow tiling}  If checked on, the \hy-13{65}{subwindow tiling}
is vertical. Otherwise it is horizontal.
\hy-8{66}{Thick frame}  If checked on, the frame has a thick border for resizing
(Windows only).
\hy-8{67}{Caption}  If checked on, the frame has a caption (Windows only).
\hy-8{68}{System menu}  If checked on, the frame has a system menu (Windows only).
\hy-8{69}{Minimize button}  If checked on, the frame has a minimize button (Windows only).
\hy-8{70}{Maximize button}  If checked on, the frame has a maximize button (Windows only).
\hy-8{71}{Shuffle subwindows}  If pressed, the subwindow positioning order is rearranged.


\hy-8{72}{Subwindow tiling}


\hy-10{80}{Creating a dialog box}

Left-click on the dialog box icon on the object palette, and left-click
again on the object editor canvas, or choose \hy-8{81}{New dialog} from
the \hy-8{82}{Edit} menu. The dialog box properties editor will be shown,
with the following controls.


\hy-8{83}{Name}  The name of this dialog box instance.
\hy-8{84}{Description}  A textual description of the dialog box.
\hy-8{85}{Class name}  The name of the C++ class that will be created for
this dialog box.
\hy-8{86}{Title}  The default title for the dialog box.
\hy-8{87}{Width}  The width of the dialog box.
\hy-8{88}{Height}  The width of the dialog box.



\hy-10{90}{Creating a menu bar}

To create a menu bar for a frame displayed in the object editor, select
the \hy-8{91}{Edit menu bar} option on the \hy-8{92}{Edit} menu. 

The Menu Bar Editor will appear with a large listbox for menu and item
names, fields for editing text, and buttons below it for creating
and deleting items.


\hy-8{93}{Menus}  List of menus and menu items.
\hy-8{94}{Name}  Contains the name of a new or currently
selected menu item.
\hy-8{95}{Id}  Allows the user to specify the name of the
menu item identifier, as used in a \hy-8{96}{wxMenu::Append} call.
These names will be associated with integers automatically
by wxBuilder. If the user leaves this field blank, wxBuilder
will generate a suitable identifier.
\hy-8{97}{Help string}  Allows the user to specify a
help string which will appear on the status line when
the mouse cursor is over that menu item (Motif and Windows only).
\hy-8{98}{New item}  Creates an item at the same level as the
currently selected menu item. So, if the currently
selected item is a menu called \hy-7{99}{Edit}, pressing this
button will create a new menu, not an item on the \hy-7{100}{Edit}
menu. Note that you must fill in the fields \hy-7{101}{before} you
press the button.
\hy-8{102}{New child}  Creates a \hy-7{103}{child} of the currently selected menu
item, i.e. it creates a new submenu. So to create the first item
of the \hy-7{104}{Edit} menu, select the \hy-7{105}{Edit} item and press
this button.  Note that you must fill in the fields \hy-7{106}{before} you
press the button.
\hy-8{107}{New separator}  Creates a separator after the selected menu item.
\hy-8{108}{Delete item}  Deletes the currently selected menu item.
\hy-8{109}{Save item}  Saves the displayed values in the currently selected
menu item.


\hy-8{110}{Hotkeys}

\hy-8{113}{Deleting a menu bar}


\hy-10{118}{Creating a tool bar}

To create a tool bar for a frame displayed in the object editor, select
the \hy-8{119}{Edit tool bar} option on the \hy-8{120}{Edit} menu. 

The tool bar properties editor will appear with the following controls.


\hy-8{121}{Name}  The name of this tool bar instance.
\hy-8{122}{Description}  A textual description of the tool bar.
\hy-8{123}{Class name}  The name of the C++ class that will be created for
this tool barl.
\hy-8{124}{Rows/cols}  The maximum number of columns for this toolbar
(set to a high number since only one row is allowed).
\hy-8{125}{Tools}  A list of the current tools in the tool bar.
\hy-8{126}{Id}  Contains the name of the identifier for a new or currently
selected tool. wxBuilder allocates actual integer identifiers
for these names automatically.
\hy-8{127}{Help string}  Allows the user to specify a
help string which will appear on the status line when
the mouse cursor is over that menu item (Motif and Windows only).
\hy-8{128}{Bitmap}  The name of the bitmap file for the tool. A full
path is not necessary; the project path will be prepended.
\hy-8{129}{Toggle}  If checked on, this tool will be a toggle tool.
\hy-8{130}{Add}  Press to add a tool to the tool bar. Note that you
must fill in the fields \hy-7{131}{before} you press the button.
\hy-8{132}{Save}  Saves the displayed values in the currently selected
toggle.
\hy-8{133}{Delete}  Deletes the currently selected tool.
\hy-8{134}{Demote}  Moves the selected tool to the end of the tool bar.


\hy-8{135}{Deleting a tool bar}


\hy-10{140}{Creating a panel subwindow}

Left-click on the panel icon on the object palette, and left-click again
on the object editor, inside a frame object. The panel properties editor
will be shown, with the following controls.


\hy-8{141}{Name}  The name of this panel instance.
\hy-8{142}{Description}  A textual description of the panel.
\hy-8{143}{Class name}  The name of the C++ class that will be created for
this panel.
\hy-8{144}{Border}  If checked on, the panel will have a border.
\hy-8{145}{Resize strategy}  One of Fixed, Proportional and Grow.
See \hy-13{146}{subwindow tiling}.
\hy-8{147}{Width}  The width of the panel.
\hy-8{148}{Height}  The width of the panel.
\hy-8{149}{% frame}  If Resize strategy is Proportional, this value specifies
the proportion of the frame for determining the subwindow size.
\hy-8{150}{Fit contents}  If checked on, the panel will fit itself to its
contents.
\hy-8{151}{Horizontal labels}  If checked on, the default labelling orientation
is horizontal, otherwise it is vertical.



\hy-10{153}{Creating a canvas subwindow}

Left-click on the canvas icon on the object palette, and left-click
again on the object editor, inside a frame object. The canvas properties
editor will be shown, with the following controls.


\hy-8{154}{Name}  The name of this canvas instance.
\hy-8{155}{Description}  A textual description of the canvas.
\hy-8{156}{Class name}  The name of the C++ class that will be created for
this canvas.
\hy-8{157}{Border}  If checked on, the canvas will have a border.
\hy-8{158}{Resize strategy}  One of Fixed, Proportional and Grow.
See \hy-13{159}{subwindow tiling}.
\hy-8{160}{Width}  The width of the canvas.
\hy-8{161}{Height}  The width of the canvas.
\hy-8{162}{% frame}  If Resize strategy is Proportional, this value specifies
the proportion of the frame for determining the subwindow size.
\hy-8{163}{Retained canvas}  If checked on, the canvas will be retained under X.
\hy-8{164}{Pixels/unit X}  The number of pixels per logical X unit. If zero,
no horizontal scrollbar will be shown.
\hy-8{165}{Pixels/unit Y}  The number of pixels per logical Y unit. If zero,
no vertical scrollbar will be shown.
\hy-8{166}{No units X}  The number of logical units in the X dimension.
\hy-8{167}{No units Y}  The number of logical units in the Y dimension.
\hy-8{168}{Units/page X}  The number of logical units per horizontal page.
\hy-8{169}{Units/page Y}  The number of logical units per vertical page.



\hy-10{171}{Creating a text subwindow}

Left-click on the text subwindow icon on the object palette, and left-click
again on the object editor, inside a frame object. The text subwindow properties
editor will be shown, with the following controls.


\hy-8{172}{Name}  The name of this text subwindow instance.
\hy-8{173}{Description}  A textual description of the text subwindow.
\hy-8{174}{Class name}  The name of the C++ class that will be created for
this text subwindow.
\hy-8{175}{Border}  If checked on, the text subwindow will have a border.
\hy-8{176}{Resize strategy}  One of Fixed, Proportional and Grow.
See \hy-13{177}{subwindow tiling}.
\hy-8{178}{Width}  The width of the subwindow.
\hy-8{179}{Height}  The width of the subwindow.
\hy-8{180}{% frame}  If Resize strategy is Proportional, this value specifies
the proportion of the frame for determining the subwindow size.
\hy-8{181}{Text file}  The name of a text file to be loaded onto the canvas on creation.



\hy-10{183}{Creating a button item}

Left-click on the button icon on the object palette, and left-click
again on the object editor inside a panel or dialog box object. The
button properties editor will be shown, with the following
controls.


\hy-8{184}{Name}  The name of this button.
\hy-8{185}{Description}  A textual description of the button.
\hy-8{186}{Label}  Label for the button.
\hy-8{187}{Auto size}  If checked on, the button will size itself according the
the text label. If off, the size will be determined by the interactively sizing
the button from the object editor.



\hy-10{189}{Creating a checkbox item}

Left-click on the checkbox icon on the object palette, and left-click
again on the object editor inside a panel or dialog box object. The
checkbox properties editor will be shown, with the following
controls.


\hy-8{190}{Name}  The name of this checkbox.
\hy-8{191}{Description}  A textual description of the checkbox.
\hy-8{192}{Label}  Label for the checkbox.
\hy-8{193}{Auto size}  If checked on, the checkbox will size itself according the
the text label. If off, the size will be determined by the interactively sizing
the checkbox from the object editor.
\hy-8{194}{Label position}  Horizontal, vertical or panel default placement. Under Windows
the checkbox label is always horizontal.



\hy-10{196}{Creating a listbox item}

Left-click on the listbox icon on the object palette, and left-click
again on the object editor inside a panel or dialog box object. The
listbox properties editor will be shown, with the following
controls.


\hy-8{197}{Name}  The name of this listbox.
\hy-8{198}{Description}  A textual description of the listbox.
\hy-8{199}{Label}  Label for the listbox.
\hy-8{200}{Auto size}  If checked on, the listbox will size according to
wxWindows defaults. If off, the size will be determined by interactively sizing
the listbox from the object editor.
\hy-8{201}{Label position}  Horizontal, vertical or default panel placement.
\hy-8{202}{Values}  A list of default string values.
\hy-8{203}{Value}  Text field for entering a listbox value.
\hy-8{204}{Add}  Add the text in the current field to the list of default values.
\hy-8{205}{Delete}  Delete the currently selected item.



\hy-10{207}{Creating a choice item}

Left-click on the choice item icon on the object palette, and left-click
again on the object editor inside a panel or dialog box object. The
choice item properties editor will be shown, with the following
controls.


\hy-8{208}{Name}  The name of this choice item.
\hy-8{209}{Description}  A textual description of the choice item.
\hy-8{210}{Label}  Label for the choice item.
\hy-8{211}{Auto size}  If checked on, the choice item will size according to
wxWindows defaults. If off, the size will be determined by interactively sizing
the choice item from the object editor.
\hy-8{212}{Label position}  Horizontal, vertical or default panel placement.
\hy-8{213}{Values}  A list of default string values.
\hy-8{214}{Value}  Text field for entering a choice item value.
\hy-8{215}{Add}  Add the text in the current field to the list of default values.
\hy-8{216}{Delete}  Delete the currently selected item.



\hy-10{218}{Creating a radiobox item}

Left-click on the radiobox icon on the object palette, and left-click
again on the object editor inside a panel or dialog box object. The
radiobox properties editor will be shown, with the following
controls.


\hy-8{219}{Name}  The name of this radiobox.
\hy-8{220}{Description}  A textual description of the radiobox.
\hy-8{221}{Label}  Label for the radiobox.
\hy-8{222}{Auto size}  If checked on, the radiobox will size according to
wxWindows defaults. If off, the size will be determined by interactively sizing
the radiobox from the object editor.
\hy-8{223}{Label position}  Horizontal, vertical or default panel placement.
\hy-8{224}{Rows/cols}  Number of rows or columns (depending on label orientation
value).
\hy-8{225}{Values}  A list of default string values.
\hy-8{226}{Value}  Text field for entering a radiobox value.
\hy-8{227}{Add}  Add the text in the current field to the list of default values.
\hy-8{228}{Delete}  Delete the currently selected item.



\hy-10{230}{Creating a message item}

Left-click on the message item icon on the object palette, and left-click
again on the object editor inside a panel or dialog box object. The
message item properties editor will be shown, with the following
controls.


\hy-8{231}{Name}  The name of this message item.
\hy-8{232}{Description}  A textual description of the message item.
\hy-8{233}{Label}  Label for the message item.
\hy-8{234}{Auto size}  If checked on, the message item will size according to
wxWindows defaults. If off, the size will be determined by interactively sizing
the message item from the object editor.



\hy-10{236}{Creating a text item}

Left-click on the text item icon on the object palette, and left-click
again on the object editor inside a panel or dialog box object. The
text item properties editor will be shown, with the following
controls.


\hy-8{237}{Name}  The name of this text item.
\hy-8{238}{Description}  A textual description of the text item.
\hy-8{239}{Label}  Label for the text item.
\hy-8{240}{Auto size}  If checked on, the text item will size according to
wxWindows defaults. If off, the size will be determined by the interactively sizing
the text item from the object editor.
\hy-8{241}{Label position}  Horizontal, vertical or default panel placement.
\hy-8{242}{Value}  Text field for the default text value.



\hy-10{244}{Creating a multi-line text item}

Left-click on the multitext item icon on the object palette, and left-click
again on the object editor inside a panel or dialog box object. The
multitext item properties editor will be shown, with the following
controls.


\hy-8{245}{Name}  The name of this multitext item.
\hy-8{246}{Description}  A textual description of the multitext item.
\hy-8{247}{Label}  Label for the multitext item.
\hy-8{248}{Auto size}  If checked on, the multitext item will size according to
wxWindows defaults. If off, the size will be determined by the interactively sizing
the multitext item from the object editor.
\hy-8{249}{Label position}  Horizontal, vertical or default panel placement.
\hy-8{250}{Value}  Text field for the default text value.



\hy-10{252}{Editing a window object's properties}

An object's properties may be edited by one of three methods.


\hy-8{253}{1.}  Select the object with shift left click on the object editor, and
choose \hy-8{254}{Delete object} from the \hy-8{255}{Edit} menu.
\hy-8{256}{2.}  Right-click on the object in the object editor.
\hy-8{257}{3.}  Left-click on the object name in the object hierarchy window.



\hy-10{259}{Deleting a window object}

An object may be deleted by selecting it with shift left click on the
object editor, and choosing \hy-8{260}{Delete object} from the \hy-8{261}{Edit} menu.


\hy-10{263}{Associating actions with events}

In order to give the interface some dynamics, a small repertoire
of actions is available for association with some events. For example, a menu
command called \hy-8{264}{Open report window} might be associated with
with the \hy-8{265}{Open window} action, to open another frame in the interface.

To create an action, execute the event you wish to associate with an
action. These events are currently:


\hy-8{266}{o}  Menu commands
\hy-8{267}{o}  Button depression
\hy-8{268}{o}  Tool depression


You will be presented with a list of possible actions. Once you have
chosen an action, the appropriate action editor is invoked.

The next time you invoke the event in Edit mode, the action editor will
be presented. You may delete the action using the \hy-8{269}{Delete} button.
In Test mode, the event will cause the appropriate action to be executed.

Currently, only one action per event is allowed. A later release of
wxBuilder may allow multiple events, so (for example) an event could
cause a window to be opened \hy-7{270}{and} a file to be loaded.

Note that some actions are mandatory for a working C++ program to be
generated. For example, a modal dialog box with no action dismissing it
will cause the window to be uncloseable, which might require the user to
quit the windowing system to recover.


\hy-10{272}{Converting Windows resource files}

Menu bars and dialog boxes can be converted from Windows resource
files, using Petr Smilauer's resource parser. Menu bars convert
well, but due to the differences between wxWindows panel items
and Windows controls, dialog boxes convert less well.

Use the \hy-8{273}{Load Windows resources} option from the \hy-8{274}{Edit}
menu. This opens a dialog box from which .RC files may be loaded,
or added to the existing database of resources. Once the resource
file has been loaded, quit from this dialog and use the
\hy-8{275}{Convert menu bar} or \hy-8{276}{Convert dialog} option from
the \hy-8{277}{Edit} menu.


\hy-10{73}{Subwindow tiling}

The way in which subwindows are positioned and sized in wxWindows is very different
from the method for panel items, dialog boxes and frames. This is because
subwindows are often sized relative to their parent frame.

If there is only one subwindow, the default wxWindows method is used, which is
simply to resize the subwindow to the frame client area when the frame is created
or resized.

If there is more than one subwindow, wxBuilder uses an algorithm to
layout the windows. It is hoped that this algorithm will cater for most
subwindow layout needs. These are the options and constraints:


\hy-8{74}{1.}  Zero or more subwindows may be children of a frame.
\hy-8{75}{2.}  All subwindows must be tiled either vertically or horizontally.
Mixture of the two tiling modes is not allowed (horizontal tool bars work
independently and may be discounted from this constraint).
\hy-8{76}{3.}  Each subwindow has a \hy-7{77}{resize strategy}, one of
Fixed, Proportional and Grow.
\hy-8{78}{4.}  The mix of resize strategies must be such as to allow
wxBuilder to determine all subwindow sizes.


If the resize strategy is Fixed, the specified width (if in horizontal
tiling mode) or height (if in vertical mode) is used. The other
dimension is determined by the size of the frame (and possibly the
presence of a tool bar).

If the resize strategy is Proportional, the free dimension of the
subwindow is determined from that dimension of the frame, together
with the percentage specified in the subwindow property editor.

If the resize strategy is Grow, the free dimension of the
subwindow is determined by adjacent subwindows. In practice
only one subwindow may use this strategy.


\hy-10{111}{Hotkeys}

To specify a hotkey, insert an ampersand (&) before the letter
which serves as the hotkey (Windows and Motif). For example,
\hy-8{112}{E&xit}.


\hy-10{114}{Deleting a menu bar}

To remove the entire menu bar, delete the object in the usual
way from the object editor (select the menu bar object and choose
the \hy-8{115}{Delete object} option from the \hy-8{116}{Edit} menu).

Alternatively, delete all the menus from the menu bar editor.


\hy-10{136}{Deleting a tool bar}

To remove the entire tool bar, delete the object in the usual
way from the object editor (select the tool bar object and choose
the \hy-8{137}{Delete object} option from the \hy-8{138}{Edit} menu).


\hyindex{
"wxBuilder Manual"
4 5
6 7
16 17
18 19
25 26
32 33
37 38
39 40
41 42
46 47
52 53
54 55
72 73
79 80
89 90
110 111
113 114
117 118
135 136
139 140
152 153
170 171
182 183
188 189
195 196
206 207
217 218
229 230
235 236
243 244
251 252
258 259
262 263
271 272
278 279
285 286
311 312
36 42
36 42
43 53
43 53
51 312
51 312
65 73
65 73
146 73
146 73
159 73
159 73
177 73
177 73
36 42
36 42
43 53
43 53
51 312
51 312
65 73
65 73
146 73
146 73
159 73
159 73
177 73
177 73
}
