Fr Widget Basics

This chapter teaches you the basics of Fr_Widget toolkit

Writing your first Fr_Widget program
Basically, you need always to have a Fr_CoinWindow. This widget is the container of the other widgets you create. It is a subclass of Fr_Group. The Fr_CoinWindow used to distribute events and hold a link to each widget you have in your window.

Fr_CoinWindow doesn't draw any thing and it is not restricted to any dimensions. But there must be a such windows for getting your Fr_Widgets work. If FreeCAD adapt this toolkit someday, the Fr_CoinWindow should be always available and you shouldn't required to create one. But at the moment, you have to create one Fr_CoinWindow whenever you need to use the toolkit. Notice that you shouldn't make several of Fr_CoinWindow.. Only once.

The widgets interact with the user using the callback system.

Explaining the code

 * First line imports the fr_arrow_widget. Later we use it to create the widget itself.
 * Second line imports the fr_coinwindow. As mentioned this is the container of the system. Without this widget, you will not be able to show anything
 * Third line is math library from Python. It is required for now but this will change. It is used to convert the rotation angle to radians. But in the future the interface angles will be in degree. Internally is still radians as COIN3D is in radians.

Creating the widget
coming soon