Return to DK Summary

The Classes

Global variables, Constants, and Defined Types

Defined in: BHAdd-ons.h

This file describes the global variables, constants, and the defined types used by the add-on.


Global Variables

BHVersion, BHVLastCompatible

Remark: This variable is already defined in the Add-on.cpp file. Just dont delete that line, and don't modify it.
                                                         
  

const uint16 BHVersion

const uint16 BHVLastCompatible

BHVersion is the version number of the development kit. The high byte is the major version number (ex. 1) and the low byte is the minor version number(ex. 0 ->1.00).

BHVLastCompatible is the lowest version number the add-on is compatible with.

These two variables lets BeHappy know if it's compatible with the add-on or not.


projectName

                                                         
  

const char *projectName

This string is the name of the project. Modify the line that defines it in Add-On.cpp to put the name of your add-on in that variable.


Global Functions

InstantiateProject()

Remark: The default implementation of this function in Add-On.cpp should be enough. You don't have to modify it.
                                                         
  

HTMLProject *InstantiateProject(BMessage *archive)

Called by BeHappy to create a new instance of the project. If archive is NULL, create an empty project. And if it isn't, rebuild all the project from the given archive.


Constants

Index types

Constant Requires Description
BW_SECONDLISTDivides the list in two. The first one only show the HappyLinks who have children, and the second one only those who haven't. So the second list show the last "generation", and the first one the others. I think the best thing to understand exactly how the lists are organised is to try this option.
BW_NEXTBUTTONBW_SECONDLISTAdds a 'next' button under the lists. When the user clicks on this button, BeHappy will search the next occurence of the selected item in the first list. (Used in the 'By Inheritance' index of the BeBook add-on)
BW_SEARCHTXTVno BW_SECONDLISTAdds a BTextView to search the list.
BW_CONTAINSBW_SEARCHTXTVAdds a 'contains' checkbox for the search option.
BW_INFOTEXTDisplays the info string of the HappyLinks at the bottom.

Use a combination of these constants in HTMLProject::GiveConfig()


Return to DK Summary