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:

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:

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:

Known Bugs(that I can think of right now):


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.