Tutorial
This tutorial is for BeBuilder V0.2
- Run BeBuilder
First thing to do after copying everything in a convenient place, is to double clicking on the icon!
The main window is opening, 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 is opening 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 you have clicked 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 ?? 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 (but not resize it for the moment!) 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 (but not resize it for the moment!) 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 (but not resize it for the moment!) 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 (but not resize it for the moment!) 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 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 add 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 found in the generated code, the comment saying something like "Add you handler here" and you are done.
Your button, checkbox, menuitem... will do something when selected.
- Generation
Be Sure the directory where you want to generate is empty. And then in the Tools menu click on Generate!
To change the path where BeBuilder generate, click on the AProject item in the BeBuilder window and change the property concerning the path, by defaut 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