Jürgen,

I was browsing through FormParagraph and I've come across something that 
confuses me. Do you really mean to "activate" the lines below that I've 
highlighted with a "?", or should they be "deactivate"?

The reason I ask is because I have a little helper function that I thought 
would simplify the source considerably.

void setEnabled(FL_OBJECT * ob, bool enable)
{
        if (enable) {
                fl_activate_object(ob);
                fl_set_object_lcol(ob, FL_BLACK);
        } else {
                fl_deactivate_object(ob);
                fl_set_object_lcol(ob, FL_INACTIVE);
        }
}


Angus


bool FormParagraph::input(FL_OBJECT * ob, long)
{
     ...
     } else if (ob == extra_->radio_pextra_minipage) {
        int n = fl_get_button(extra_->radio_pextra_minipage);
        if (n) {
            fl_set_button(extra_->radio_pextra_indent, 0);
            fl_set_button(extra_->radio_pextra_floatflt, 0);
            fl_activate_object(extra_->input_pextra_width);
            fl_set_object_lcol(extra_->input_pextra_width, FL_BLACK);
            fl_activate_object(extra_->input_pextra_widthp);
            fl_set_object_lcol(extra_->input_pextra_widthp, FL_BLACK);
            fl_activate_object(extra_->radio_pextra_top);
            fl_set_object_lcol(extra_->radio_pextra_top, FL_BLACK);
            fl_activate_object(extra_->radio_pextra_middle);
            fl_set_object_lcol(extra_->radio_pextra_middle, FL_BLACK);
            fl_activate_object(extra_->radio_pextra_bottom);
            fl_set_object_lcol(extra_->radio_pextra_bottom, FL_BLACK);
            fl_activate_object(extra_->radio_pextra_hfill);
            fl_set_object_lcol(extra_->radio_pextra_hfill, FL_BLACK);
            fl_activate_object(extra_->radio_pextra_startmp);
            fl_set_object_lcol(extra_->radio_pextra_startmp, FL_BLACK);
        } else {
            fl_deactivate_object(extra_->input_pextra_width);
            fl_set_object_lcol(extra_->input_pextra_width, FL_INACTIVE);
            fl_deactivate_object(extra_->input_pextra_widthp);
            fl_set_object_lcol(extra_->input_pextra_widthp, FL_INACTIVE);
            fl_deactivate_object(extra_->radio_pextra_top);
            fl_set_object_lcol(extra_->radio_pextra_top, FL_INACTIVE);
            fl_deactivate_object(extra_->radio_pextra_middle);
            fl_set_object_lcol(extra_->radio_pextra_middle, FL_INACTIVE);
            fl_deactivate_object(extra_->radio_pextra_bottom);
            fl_set_object_lcol(extra_->radio_pextra_bottom, FL_INACTIVE);
?           fl_activate_object(extra_->radio_pextra_hfill);
            fl_set_object_lcol(extra_->radio_pextra_hfill, FL_INACTIVE);
?           fl_activate_object(extra_->radio_pextra_startmp);
            fl_set_object_lcol(extra_->radio_pextra_startmp, FL_INACTIVE);
        }
    } else if (ob == extra_->radio_pextra_floatflt) {
        int n = fl_get_button(extra_->radio_pextra_floatflt);
        if (n) {
            fl_set_button(extra_->radio_pextra_indent, 0);
            fl_set_button(extra_->radio_pextra_minipage, 0);
            fl_activate_object(extra_->input_pextra_width);
            fl_set_object_lcol(extra_->input_pextra_width, FL_BLACK);
            fl_activate_object(extra_->input_pextra_widthp);
            fl_set_object_lcol(extra_->input_pextra_widthp, FL_BLACK);
        } else {
            fl_deactivate_object(extra_->input_pextra_width);
            fl_set_object_lcol(extra_->input_pextra_width, FL_INACTIVE);
            fl_deactivate_object(extra_->input_pextra_widthp);
            fl_set_object_lcol(extra_->input_pextra_widthp, FL_INACTIVE);
        }
        fl_deactivate_object(extra_->radio_pextra_top);
        fl_set_object_lcol(extra_->radio_pextra_top, FL_INACTIVE);
        fl_deactivate_object(extra_->radio_pextra_middle);
        fl_set_object_lcol(extra_->radio_pextra_middle, FL_INACTIVE);
        fl_deactivate_object(extra_->radio_pextra_bottom);
        fl_set_object_lcol(extra_->radio_pextra_bottom, FL_INACTIVE);
?       fl_activate_object(extra_->radio_pextra_hfill);
        fl_set_object_lcol(extra_->radio_pextra_hfill, FL_INACTIVE);
?       fl_activate_object(extra_->radio_pextra_startmp);
        fl_set_object_lcol(extra_->radio_pextra_startmp, FL_INACTIVE);
    }

Reply via email to