On Mon, 30 Oct 2000, Lars Gullik Bjønnes wrote:
> I think you used the wrong name for getFeedback, imho it should have
> been getDescription.

Changed.

> | * feedback is now output via a timer callback loop that is functionally
> | identical to that in Toolbar_pimpl. No longer any need to change an entry
> | to get feedback. The only items not providing feedback are the new
> | Comboxes!

> I never liked the hidden timers.

Well, I've cleaned this one up a little, so that I no longer need that 
horrible reinterpret_cast from pointer to long. 

However, I have a Combox question for you.

I can set the combox post handler, analogous to 
        fl_set_object_posthandler(FL_OBJECT *ob, feedbackPost);
        Combox combo.setpost( feedbackComboPost );

However, what is the equivalent of "event", used by feedbackPost() to decide 
what to do (see below)? Ie, "event" is not passed to feedbackComboPost which 
would be
        void feedbackComboPost();

I see that Combox has a method peek_event() that interogates xevents, but I 
don't know if this is what I should be using, or even how to use it. 

Anyone able to help me here?
Angus


void FormPreferences::feedbackPost(FL_OBJECT *ob, int event)
{
        // We do not test for empty help here, since this can never happen
        if(event == FL_ENTER){
                // Used as a placeholder for ob, so that we don't have to
                // a horrible reinterpret_cast to long and pass it as an
                // argument in fl_set_object_callback.
                callbackObj = ob;
                fl_set_object_callback(dialog_->timer_feedback,
                                       C_FormPreferencesFeedbackCB,
                                       0);
                fl_set_timer(dialog_->timer_feedback, 0.5);
        }
        else if(event != FL_MOTION){
                fl_set_timer(dialog_->timer_feedback, 0);
                callbackObj = 0;
                fl_set_object_label(dialog_->text_warning, "");
        }
}

Reply via email to