Visual Be++(r) Beta
Copyright (C) 1999, Kelly Schrock
This is the readme for the Visual Be++ beta, a new visual development tool
for the BeOS.
What it is:
Visual Be++ allows you to approach the software development process in a
way similar to that allowed by RAD tools that are available on other platforms.
If you're not a developer, you probably won't be very interested in this
software. If you are, you might like it, if you're used to using RAD tools such
as Delphi or Visual Basic.
The name is basically a spoof on other products of this type that use the word
"Visual" in their name. The obligatory "Be" reference is also present in the
product name. (I think this must be required or something, like using a
coffee reference is required when plugging a Java-related product!)
I didn't like the sound of "Belphi" much, so I settled on
"Visual Be++".
Why it is cool:
Visual Be++ attempts to ease the process of creating user interfaces under the BeOS.
The Be API is great, but I haven't met anyone yet who likes to write code for 30 minutes
just to get a button to appear on a screen. Visual Be++ allows you to do the
following things:
- Drag and drop components onto a "form".
- Move and resize the components visually.
- Set properties for the form and the components on it, to control their looks
and/or behaviour.
- Attach event handlers to the various events that the form and components expose.
- Generate code for your application, edit it, and generate it
again without losing your work.
How to install it:
If you're reading this file, you've probably already unzipped the .zip
file containing it into a directory someplace. You should be able to
double-click on the VisualBe icon in Tracker, and launch it. If you want to
move it somewhere else, just move the whole directory, thus preserving the
directory structure.
The first time Visual Be++ starts up, the windows will probably look
kind of jumbled on the screen. Just move them to where you want them,
and the next time you start it up, they'll be put back there.
How to uninstall it:
To uninstall Visual Be++, delete the directory the VisualBe program file
lives in. In /home/config/settings, delete the VBe_Settings file. That
should completely remove Visual Be++ from your system.
How to use it:
Creating an application in Visual Be++ is pretty simple really. Here are
the basic steps:
- Start Visual Be++.
-
In the Project window, select the Application object, and set the
GenerationPath property to point to the path where you want the
generated files stored. While you're here, you can also set the various
other Application properties, such as Signature, ClassName,
etc.
-
Create whatever forms you want to appear in your project. Drop the
components on them that you want, and set their properties with the
Property Window (explained below). You can set up the form in the
same way.
-
If you want to come back to the project later, you can save it and
the forms in it. To save a form file, right-click your mouse on the
form, and click "Save to File". You'll be prompted for a filename, and
then the form will be saved. To save the project, select "Save Project"
from the main File menu on the Visual Be++ window. You'll be prompted
for a filename, and then the project will be saved.
-
To generate code for your project, select the "Generate Code" menu item
from the main File menu on Visual Be++. A dialog box will appear telling
you some things about the project and the forms that will be generated.
Pressing the Generate button will cause the application's source code
to be generated in the indicated directory.
- That's pretty much it.
The Visual Be++ Environment:
Here is the run-down on the various windows visible in Visual Be++:
The Project Window
The Project window is where the various elements in your project are
displayed (appropriately enough). The top-level item is the Application
object (as explained above), and each of the items under it are the
various forms in the project. To control the Project window, right-click
in it, and use the various items on the context menu that appears.
To add a form to a project, you can either use the "Add to Project..."
menu item on the project window's context menu, or you can just drag a
form file to the project window and drop it there.
The Property Window
The Property window displays the properties and events for the
currently-selected item in the Form designer, or the application object.
Setting Property values
To set a specific property's value, select the property from the list, and
then click on the top portion of the Property window, using the editing
components appearing there to set the appropriate value. In cases where
appropriate, you can double-click on a property and keyboard focus
will be set to the editor.
Depending on the implementation of the component, it will be updated
on the form designer when you change the property. For example, setting
the "Left" property to some value other than its current value will cause
the left side of the form or component to move. Setting the Enabled property
of a button component to "False" will cause it to become disabled on the
form designer (even though you can still mess around with it).
Selecting Event handlers to be generated
To select event handlers to generate, click the "Events" tab of the
Property window. You'll see a list of events for the select form,
component, or application object. Double-click on one of the events,
and a little dot will appear in the right-hand column of the listview,
indicating that a handler for the selected event will be generated when
you generate the code. (NOTE: Later, I plan to make this a more integrated,
where you'll actually see the name of the event handler to generate, and
possibly even pop up an editor you can type code into the event handler.)
The Component palette
The Component palette displays a list of components you can drop on
your forms. It's not a drag-and-drop operation; Instead, you click the
button representing the control you want. Then, click and drag your mouse
across the form designer to create a selection rectangle. When you release
the mouse button, the control will be created inside the rectangle. (There
are exceptions to this, one example being the Color control. It will use
the top-left corner of the selection rectangle to determine where to
place the control, but the actual width and height of the control is
determined by the control itself.)
Use the Property Window to set the various properties of the component
you've selected, and attach handlers to its events.
Each component has a context menu that appears when you right-click it.
The items in this menu allow you to copy, paste, delete, and otherwise manipulate the
component. In addition, a component might define extra items that appear
at the bottom of the context menu. For example, a ListView and an OutlineListView
component define an "Items..." menu item. Selecting this menu item causes
a dialog box to display, allowing you to create and manipulate items
inside the listview that will be saved with the form file and created
in your generated application. Cool, huh?
The Design form(s)
The Design form is your window object. It consists of a BWindow object
with a BView-derived view covering its whole client area. This is where
you drop components. The various properties for the form are used to
set things like the form's title, the view's background color, and other
specifics.
Setting the main form
To specify which form will be the main form for your project, right-click
on the form in the Project window, and select the "Set As Main Form" menu
item, which will become checked.
Generating code
To generate code for your application, select the "Generate Code" menu
item on the main Visual Be++ menu. A dialog box will appear, indicating
where the files will be generated, and which forms will be generated. Pressing
the "Generate" button will cause the code to be generated in the location
you specify.
Compiling your application
Currently, Visual Be++ does not create a make file or a BeIDE project file
for your application. You have to do this yourself. This is partly because
I don't know how to generate a BeIDE project file.
So, to compile your application, you must create a BeIDE project or
makefile for the generated source files. In this file, include references
to Form.cpp, BaseControls.cpp, KCL.cpp, in addition to all of the generated
source files.
You'll also want to add the KCL/ subdirectory under Visual Be++'s
directory to the INCLUDE directories for your project. (If you're using
BeIDE, you use the Settings dialog box to do this.)
Why Visual Be++ is kind of gross-looking and incomplete:
It's incomplete because I'm not done with it. I put it out earlier than
I planned, because I noticed that a lot of people are talking about the
need for one of these. I figured I ought to make Visual Be++'s presence
known before someone else did something about the lack of a RAD tool for
the BeOS!
It's ugly because I haven't taken the time to make it look good, and I also
haven't finished all of the components that will be appearing in the
Component Palette.
This beta is more or less fully functional. You can create forms, drop components
on them, move, size, cut, copy, and paste them, set their properties,
attach event handlers to the various events they expose, and generate
compilable code. Not everything works perfectly yet, but I'm planning on
rectifying that as time permits.
I'm planning on fleshing out the components for the palette, and including
every control available in the Be API, as soon as possible. I am also
going to document the API for creating your own custom Visual Be++ components.
Why Visual Be++ doesn't generate native BeAPI code:
You will notice that when you generate code, your window inherits from
TForm instead of BWindow, and the components aren't native Be components.
Actually, classes the forms and components derive from are really thin wrappers
around their BeAPI counterparts. A TForm is actually a combination of a BWindow and a
derivative of BView that covers it's client area. Most of what I've done is in support of
event handlers. If you really get curious, you can check out the header files
to see what's going on. (They're not done yet, either!)
About the weird-looking comments in the generated code:
The comments you will see in the generated code that are surrounded by
brackets indicate areas where the code generator will overwrite whatever is
there, in order to do it's thing. Be aware that anything you put in your
source/header file between these markers will be overwritten the next time
the generator runs. Any code you write anywhere else is left alone.
For each header file/.cpp file that gets generated, a file with the same
base name, but with an .fcp extension, is also generated. Everything in
the .fcp file is handled by the code generator.
If you decide that you want the code generator to stop generating
one of these sections in your source or header files, simply delete the markers
around that section. After that, the code generator will not touch those areas.
You can then maintain these sections of the code yourself.
Where to get updates:
Check back at the place where you first downloaded Visual Be++ periodically.
As soon as I have something in the form of a worthy update, I'll put it there.
Project status:
Currently, Visual Be++ is an early beta. I welcome any feedback you
might wish to provide. When I think it's ready for prime-time, I'll
come up with some sort of pricing. No, it's not going to be free (I'm not
doing this purely to make my head hurt), but it will probably be cheap.
Anyone contributing to the well-being of Visual Be++ (suggestions that I
use, components, etc) will more than likely end up with a copy of Visual Be++
for nothing. Sorry to be so vague about the pricing, but I really haven't
thought about it.
I plan to add the following features/fixes in the future:
- Toolbar buttons to fill up those gross-looking spaces in the main and Project windows.
- Some form of online help.
- All of the components resident in the BeOS API on the Palette.
-
For the Property Window, I want to make the property grid act more like
the one in Delphi, where the editor for a given property appears in the
cell next to the property, instead of at the top of the window in a box.
The control at the top of the window would then be changed to contain a
list of the components on the currently-selected form, and you could pick
from this list to select a component, thus never leaving the Property
window to work with all of the components on a form.
-
I'm hoping to figure out a way to integrate an editor (such as BeIDE's)
into the designer, so that when you double-click on a component or one
of its events, you can see the code that gets generated, instead of just
a dot that tells you a handler will be generated for it.
-
The ability to select multiple components in the form designer so that
you can (for example) select several components and edit the properties
that are common between them, as well as being able to line them up, etc.
-
A cool noise that gets played whenever you do something stupid (not really).
-
Better integration of your project. Currently, Visual Be++ only generates
code that you work with in another IDE. This is okay for those who want
to use some other IDE, but I think it would be nice to be able to do
everything from with Visual Be++ if you want to. This means that there
would need to be a good integrated text editor, some kind of class browser, and
other stuff.
-
Some kind of Object Repository where you could store templates of things
like forms, etc.
-
(your suggestions could be here!)
Known Bugs(that I can think of right now):
-
Occasionally, the controls at the top of the property window get all
jumbled up. I'm working on this. The workaround is to shut down Visual Be++
and restart it. I know this sucks.
-
When you select a control that is parented by another control (such as a
Box), it draws its selection status correctly. If you then select another
control that is not parented by the same parent, the selection indicator
remains, even though the other control is now selected. The workaround
is to click the parent of the offending control.
How to contact me:
If you want to contact me for whatever reason, then e-mail me at
jkelly@kcnet.com. I'm really
interested in hearing what people think of this software.