I’m trying to port my photon code from qnx 4.25 & photon 1.12. I used a
widget, PtScale, which is not in the latest release of PhAB. I wonder if
there is a way to add that widget into the widget library.
thanks
Shouqin Huo
Quantum Magnetics
I’m trying to port my photon code from qnx 4.25 & photon 1.12. I used a
widget, PtScale, which is not in the latest release of PhAB. I wonder if
there is a way to add that widget into the widget library.
thanks
Shouqin Huo
Quantum Magnetics
I did it some time ago. Fortunately I wrote a readme in order to be able to do it again .
cc -shared -olibPtScale.so PtScale.c -v -Wl,-libPtScale.so
Practicaly, that is all what you need to use the widget from your code. Just remember to explicitly include photon/PtScale.h because it is not referred from Pt.h and it is bad taste to modify somebody’s headers . When build your program also don’t forget to add -l PtScale to command line.
Next steps explain how to add the widget to AB.
Widgets,Scale,1,PtScale,555,176,187,186
Fields in the line have the following meanings.
(As I understood. I could be wrong).
Widgets - AB window name
Scale - text on the label
1 - ?
PtScale - widget class
555 - ?
176,187,186 - RGB of the button background
l=PtScale,<photon/PtScale.h>:ph
p=scpalette,Scale Widget
The scpalette.pal, which you can take from “old Photon”, is to be copied to /usr/photon/appbuilder.
PtScale and PtScale.img files are to be copied to
/usr/photon/appbuilder/templates to show a PtScale button in the AB.
Sincerely,
Serge
I’m trying to port my photon code from qnx 4.25 &
photon 1.12. I used a
widget, PtScale, which is not in the latest release
of PhAB. I wonder if
there is a way to add that widget into the widget
library.thanks
Shouqin Huo
Quantum Magnetics