Widget Writers Assistance - Motif

This is a discussion on Widget Writers Assistance - Motif ; Dear Readers, I have developed my own custom motif thermometer widget - derived from the primitive widget class -based on the information in Young's Motif book. The widget at the moment only displays data and has no input actions. I ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Widget Writers Assistance

  1. Widget Writers Assistance

    Dear Readers,

    I have developed my own custom motif thermometer widget - derived from
    the primitive widget class -based on the information in Young's Motif
    book.

    The widget at the moment only displays data and has no input actions.

    I would like to modify the widget to when the user say double clicks on
    the thermometer it opens a window with a plot of the temperature per
    during the last 24 hours using a plot widget.

    What do I need to do so that the widget can if double clicked on will
    launch separate widget that I can draw in?

    Should I have sub-classed from a different widget?

    What should I look into?

    Thanks

    Stuart


  2. Re: Widget Writers Assistance

    stuie_norris@yahoo.com.au wrote:
    > Dear Readers,
    >
    > I have developed my own custom motif thermometer widget - derived from
    > the primitive widget class -based on the information in Young's Motif
    > book.
    >
    > The widget at the moment only displays data and has no input actions.
    >
    > I would like to modify the widget to when the user say double clicks on
    > the thermometer it opens a window with a plot of the temperature per
    > during the last 24 hours using a plot widget.
    >
    > What do I need to do so that the widget can if double clicked on will
    > launch separate widget that I can draw in?
    >
    > Should I have sub-classed from a different widget?


    No, I dont think there is any 'low' level widget which supports
    double-click.

    >
    > What should I look into?


    Look in the source for XmList how 'double click' triggers
    defaultActionCallback.

    >
    > Thanks
    >
    > Stuart
    >



    --
    Michel Bardiaux
    Peaktime Belgium S.A. Bd. du Souverain, 191 B-1160 Bruxelles
    Tel : +32 2 790.29.41

  3. Re: Widget Writers Assistance



    stuie_norris@yahoo.com.au wrote:
    >
    > Dear Readers,
    >
    > I have developed my own custom motif thermometer widget - derived from
    > the primitive widget class -based on the information in Young's Motif
    > book.
    >
    > The widget at the moment only displays data and has no input actions.
    >
    > I would like to modify the widget to when the user say double clicks on
    > the thermometer it opens a window with a plot of the temperature per
    > during the last 24 hours using a plot widget.
    >
    > What do I need to do so that the widget can if double clicked on will
    > launch separate widget that I can draw in?
    >
    > Should I have sub-classed from a different widget?
    >
    > What should I look into?
    >
    > Thanks
    >
    > Stuart


    Look at translations and actions.

    --
    Fred L. Kleinschmidt
    Boeing Associate Technical Fellow
    Technical Architect, Common User Interface Services
    M/S 2R-94 (206)544-5225

  4. Re: Widget Writers Assistance

    You must understand Xt translation/action model, as described in
    various Xt books - "X Toolkit Intrinsics - C language Interface"
    (appendix B), "Volume Four: X Toolkit Intrinsics Programming Manual"
    (chapters 7-8) and others.

    In two words your widget must install (using one of
    XtParseTranslationTable(), XtAugmentTranslations(),
    XtOverrideTranslations() library calls) translation looking as "
    (2): your_action_dblclick_name" and action
    {"your_action_dblclick_name", (XtActionProc) YourPlotTemperatureProc},
    where YourPlotTemperatureProc() is your function which creates some
    dialog (XmCreateFormDialog() or XmCreateDialogShell or something else)
    with your plotting of temperature...


+ Reply to Thread