\hy-9{0}{
}







\hy-5{2}{User Manual for wxBuilder 1.5}

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

October 1994







\hy-5{1}{Contents}

\hy-6{4}{Introduction}

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

\hy-6{59}{Procedures}

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

\hy-6{341}{Resources}


\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 (Windows version
only).

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-8{16}{Change log}


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

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

\hy-8{39}{Running wxBuilder}

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

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


\hy-10{60}{Procedures}

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

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

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

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

\hy-8{83}{Managing GDI objects}

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

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

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

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

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

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

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

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

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

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

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

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

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

\hy-8{283}{Creating a slider item}

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

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

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

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

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

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


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

Some or all of the following files may be generated:


\hy-8{336}{o}  a header file (.H)
\hy-8{337}{o}  a main source file (.CC)
\hy-8{338}{o}  UNIX and DOS makefiles
\hy-8{339}{o}  a module definition file (.DEF)
\hy-8{340}{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{342}{Resources}

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


\hy-8{345}{Resource}
    \hy-8{346}{Description}

autoCompile
    1 or 0.

autoRun
    1 or 0 (not implemented).

compilerDOS
    The name of the compiler in the DOS/Windows environment.

compilerUNIX
    The name of the compiler in the UNIX environment.

xIncludes
    List of X include directories.

xLib
    List of X include directories.

extraIncludesX
    List of extra include directories (under UNIX).

extraLibsX
    List of extra library directories (under UNIX).

extraIncludesMSW
    List of extra include directories (under Windows).

extraLibsMSW
    List of extra library directories (under Windows).

wxDirUNIX
    wxWindows directory under UNIX.

wxDirDOS
    wxWindows directory under DOS.

mainX
    Main wxBuilder window X coordinate.

mainY
    Main wxBuilder window Y coordinate.

mainWidth
    Main wxBuilder window width.

mainHeight
    Main wxBuilder window height.

reportX
    Report window X coordinate.

reportY
    Report window Y coordinate.

reportWidth
    Report window width.

reportHeight
    Report window height.

treeX
    Tree window X coordinate.

treeY
    Tree window Y coordinate.

treeWidth
    Tree window width.

treeHeight
    Tree window height.

paletteX
    Palette X coordinate.

paletteY
    Palette Y coordinate.







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



wxBuilder now compiles under Windows and Motif. An XView release is
available but there are problems related to multiple modal dialogs that
will be fixed shortly.

Under Motif, there is a problem with the `simulated' windows not always
being drawn correctly; this is a tricky Motif-related problem. The
current work-around is to move the simulated frame or dialog box, and
the display will be refreshed correctly.

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}  extend repertoire of GDI objects, such pens, brushes and colours.
\hy-8{14}{o}  Output of RC files
\hy-8{15}{o}  Support for wxForm



\hy-10{17}{Change log}



Version 1.6 October 1994


\hy-8{18}{o}  Add support for wxSlider
\hy-8{19}{o}  Changed `int' window styles to `long'
\hy-8{20}{o}  Added support for bitmap buttons.


Version 1.5 October 1994


\hy-8{21}{o}  Cured bug in conversion of Windows menu resource to wxWindows menu
(menu items lost their parents).
\hy-8{22}{o}  First release of Motif version, with more stable Motif wxWindows implementation.
\hy-8{23}{o}  Added ability to load bitmaps into canvases, for more detailed `simulation' of
interfaces.
\hy-8{24}{o}  Added provision for extra (user-defined) library and include paths.
\hy-8{25}{o}  Improved UNIX and DOS makefile generation.
\hy-8{26}{o}  Solved several bugs (e.g. right-click editing of a window caused a crash).


Version 1.3 June 1994


\hy-8{27}{o}  File history now has names added to front of list
\hy-8{28}{o}  Added Cancel button to on-exit dialog box
\hy-8{29}{o}  Fixed delete bug wxRadioBox/wxListBox/wxChoice properties
dialogs
\hy-8{30}{o}  Fixed bug which disabled loading on the first attempt
\hy-8{31}{o}  Fixed code generation bugs for X/Windows icons
\hy-8{32}{o}  Fixed OnSize code generation bug (statements in wrong order)
\hy-8{33}{o}  Fixed UNIX makefile generation bugs
\hy-8{34}{o}  Windows version no longer uses CTL3D since it seems to
crash wxWindows programs on some PCs. Now uses CTL3DV2 instead.


Version 1.2 May 1994


\hy-8{35}{o}  Added file history
\hy-8{36}{o}  Some code generation bugs fixed



\hy-10{40}{Running wxBuilder}



Run \hy-14{41}{wxbuild.exe} (Windows) or \hy-14{42}{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{43}{.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{44}{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{45}{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{47}{Setting up for a new project}



It's wise to set things up properly before starting to create windows.
The \hy-8{48}{Project} menu has two items you should look at: \hy-8{49}{Edit project
settings} and \hy-8{50}{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 the X
versions of wxBuilder do not currently save global settings. See
\hy-13{51}{Resources}.

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{52}{Edit application
properties} item on the \hy-8{53}{File} menu.


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



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

The first frame you create is taken to be this main window. Choose \hy-8{57}{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{58}{Using the object editor} for further details.


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



\hy-8{63}{Project settings}

\hy-8{65}{Global settings}


\hy-10{72}{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{73}{Window
hierarchy}).

Most windows may be repositioned by dragging with the left mouse button,
selected and deselected with 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{74}{Edit properties for selection} from the \hy-8{75}{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{77}{Generating C++}



Click on the \hy-8{78}{C++} tool on the tool bar, or choose \hy-8{79}{Generate C++}
from the \hy-8{80}{Project} 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.


\hy-10{82}{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{84}{Managing GDI objects}



wxBuilder allows the user to define a set of GDI (Graphics Device
Interface) objects to be used in a program. Currently only fonts are
supported, but in future this will be extended to colours, pens,
brushes, bitmaps, icons and cursors.

To define a set of fonts for the project, invoke the Font Manager
from the \hy-8{85}{GDI} menu.


\hy-8{86}{Quit}  Quit from the Font Manager.
\hy-8{87}{Help}  Invoke help for the Font Manager.
\hy-8{88}{Add}  Add a font.
\hy-8{89}{Delete}  Delete the selected font.



\hy-10{91}{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{92}{New frame} from
the \hy-8{93}{Edit} menu. The frame properties editor will be shown,
with the following controls.


\hy-8{94}{Name}  The name of this frame instance.
\hy-8{95}{Description}  A textual description of the frame.
\hy-8{96}{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{97}{Icon name}  The name of the icon file to be used for this frame.
\hy-8{98}{Title}  The default title for the frame.
\hy-8{99}{No. status line fields}  The number of divisions for the status line.
Zero indicates no status line.
\hy-8{100}{Vertical subwindow tiling}  If checked on, the \hy-13{101}{subwindow tiling}
is vertical. Otherwise it is horizontal.
\hy-8{102}{Thick frame}  If checked on, the frame has a thick border for resizing
(Windows only).
\hy-8{103}{Caption}  If checked on, the frame has a caption (Windows only).
\hy-8{104}{System menu}  If checked on, the frame has a system menu (Windows only).
\hy-8{105}{Minimize button}  If checked on, the frame has a minimize button (Windows only).
\hy-8{106}{Maximize button}  If checked on, the frame has a maximize button (Windows only).
\hy-8{107}{Shuffle subwindows}  If pressed, the subwindow positioning order is rearranged.


\hy-8{108}{Subwindow tiling}


\hy-10{116}{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{117}{New dialog} from
the \hy-8{118}{Edit} menu. The dialog box properties editor will be shown,
with the following controls.


\hy-8{119}{Name}  The name of this dialog box instance.
\hy-8{120}{Description}  A textual description of the dialog box.
\hy-8{121}{Class name}  The name of the C++ class that will be created for
this dialog box.
\hy-8{122}{Title}  The default title for the dialog box.
\hy-8{123}{Width}  The width of the dialog box.
\hy-8{124}{Height}  The width of the dialog box.
\hy-8{125}{Fit contents}  If checked on, the panel will fit itself to its
contents.
\hy-8{126}{Horizontal labels}  If checked on, the default labelling orientation
is horizontal, otherwise it is vertical.
\hy-8{127}{Label font}  The name of the font to be used for panel item labels.
The font should have been created previously using the font manager,
accessible from the GDI menu.
\hy-8{128}{Button font}  The name of the font to be used for panel item contents.



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



To create a menu bar for a frame displayed in the object editor, select
the \hy-8{131}{Edit menu bar} option on the \hy-8{132}{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{133}{Menus}  List of menus and menu items.
\hy-8{134}{Name}  Contains the name of a new or currently
selected menu item.
\hy-8{135}{Id}  Allows the user to specify the name of the
menu item identifier, as used in a \hy-8{136}{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{137}{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{138}{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{139}{Edit}, pressing this
button will create a new menu, not an item on the \hy-7{140}{Edit}
menu. Note that you must fill in the fields \hy-7{141}{before} you
press the button.
\hy-8{142}{New child}  Creates a \hy-7{143}{child} of the currently selected menu
item, i.e. it creates a new submenu. So to create the first item
of the \hy-7{144}{Edit} menu, select the \hy-7{145}{Edit} item and press
this button.  Note that you must fill in the fields \hy-7{146}{before} you
press the button.
\hy-8{147}{New separator}  Creates a separator after the selected menu item.
\hy-8{148}{Delete item}  Deletes the currently selected menu item.
\hy-8{149}{Save item}  Saves the displayed values in the currently selected
menu item.





\hy-8{150}{Hotkeys}

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


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



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

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


\hy-8{161}{Name}  The name of this tool bar instance.
\hy-8{162}{Description}  A textual description of the tool bar.
\hy-8{163}{Class name}  The name of the C++ class that will be created for
this tool barl.
\hy-8{164}{Rows/cols}  The maximum number of columns for this toolbar
(set to a high number since only one row is allowed).
\hy-8{165}{Tools}  A list of the current tools in the tool bar.
\hy-8{166}{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{167}{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{168}{Bitmap}  The name of the bitmap file for the tool. A full
path or extension should not be given; the project path will be prepended, and
a .BMP or .XBM extension added as appropriate.
\hy-8{169}{Toggle}  If checked on, this tool will be a toggle tool.
\hy-8{170}{Add}  Press to add a tool to the tool bar. Note that you
must fill in the fields \hy-7{171}{before} you press the button.
\hy-8{172}{Save}  Saves the displayed values in the currently selected
toggle.
\hy-8{173}{Delete}  Deletes the currently selected tool.
\hy-8{174}{Demote}  Moves the selected tool to the end of the tool bar.


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


\hy-10{180}{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{181}{Name}  The name of this panel instance.
\hy-8{182}{Description}  A textual description of the panel.
\hy-8{183}{Class name}  The name of the C++ class that will be created for
this panel.
\hy-8{184}{Border}  If checked on, the panel will have a border.
\hy-8{185}{Resize strategy}  One of Fixed, Proportional and Grow.
See \hy-13{186}{subwindow tiling}.
\hy-8{187}{Width}  The width of the panel.
\hy-8{188}{Height}  The width of the panel.
\hy-8{189}{% frame}  If Resize strategy is Proportional, this value specifies
the proportion of the frame for determining the subwindow size.
\hy-8{190}{Fit contents}  If checked on, the panel will fit itself to its
contents.
\hy-8{191}{Horizontal labels}  If checked on, the default labelling orientation
is horizontal, otherwise it is vertical.
\hy-8{192}{Label font}  The name of the font to be used for panel item labels.
The font should have been created previously using the font manager,
accessible from the GDI menu.
\hy-8{193}{Button font}  The name of the font to be used for panel item contents.



\hy-10{195}{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{196}{Name}  The name of this canvas instance.
\hy-8{197}{Description}  A textual description of the canvas.
\hy-8{198}{Class name}  The name of the C++ class that will be created for
this canvas.
\hy-8{199}{Border}  If checked on, the canvas will have a border.
\hy-8{200}{Resize strategy}  One of Fixed, Proportional and Grow.
See \hy-13{201}{subwindow tiling}.
\hy-8{202}{Width}  The width of the canvas.
\hy-8{203}{Height}  The width of the canvas.
\hy-8{204}{% frame}  If Resize strategy is Proportional, this value specifies
the proportion of the frame for determining the subwindow size.
\hy-8{205}{Bitmap}  The name of a bitmap file to be loaded into the canvas.
\hy-8{206}{Load}  Allows selection of a bitmap to be displayed in the canvas.
\hy-8{207}{Remove}  Clears the bitmap field.
\hy-8{208}{Retained canvas}  If checked on, the canvas will be retained under X.
\hy-8{209}{Pixels/unit X}  The number of pixels per logical X unit. If zero,
no horizontal scrollbar will be shown.
\hy-8{210}{Pixels/unit Y}  The number of pixels per logical Y unit. If zero,
no vertical scrollbar will be shown.
\hy-8{211}{No units X}  The number of logical units in the X dimension.
\hy-8{212}{No units Y}  The number of logical units in the Y dimension.
\hy-8{213}{Units/page X}  The number of logical units per horizontal page.
\hy-8{214}{Units/page Y}  The number of logical units per vertical page.


\hy-8{215}{Displaying a bitmap}


\hy-10{218}{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{219}{Name}  The name of this text subwindow instance.
\hy-8{220}{Description}  A textual description of the text subwindow.
\hy-8{221}{Class name}  The name of the C++ class that will be created for
this text subwindow.
\hy-8{222}{Border}  If checked on, the text subwindow will have a border.
\hy-8{223}{Resize strategy}  One of Fixed, Proportional and Grow.
See \hy-13{224}{subwindow tiling}.
\hy-8{225}{Width}  The width of the subwindow.
\hy-8{226}{Height}  The width of the subwindow.
\hy-8{227}{% frame}  If Resize strategy is Proportional, this value specifies
the proportion of the frame for determining the subwindow size.
\hy-8{228}{Text file}  The name of a text file to be loaded onto the canvas on creation.



\hy-10{230}{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{231}{Name}  The name of this button.
\hy-8{232}{Description}  A textual description of the button.
\hy-8{233}{Label}  Label for the button.
\hy-8{234}{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-8{235}{Bitmap name}  If this field is used, the name (without path or extension)
is used to denote the name of a bitmap to be used for the button. Under
Windows, the extension .BMP is added to the name and this file is assumed
to exist in the project directory. Under X, the extension .XBM is assumed
(so mono bitmaps only) and the file is compiled into the program.



\hy-10{237}{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{238}{Name}  The name of this checkbox.
\hy-8{239}{Description}  A textual description of the checkbox.
\hy-8{240}{Label}  Label for the checkbox.
\hy-8{241}{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{242}{Label position}  Horizontal, vertical or panel default placement. Under Windows
the checkbox label is always horizontal.



\hy-10{244}{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{245}{Name}  The name of this listbox.
\hy-8{246}{Description}  A textual description of the listbox.
\hy-8{247}{Label}  Label for the listbox.
\hy-8{248}{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{249}{Label position}  Horizontal, vertical or default panel placement.
\hy-8{250}{Values}  A list of default string values.
\hy-8{251}{Value}  Text field for entering a listbox value.
\hy-8{252}{Add}  Add the text in the current field to the list of default values.
\hy-8{253}{Delete}  Delete the currently selected item.



\hy-10{255}{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{256}{Name}  The name of this choice item.
\hy-8{257}{Description}  A textual description of the choice item.
\hy-8{258}{Label}  Label for the choice item.
\hy-8{259}{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{260}{Label position}  Horizontal, vertical or default panel placement.
\hy-8{261}{Values}  A list of default string values.
\hy-8{262}{Value}  Text field for entering a choice item value.
\hy-8{263}{Add}  Add the text in the current field to the list of default values.
\hy-8{264}{Delete}  Delete the currently selected item.



\hy-10{266}{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{267}{Name}  The name of this radiobox.
\hy-8{268}{Description}  A textual description of the radiobox.
\hy-8{269}{Label}  Label for the radiobox.
\hy-8{270}{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{271}{Label position}  Horizontal, vertical or default panel placement.
\hy-8{272}{Rows/cols}  Number of rows or columns (depending on label orientation
value).
\hy-8{273}{Values}  A list of default string values.
\hy-8{274}{Value}  Text field for entering a radiobox value.
\hy-8{275}{Add}  Add the text in the current field to the list of default values.
\hy-8{276}{Delete}  Delete the currently selected item.



\hy-10{278}{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{279}{Name}  The name of this message item.
\hy-8{280}{Description}  A textual description of the message item.
\hy-8{281}{Label}  Label for the message item.
\hy-8{282}{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{284}{Creating a slider item}



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


\hy-8{285}{Name}  The name of this slider.
\hy-8{286}{Description}  A textual description of the slider.
\hy-8{287}{Label}  Label for the slider.
\hy-8{288}{Auto size}  If checked on, the slider will size according to
wxWindows defaults. If off, the size will be determined by interactively sizing
the slider from the object editor.
\hy-8{289}{Min Value}  Minimum integer slider value
\hy-8{290}{Max Value}  Maximum integer slider value


The current position of the slider will be used as the default value.


\hy-10{292}{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{293}{Name}  The name of this text item.
\hy-8{294}{Description}  A textual description of the text item.
\hy-8{295}{Label}  Label for the text item.
\hy-8{296}{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{297}{Label position}  Horizontal, vertical or default panel placement.
\hy-8{298}{Value}  Text field for the default text value.



\hy-10{300}{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{301}{Name}  The name of this multitext item.
\hy-8{302}{Description}  A textual description of the multitext item.
\hy-8{303}{Label}  Label for the multitext item.
\hy-8{304}{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{305}{Label position}  Horizontal, vertical or default panel placement.
\hy-8{306}{Value}  Text field for the default text value.



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



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


\hy-8{309}{1.}  Select the object with left click on the object editor, and
choose \hy-8{310}{Delete object} from the \hy-8{311}{Edit} menu.
\hy-8{312}{2.}  Right-click on the object in the object editor.
\hy-8{313}{3.}  Left-click on the object name in the object hierarchy window.



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



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


\hy-10{319}{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{320}{Open report window} might be associated with
with the \hy-8{321}{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{322}{o}  Menu commands
\hy-8{323}{o}  Button depression
\hy-8{324}{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{325}{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{326}{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{328}{Converting Windows resource files}



Menu bars and dialog boxes can be converted from Windows resource files,
using Petr Smilauer's resource parser (Windows version of wxBuilder
only). 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{329}{Load Windows resources} option from the \hy-8{330}{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{331}{Convert menu bar} or \hy-8{332}{Convert dialog} option from
the \hy-8{333}{Edit} menu.


\hy-10{64}{Project 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.


\hy-10{66}{Global settings}



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 the X
versions of wxBuilder do not currently save global settings.

These are the global settings.


\hy-8{67}{Setting}
    \hy-8{68}{Description}

Windows compiler
    Set to the desired Windows compiler. At present, the only
recognised compilers are Microsoft's C++ version 7, Visual C++ and the NT compiler. For
other compilers, please write the makefile by hand or use a Microsoft compatibility mode
if available.

UNIX compiler
    Type in the name of the UNIX compiler. The default is gcc-2.1.

X GUI target
    UNIX makefiles are generated with three targets, allowing simultaneous
compilation of XView , Sun Motif and HP Motif binaries. This target specifies which one should
be used for auto-compiling \hy-7{69}{(not yet implemented).}

X includes
    Switches specifying where to find X include directories.

X libs
    Switches specifying where to find X library directories.

Extra includes (UNIX)
    Allows specification of extra include paths for UNIX makefiles.

Extra libs (UNIX)
    Allows specification of extra library paths for UNIX makefiles.

Extra includes (Windows)
    Allows specification of extra include paths for Windows makefiles.

Extra libs (Windows)
    Allows specification of extra library paths for Windows makefiles.

UNIX wxWindows directory
    wxWindows home directory under UNIX.

Windows wxWindows directory
    wxWindows home directory under Windows.



See also \hy-13{70}{Resources}.


\hy-10{109}{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{110}{1.}  Zero or more subwindows may be children of a frame.
\hy-8{111}{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{112}{3.}  Each subwindow has a \hy-7{113}{resize strategy}, one of
Fixed, Proportional and Grow.
\hy-8{114}{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{151}{Hotkeys}



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


\hy-10{154}{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{155}{Delete object} option from the \hy-8{156}{Edit} menu).

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


\hy-10{176}{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{177}{Delete object} option from the \hy-8{178}{Edit} menu).


\hy-10{216}{Displaying a bitmap}



A Windows bitmap (or GIF under X) may be displayed in the canvas.  For
code generation purposes, this facility should only be used if the
wxImage library (X) or DIB library (Windows) is available at your
site.


\hyindex{
"wxBuilder Manual"
4 5
6 7
16 17
37 38
39 40
46 47
54 55
59 60
61 62
63 64
65 66
71 72
76 77
81 82
83 84
90 91
108 109
115 116
129 130
150 151
153 154
157 158
175 176
179 180
194 195
215 216
217 218
229 230
236 237
243 244
254 255
265 266
277 278
283 284
291 292
299 300
307 308
314 315
318 319
327 328
334 335
341 342
51 342
58 72
70 342
73 82
101 109
186 109
201 109
224 109
51 342
58 72
70 342
73 82
101 109
186 109
201 109
224 109
}
