Tutorial
This tutorial is for BeBuilder V0.3
- Run BeBuilder
First thing to do after copying everything into a convenient place, is to double click on the icon!
The main window opens, with two menus : Menu and Tools.
- Create a Project
In the menu "File" choose the New Project item.
- Add A Window
Select the AprojectX item.
In the menu "File" choose the New Window Item. A Window opens and AWindowx is added to the list
in the BeBuilder main window.
- Add A View
To add a view you must select a window. When done, click on the New View in the main menu.
When you clicked on the AWindowx Item in the BeBuilder main window another window appeared : "Properties".
These are the properties of the main window... if you click on a property, let's say "Title", another window appears,
it's the standard property editor, modify the title as "Tutorial" and press validate, the title of the newly created window has changed!
Now if you click on the "New BView" Item, a BView has been added to the newly created window in a grey color...
Did you notice that the BView has completly filled the window ?? it's normal, if you click on the AViewX item in the BeBuilder main window
you will see the properties of the BView and you will be able to change the size and position.
- Add A Button
Select the AViewX Item and Click on the Menu "New Button". A Button has been added to the BView: you can move it and resize it with the mouse...
- Add A TextControl
Select the AViewX Item and Click on the Menu "New TextControl". A TextControl has been added to the BView: you can move it and resize it with the mouse...
- Add A RadioButton
Select the AViewX Item and Click on the Menu "New RadioButton". A RadioButton has been added to the BView: you can move it and resize it with the mouse...
- Add A CheckBox
Select the AViewX Item and Click on the Menu "New CheckBox". A CheckBox has been added to the BView: you can move it and resize it with the mouse...
- Add A Menu
As you can see to add a menu is a little more tricky than adding a button, but it's really simple too.
- Select the AViewX item and click on the Menu "New Menu" and choose the "New MenuBar".
- Select the AMenuBarX item and click on the Menu "New Menu" and choose the "New Menu".
- Select the AMenuX item and click on the Menu "New Menu" and choose the "New MenuItem"
- Keep AMenuX selected, you can add others MenuItem, Separator and even add a sub-menu (you have to choose New Menu again.)
Please be cool with me it's still a pre-alpha release so don't try some "stupid" things like adding another MenuBar...
- Actions
If you are curious, you certainly noticed that a "Message" property was available for some components, it lets you specify a BMessage identifier like 'B_MY_MENU_SAVE' or anything you want.
BeBuilder will add your message to the handler in the BView or BMenuBar unit. All you will have to do is find in the generated code, the comment saying something like "Add you handler here" and you are done.
Your button, checkbox, menuitem... will have a function when selected.
Be careful: the last 4 digits of your BMessage property must be unique in the application.
- AddOns
AddOns are the new feature of BeBuilder V0.3. It lets developers create their own components and make them available in BeBuilder V0.3. All you have to do is copy addons into the AddOn directory in the BeBuilder directory!
AddOns are like any others built-in components, you can use them the same way you use a Button or a Textcontrol, select the AViewX component in the BBuilder main window and choose the menu with your addon, that's it!
To change the path where BeBuilder generates code, click on the AProject item in the BeBuilder window and change the property concerning the path, by default it's something like /boot/BeBuilder/Generation/
- Generation
Be Sure the directory you want to generate is empty. And then, in the Tools menu, click Generate!
To change the path where BeBuilder generates code, click on the AProject item in the BeBuilder window and change the property concerning the path, by default it's something like /boot/BeBuilder/Generation/
- Make!
Open a terminal window and go to the last directory then enter "make".
You could have some troubles in the makefile.... hopefully it's a BUG!
Your project is done! you can run it!
Index