Gadgets

In Realsoft 3D controls such as a slider and a button are called gadgets. Below you can find an example code for creating a few of the most common gadgets:

    #include <oops/r3checkb.h>

    checkbox = R3New(R3CLID_CHECKBOX,
                     R3WGA_Parent, window,
                     R3GA_Text, "Light Sources",
                     R3GA_ToolTip, "Check this to enable light sources",
                     R3WGA_HelpURL, "models/rendersettings/renderingsettings.html#Lights",
                     R3TAG_END);


    #include <oops/r3slider.h>

    slider = R3New(R3CLID_SLIDER,
                   R3WGA_Parent, window,
                   R3GA_Text, "Quality",
                   R3GSLA_Level, 5,
                   R3GSLA_Min, 1,
                   R3GSLA_Max, 20,
                   R3TAG_END);

    #include <oops/r3button.h>

    button = R3New(R3CLID_BUTTON,
                   R3WGA_Parent, window,
                   R3GA_Text, "Render",
                   R3TAG_END)