Frames

A frame is a child window with a border. It can be used for grouping gadgets to logical groups.

To create a frame:

    #include <oops/r3frame.h>

    frame = R3New(R3CLID_FRAME,
                  R3WGA_Parent, window,
                  R3TAG_END);

Frames are similar to windows in that they can have a geometry manager through which they manage their children.

Frames can also have a title text and a check box which allows you to open and close the frame to show / hide its contents.

Example: To create a frame with a button:

    // create a frame with a geometry manager
    frame = R3New(R3CLID_FRAME, 
                 R3GA_Text, "Rendering options",
                 R3FRA_HasCheckbox, TRUE,
                 R3FRA_Checked, TRUE,
                 R3TAG_END);

    packer = R3New(R3CLID_PACKER, ...

    R3SetAttrs(frame, R3FRA_GeometryManager, packer, R3TAG_END);

    // create a button for the frame
    button = R3New(R3CLID_BUTTON,
                   R3WGA_Parent, frame,
                   ...
    
    R3Do(packer, R3GMM_INSERT,
         R3GMA_Slave, button,
         R3PA_PackFlags, R3PAPF_EXPAND | R3PAPF_FILLX | R3PAPF_FILLY,
         R3TAG_END);

Note: the above call creates a frame with a check box. The frame doesn't handle the check box events for you. You need to handle the events and close / open the frame your self.