00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef PROCESSVIEWSERVER_H
00022 #define PROCESSVIEWSERVER_H
00023
00024 #include <stdio.h>
00025 #include <string.h>
00026 #ifdef __VMS
00027 #include "vmsgl.h"
00028 #endif
00029 #ifdef _WIN32
00030 #include "vmsgl.h"
00031 #endif
00032 #ifdef unix
00033
00034 #include "vmsgl.h"
00035 #endif
00036
00037 #ifndef USE_INETD
00038 #include "wthread.h"
00039 #endif
00040
00047 #define pv_STDIN 0
00048 #define pv_STDOUT 1
00049 #define pv_CACHE
00050
00051 #define MAX_PRINTF_LENGTH 1024
00052 #define MAX_EVENT_LENGTH 1024
00053 #define MAX_CLIENTS 100
00055
00056 enum PvEvent {
00057 NULL_EVENT=1,
00058 BUTTON_EVENT,
00059 TEXT_EVENT,
00060 SLIDER_EVENT,
00061 CHECKBOX_EVENT,
00062 RADIOBUTTON_EVENT,
00063 GL_IDLE_EVENT,
00064 GL_PAINT_EVENT,
00065 GL_INITIALIZE_EVENT,
00066 GL_RESIZE_EVENT,
00067 TAB_EVENT,
00068 TABLE_CLICKED_EVENT,
00069 TABLE_TEXT_EVENT,
00070 SELECTION_EVENT,
00071 CLIPBOARD_EVENT,
00072 BUTTON_PRESSED_EVENT,
00073 BUTTON_RELEASED_EVENT,
00074 RIGHT_MOUSE_EVENT,
00075 KEYBOARD_EVENT,
00076 PLOT_MOUSE_MOVED_EVENT,
00077 PLOT_MOUSE_PRESSED_EVENT,
00078 PLOT_MOUSE_RELEASED_EVENT,
00079 USER_EVENT
00080 };
00081
00082
00083 enum Linestyle {
00084 LINESTYLE_NONE=0,
00085 LINESTYLE_CIRCLE,
00086 LINESTYLE_CROSS,
00087 LINESTYLE_RECT
00088 };
00089
00090
00091 #define HELVETICA "Helvetica"
00092 #define TIMES "Times"
00093 #define COURIER "Courier"
00094 #define OLDENGLISH "OldEnglish"
00095 #define SYSTEM "System"
00096 #define ANYSTYLE "AnyStyle"
00097
00098
00099 enum Weight { Light = 25, Normal = 50, DemiBold = 63, Bold = 75, Black = 87 };
00100
00101
00102 enum FontAlignment {
00103 ALIGN_LEFT=0,
00104 ALIGN_CENTER,
00105 ALIGN_RIGHT,
00106 ALIGN_VERT_CENTER
00107 };
00108
00109
00110
00111
00112
00113
00114
00115 enum AlignmentFlags {
00116 AlignAuto = 0x0000,
00117 AlignLeft = 0x0001,
00118 AlignRight = 0x0002,
00119 AlignHCenter = 0x0004,
00120 AlignJustify = 0x0008,
00121 AlignHorizontal_Mask = AlignLeft | AlignRight | AlignHCenter | AlignJustify,
00122 AlignTop = 0x0010,
00123 AlignBottom = 0x0020,
00124 AlignVCenter = 0x0040,
00125 AlignVertical_Mask = AlignTop | AlignBottom | AlignVCenter,
00126 AlignCenter = AlignVCenter | AlignHCenter
00127 };
00128
00129 enum TextFlags {
00130 SingleLine = 0x0080,
00131 DontClip = 0x0100,
00132 ExpandTabs = 0x0200,
00133 ShowPrefix = 0x0400,
00134 WordBreak = 0x0800,
00135 BreakAnywhere = 0x1000,
00136 DontPrint = 0x2000,
00137 Underline = 0x01000000,
00138 Overline = 0x02000000,
00139 StrikeOut = 0x04000000,
00140 IncludeTrailingSpaces = 0x08000000,
00141 NoAccel = 0x4000
00142 };
00143
00144
00145 #define NORMAL 0
00146 #define ITALIC 1
00147
00148
00149 enum Policy { NoInsertion=0, AtTop, AtCurrent, AtBottom, AfterCurrent, BeforeCurrent };
00150
00151
00152 #define RED 255,0,0
00153 #define GREEN 0,255,0
00154 #define BLUE 0,0,255
00155 #define WHITE 255,255,255
00156 #define BLACK 0,0,0
00157 #define YELLOW 255,255,0
00158 #define LILA 255,0,255
00159 #define CYAN 0,255,255
00160 #define DARK_GREY 128,128,128
00161 #define LIGHT_GREY 180,180,180
00162 #define WHEAT 213,213,154
00163 #define DARK_RED 128,0,0
00164 #define DARK_GREEN 0,128,0
00165 #define DARK_LILA 128,0,128
00166 #define DARK_CYAN 0,128,128
00167 #define DARK_YELLOW 200,200,0
00168 #define DARK_BLUE 0,0,128
00169
00170
00171 enum Mode { HEX=0, DEC, OCT, BINx };
00172 enum Mode2 { Hex=0, Dec, Oct, Bin };
00173 enum SegmentStyle { Outline=0, Filled, Flat };
00174
00175
00176 #define HORIZONTAL 0
00177 #define VERTICAL 1
00178 #define Horizontal HORIZONTAL
00179 #define Vertical VERTICAL
00180
00181
00182 enum Shape {
00183 NoFrame = 0,
00184 Box = 0x0001,
00185 Panel = 0x0002,
00186 WinPanel = 0x0003,
00187 HLine = 0x0004,
00188 VLine = 0x0005,
00189 StyledPanel = 0x0006,
00190 PopupPanel = 0x0007,
00191 MenuBarPanel = 0x0008,
00192 ToolBarPanel = 0x0009,
00193 LineEditPanel = 0x000a,
00194 TabWidgetPanel = 0x000b,
00195 GroupBoxPanel = 0x000c,
00196 MShape = 0x000f
00197 };
00198
00199 enum Shadow{
00200 Plain = 0x0010,
00201 Raised = 0x0020,
00202 Sunken = 0x0030,
00203 MShadow = 0x00f0 };
00204
00205 enum FileDialogs{
00206 FileOpenDialog = 0,
00207 FileSaveDialog,
00208 FindDirectoryDialog};
00209
00210 enum MessageBoxTypes{
00211 BoxInformation = 0,
00212 BoxWarning,
00213 BoxCritical};
00214
00215 enum TextBrowserPos{
00216 Home = 0,
00217 Forward,
00218 Backward};
00219
00220 enum TabWidgetPos{
00221 Top = 0,
00222 Bottom};
00223
00224 enum KeyboardModifiers{
00225 ShiftButton = 4,
00226 ControlButton = 3,
00227 AltButton = 2,
00228 NormalKey = 1
00229 };
00230
00231 enum KeyCodes{
00232 Key_Escape = 0x1000,
00233 Key_Pause = 0x1008,
00234 Key_Print = 0x1009,
00235 Key_SysReq = 0x100a,
00236 Key_PageUp = 0x1016,
00237 Key_PageDown = 0x1017,
00238 Key_F1 = 0x1030,
00239 Key_F2 = 0x1031,
00240 Key_F3 = 0x1032,
00241 Key_F4 = 0x1033,
00242 Key_F5 = 0x1034,
00243 Key_F6 = 0x1035,
00244 Key_F7 = 0x1036,
00245 Key_F8 = 0x1037,
00246 Key_F9 = 0x1038,
00247 Key_F10 = 0x1039,
00248 Key_F11 = 0x103a,
00249 Key_F12 = 0x103b
00250 };
00251
00252 enum QwtAxis { yLeft, yRight, xBottom, xTop, axisCnt };
00253 enum QwtAutoscale {None = 0, IncludeRef = 1, Symmetric = 2, Floating = 4, Logarithmic = 8, Inverted = 16 };
00254 enum ScalePosition { ScaleLeft, ScaleRight, ScaleTop, ScaleBottom };
00255 enum ThermoPosition { ThermoNone, ThermoLeft, ThermoRight, ThermoTop, ThermoBottom};
00256 enum KnobSymbol { KnobLine, KnobDot };
00257 enum CounterButton { CounterButton1, CounterButton2, CounterButton3, CounterButtonCnt };
00258 enum SliderScalePos { SliderNone, SliderLeft, SliderRight, SliderTop, SliderBottom };
00259 enum SliderBGSTYLE { SliderBgTrough = 0x1, SliderBgSlot = 0x2, SliderBgBoth = SliderBgTrough | SliderBgSlot};
00260 enum DialShadow { DialPlain = Plain, DialRaised = Raised, DialSunken = Sunken };
00261 enum DialMode { RotateNeedle, RotateScale };
00262 enum CompassNeedle { QwtCompassNeedle1 = 1, QwtCompassNeedle2, QwtCompassNeedle3, QwtCompassNeedle4, QwtCompassLineNeedle };
00263 enum PenStyle { NoPen, SolidLine, DashLine, DotLine, DashDotLine, DashDotDotLine, MPenStyle = 0x0f };
00264 enum MarkerSymbol { MarkerNone, MarkerEllipse, MarkerRect, MarkerDiamond, MarkerTriangle, MarkerDTriangle, MarkerUTriangle, MarkerLTriangle, MarkerRTriangle, MarkerCross, MarkerXCross, MarkerStyleCnt };
00265
00266 enum Order { DMY, MDY, YMD, YDM };
00267
00268 typedef struct
00269 {
00270 int event;
00271 int i;
00272 char text[MAX_EVENT_LENGTH];
00273 }
00274 PARSE_EVENT_STRUCT;
00275
00276
00277 typedef struct _PARAM_
00278 {
00279 int s;
00280 int os;
00281 int port;
00282 int language;
00283 int convert_units;
00284 FILE *fp;
00285 int sleep;
00286 int (*cleanup)(void *);
00287 void *app_data;
00288 void *user;
00289 char *clipboard;
00290 long clipboard_length;
00291 int modal;
00292 int (*readData)(void *d);
00293 int (*showData)(_PARAM_ *p, void *d);
00294 void *modal_d;
00295 void *modalUserData;
00296 PARSE_EVENT_STRUCT parse_event_struct;
00297 float *x;
00298 float *y;
00299 int nxy;
00300 char initial_mask[32];
00301 char file_prefix[32];
00302
00303
00304 int free;
00305 char version[32];
00306 }PARAM;
00307
00308 #define DEFAULT_LANGUAGE 0
00309
00310 enum UNIT_CONVERSION
00311 {
00312 MM2INCH = 1,
00313 INCH2MM ,
00314 CM2FOOT ,
00315 FOOT2CM ,
00316 CM2YARD ,
00317 YARD2CM ,
00318 KM2MILE ,
00319 MILE2KM ,
00320 KM2NAUTICAL_MILE ,
00321 NAUTICAL_MILE2KM ,
00322 QMM2SQINCH ,
00323 SQINCH2QMM ,
00324 QCM2SQFOOT ,
00325 SQFOOT2QCM ,
00326 QM2SQYARD ,
00327 SQYARD2QM ,
00328 QM2ACRE ,
00329 ACRE2QM ,
00330 QKM2SQMILE ,
00331 SQMILE2QKM ,
00332 ML2TEASPOON ,
00333 TEASPOON2ML ,
00334 ML2TABLESPOON ,
00335 TABLESPOON2ML ,
00336 ML2OUNCE ,
00337 OUNCE2ML ,
00338 L2CUP ,
00339 CUP2L ,
00340 L2PINT ,
00341 PINT2L ,
00342 L2QUART ,
00343 QUART2L ,
00344 L2GALLON ,
00345 GALLON2L ,
00346 GR2OUNCE ,
00347 OUNCE2GR ,
00348 KG2POUND ,
00349 POUND2KG ,
00350 T2TON ,
00351 TON2T ,
00352 C2FAHRENHEIT ,
00353 FAHRENHEIT2C
00354 };
00355
00356
00357 #define PARAM_P PARAM p;pvInit(0,NULL,&p);
00358
00359
00360 #define INITIALIZE_GL "initializeGL"
00361 #define RESIZE_GL "resizeGL"
00362
00364
00368 int glencode_set_param(PARAM *p);
00372 int pvsystem(const char *command);
00376 int pvXYAllocate(PARAM *p, int n);
00380 int pvSetXY(PARAM *p, int i, float x, float y);
00385 int pvInitInternal(PARAM *p);
00409 int pvInit(int ac, char **av, PARAM *p);
00413 int pvAccept(PARAM *p);
00417 int pvCreateThread(PARAM *p, int s);
00422 int pvGetInitialMask(PARAM *p);
00454 int pvMain(PARAM *p);
00460 int pvSetCleanup(PARAM *p, int (*cleanup)(void *), void *app_data);
00466 char *pvGetEvent(PARAM *p);
00506 int pvPollEvent(PARAM *p, char *event);
00510 int pvWait(PARAM *p, const char *pattern);
00514 int pvGlUpdate(PARAM *p, int id);
00518 int pvSleep(int milliseconds);
00522 int pvWarning(PARAM *p, const char *text);
00526 int pvMainFatal(PARAM *p, const char *text);
00530 int pvThreadFatal(PARAM *p, const char *text);
00535 int pvScreenHint(PARAM *p, int w, int h);
00537
00551 int pvStartDefinition(PARAM *p, int num_objects);
00577 int pvQLayoutVbox(PARAM *p, int id, int parent);
00578
00582 int pvQLayoutHbox(PARAM *p, int id, int parent);
00583
00587 int pvQLayoutGrid(PARAM *p, int id, int parent);
00588
00589 int pvQWidget(PARAM *p, int id, int parent);
00617 int pvQLabel(PARAM *p, int id, int parent);
00646 int pvQComboBox(PARAM *p, int id, int parent, int editable, int policy);
00671 int pvQLineEdit(PARAM *p, int id, int parent);
00694 int pvQPushButton(PARAM *p, int id, int parent);
00720 int pvQLCDNumber(PARAM *p, int id, int parent, int numDigits, int segmentStyle, int mode);
00741 int pvQSlider(PARAM *p, int id, int parent, int minValue, int maxValue, int pageStep, int value, int orientation);
00761 int pvQButtonGroup(PARAM *p, int id, int parent, int columns, int orientation, const char *title);
00783 int pvQRadioButton(PARAM *p, int id, int parent);
00805 int pvQCheckBox(PARAM *p, int id, int parent);
00826 int pvQFrame(PARAM *p, int id, int parent, int shape, int shadow, int line_width, int margin);
00847 int pvQDraw(PARAM *p, int id, int parent);
00887 int pvQImage(PARAM *p, int id, int parent, const char *imagename, int *w, int *h, int *depth);
00907 int pvQGL(PARAM *p, int id, int parent);
00928 int pvQTabWidget(PARAM *p, int id, int parent);
00949 int pvQToolBox(PARAM *p, int id, int parent);
00970 int pvQGroupBox(PARAM *p, int id, int parent, int columns, int orientation, const char *title);
00995 int pvQListBox(PARAM *p, int id, int parent);
01036 int pvQTable(PARAM *p, int id, int parent, int rows, int columns);
01056 int pvQSpinBox(PARAM *p, int id, int parent, int min, int max, int step);
01076 int pvQDial(PARAM *p, int id, int parent, int min, int max, int page_step, int value);
01097 int pvQProgressBar(PARAM *p, int id, int parent, int total_steps);
01123 int pvQMultiLineEdit(PARAM *p, int id, int parent, int editable, int max_lines);
01147 int pvQTextBrowser(PARAM *p, int id, int parent);
01175 int pvQListView(PARAM *p, int id, int parent);
01197 int pvQIconView(PARAM *p, int id, int parent);
01223 int pvQVtkTclWidget(PARAM *p, int id, int parent);
01231 int pvQwtPlotWidget(PARAM *p, int id, int parent, int nCurves, int nMarker);
01237 int pvQwtScale(PARAM *p, int id, int parent, int pos);
01243 int pvQwtThermo(PARAM *p, int id, int parent);
01249 int pvQwtKnob(PARAM *p, int id, int parent);
01255 int pvQwtCounter(PARAM *p, int id, int parent);
01261 int pvQwtWheel(PARAM *p, int id, int parent);
01267 int pvQwtSlider(PARAM *p, int id, int parent);
01273 int pvQwtCompass(PARAM *p, int id, int parent);
01296 int pvQDateEdit(PARAM *p, int id, int parent);
01319 int pvQTimeEdit(PARAM *p, int id, int parent);
01345 int pvQDateTimeEdit(PARAM *p, int id, int parent);
01349 int pvEndDefinition(PARAM *p);
01353 int pvAddWidgetOrLayout(PARAM *p, int id, int item, int row, int col);
01357 int pvAddStretch(PARAM *p, int id, int param);
01361 int pvTabOrder(PARAM *p, int id1, int id2);
01363
01364
01371 int pvSetCaption(PARAM *p, const char *text);
01375 int pvPlaySound(PARAM *p, const char *filename);
01379 int pvBeep(PARAM *p);
01384 int pvStatusMessage(PARAM *p, int r, int g, int b, const char *format, ...);
01388 int pvToolTip(PARAM *p, int id, const char *text);
01393 int pvSetText(PARAM *p, int id, const char *text);
01399 int pvPrintf(PARAM *p, int id, const char *format, ...);
01404 int pvSetValue(PARAM *p, int id, int value);
01409 int pvClear(PARAM *p, int id);
01416 int pvChangeItem(PARAM *p, int id, int index, const char *bmp_file, const char *text);
01424 int pvInsertItem(PARAM *p, int id, int index, const char *bmp_file, const char *text);
01429 int pvRemoveItem(PARAM *p, int id, int index);
01434 int pvRemoveItemByName(PARAM *p, int id, const char *name);
01439 int pvAddColumn(PARAM *p, int id, const char *text, int size);
01451 int pvSetTableText(PARAM *p, int id, int x, int y, const char *text);
01456 int pvSetTableCheckBox(PARAM *p, int id, int x, int y, int state, const char *text);
01465 int pvSetTableComboBox(PARAM *p, int id, int x, int y, int editable, const char *textlist);
01478 int pvTablePrintf(PARAM *p, int id, int x, int y, const char *format, ...);
01486 int pvMysqldump(PARAM *p, int id, const char *command);
01492 int pvCSVdump(PARAM *p, int id, const char *filename, char delimitor='\t');
01496 int pvCSVcreate(PARAM *p, const char *command, const char *filename);
01500 int pvCSV(PARAM *p, int id, const char *command, char delimitor='\t');
01508 int pvSetListViewText(PARAM *p, int id, const char *path, int column, const char *text);
01517 int pvListViewPrintf(PARAM *p, int id, const char *path, int column, const char *format, ...);
01518 #define pvSetColumnWith pvSetColumnWidth
01519
01524 int pvSetColumnWidth(PARAM *p, int id, int column, int width);
01530 int pvSetWordWrap(PARAM *p, int id, int wrap);
01537 int pvSetPixmap(PARAM *p, int id, const char *bmp_file);
01543 int pvSetTablePixmap(PARAM *p, int id, int x, int y, const char *bmp_file);
01549 int pvSetSource(PARAM *p, int id, const char *html_file);
01554 int pvSetImage(PARAM *p, int id, const char *filename);
01559 int pvSetBackgroundColor(PARAM *p, int id, int r, int g, int b);
01565 int pvSetPaletteBackgroundColor(PARAM *p, int id, int r, int g, int b);
01571 int pvSetPaletteForegroundColor(PARAM *p, int id, int r, int g, int b);
01577 int pvSetFontColor(PARAM *p, int id, int r, int g, int b);
01587 int pvSetFont(PARAM *p, int id, const char *family, int pointsize, int bold, int italic , int underline, int strikeout);
01591 int pvDisplayNum(PARAM *p, int id, int num);
01595 int pvDisplayFloat(PARAM *p, int id, float val);
01599 int pvDisplayStr(PARAM *p, int id, const char *str);
01603 int pvAddTab(PARAM *p, int id, int id_child, const char *str);
01610 int pvSetListViewPixmap(PARAM *p, int id, const char *path, const char *bmp_file, int column);
01617 int pvRemoveListViewItem(PARAM *p, int id, const char *path);
01621 int pvRemoveIconViewItem(PARAM *p, int id, const char *text);
01625 int pvSetIconViewItem(PARAM *p, int id, const char *bmp_file, const char *text);
01630 int pvSetDateOrder(PARAM *p, int id, int order);
01635 int pvSetDate(PARAM *p, int id, int year, int month, int day);
01640 int pvSetMinDate(PARAM *p, int id, int year, int month, int day);
01645 int pvSetMaxDate(PARAM *p, int id, int year, int month, int day);
01650 int pvSetTime(PARAM *p, int id, int hour, int minute, int second=0, int msec=0);
01655 int pvSetMinTime(PARAM *p, int id, int hour, int minute, int second=0, int msec=0);
01660 int pvSetMaxTime(PARAM *p, int id, int hour, int minute, int second=0, int msec=0);
01665 int pvEnsureCellVisible(PARAM *p, int id, int row, int col=1);
01667
01676 int pvText(PARAM *p, int id);
01681 int pvSelection(PARAM *p, int id);
01683
01692 int pvMoveContent(PARAM *p, int id, int pos);
01696 int pvSetGeometry(PARAM *p, int id, int x, int y, int w, int h);
01701 int pvSetAlignment(PARAM *p, int id, int alignment);
01706 int pvSetChecked(PARAM *p, int id, int state);
01710 int pvMove(PARAM *p, int id, int x, int y);
01714 int pvResize(PARAM *p, int id, int w, int h);
01718 int pvHide(PARAM *p, int id);
01722 int pvShow(PARAM *p, int id);
01727 int pvSetMultiSelection(PARAM *p, int id, int mode);
01732 int pvSetEchoMode(PARAM *p, int id, int mode);
01737 int pvSetEditable(PARAM *p, int id, int editable);
01742 int pvSetEnabled(PARAM *p, int id, int enabled);
01747 int pvTableSetEnabled(PARAM *p, int id, int x, int y, int enabled);
01755 int pvTableSetHeaderResizeEnabled(PARAM *p, int id, int horizontal ,int enabled, int section);
01763 int pvSetSorting(PARAM *p, int id, int column, int mode);
01768 int pvSetTabPosition(PARAM *p, int id, int pos);
01773 int pvSetNumRows(PARAM *p, int id, int num);
01778 int pvSetNumCols(PARAM *p, int id, int num);
01783 int pvInsertRows(PARAM *p, int id, int row, int count=1);
01788 int pvInsertColumns(PARAM *p, int id, int col, int count=1);
01793 int pvRemoveRow(PARAM *p, int id, int row);
01798 int pvRemoveColumn(PARAM *p, int id, int col);
01803 int pvSetCurrentItem(PARAM *p, int id, int index);
01809 int pvSetTimeEditDisplay(PARAM *p, int id, int hour, int minute, int second, int ampm);
01817 int pvListViewEnsureVisible(PARAM *p, int id, const char *path);
01826 int pvListViewSetOpen(PARAM *p, int id, const char *path, int open);
01835 int pvSetStyle(PARAM *p, int id, int shape, int shadow, int line_width, int margin);
01842 int pvSetMovie(PARAM *p, int id, int background, const char *filename);
01851 int pvMovieControl(PARAM *p, int id, int step);
01857 int pvMovieSpeed(PARAM *p, int id, int speed);
01859
01866 int pvVtkTcl(PARAM *p, int id, const char *tcl_command);
01870 int pvVtkTclPrintf(PARAM *p, int id, const char *format, ...);
01874 int pvVtkTclScript(PARAM *p, int id, const char *filename);
01876
01884 int pvHyperlink(PARAM *p, const char *link);
01886
01893 int pvSendUserEvent(PARAM *p, int id, const char *text);
01900 int pvWriteFile(PARAM *p, const char *filename, int width, int height);
01904 int pvCloseFile(PARAM *p);
01910 char *pvGetTextParam(PARAM *p, const char *command);
01915 int pvGetText(const char *command, char *text);
01919 PARSE_EVENT_STRUCT *pvParseEventStruct(PARAM *p, const char *event);
01924 int pvParseEvent(const char *event, int *id, char *text);
01929 int pvCopyToClipboard(PARAM *p, int id);
01934 int pvPrint(PARAM *p, int id);
01939 int pvSave(PARAM *p, int id);
01944 int pvSave(PARAM *p, int id, const char *filename);
01949 int pvSaveAsBmp(PARAM *p, int id, const char *filename);
01953 int pvSendFile(PARAM *p, const char *filename);
01958 int pvDownloadFileAs(PARAM *p, const char *filename, const char *newname);
01962 int pvDownloadFile(PARAM *p, const char *filename);
01963
01964 int pvtcpsend(PARAM *p, const char *buf, int len);
01965 int pvtcpsend_binary(PARAM *p, const char *buf, int len);
01966 int pvtcpreceive(PARAM *p, char *buf, int maxlen);
01967 int pvtcpreceive_binary(PARAM *p, char *buf, int maxlen);
01968
01970
01977 int pvGlBegin(PARAM *p, int id);
01981 int pvGlEnd(PARAM *p);
01983
01993 int pvFileDialog(PARAM *p, int id_return, int type);
02002 int pvPopupMenu(PARAM *p, int id_return, const char *text);
02010 int pvMessageBox(PARAM *p, int id_return, int type, const char *text, int button0, int button1, int button2);
02016 int pvInputDialog(PARAM *p, int id_return, const char *text, const char *default_text);
02020 #define readDataCast int (*)(void *)
02021 #define showDataCast int (*)(PARAM *, void *)
02022 int pvRunModalDialog(PARAM *p, int width, int height, int (*showMask)(PARAM *p), void *userData,
02023 int (*readData)(void *d),
02024 int (*showData)(PARAM *p, void *d),
02025 void *d);
02032 int pvRunModalDialogScript(PARAM *p, int width, int height);
02036 int pvTerminateModalDialog(PARAM *p);
02040 int pvUpdateBaseWindow(PARAM *p);
02048 int pvUpdateBaseWindowOnOff(PARAM *p, int onoff);
02050
02059 int qpwSetCurveData(PARAM *p, int id, int c, int count, double *x, double *y);
02065 int qpwSetBufferedCurveData(PARAM *p, int id, int c);
02069 int qpwReplot(PARAM *p, int id);
02073 int qpwSetTitle(PARAM *p, int id, const char *text);
02077 int qpwSetCanvasBackground(PARAM *p, int id, int r, int g, int b);
02081 int qpwEnableOutline(PARAM *p, int id, int val);
02085 int qpwSetOutlinePen(PARAM *p, int id, int r, int g, int b);
02089 int qpwSetAutoLegend(PARAM *p, int id, int val);
02093 int qpwEnableLegend(PARAM *p, int id, int val);
02101 int qpwSetLegendPos(PARAM *p, int id, int pos);
02105 int qpwSetLegendFrameStyle(PARAM *p, int id, int style);
02109 int qpwEnableGridXMin(PARAM *p, int id);
02113 int qpwSetGridMajPen(PARAM *p, int id, int r, int g, int b, int style);
02117 int qpwSetGridMinPen(PARAM *p, int id, int r, int g, int b, int style);
02121 int qpwEnableAxis(PARAM *p, int id, int pos);
02125 int qpwSetAxisTitle(PARAM *p, int id, int pos, const char *text);
02130 int qpwSetAxisOptions(PARAM *p, int id, int pos, int val);
02134 int qpwSetAxisMaxMajor(PARAM *p, int id, int pos, int val);
02138 int qpwSetAxisMaxMinor(PARAM *p, int id, int pos, int val);
02142 int qpwInsertCurve(PARAM *p, int id, int index, const char *text);
02146 int qpwRemoveCurve(PARAM *p, int id, int index);
02151 int qpwSetCurvePen(PARAM *p, int id, int index, int r, int g, int b, int width=1, int style=SolidLine);
02156 int qpwSetCurveSymbol(PARAM *p, int id, int index, int symbol, int r1, int g1, int b1,
02157 int r2, int g2, int b2,
02158 int w, int h);
02163 int qpwSetCurveYAxis(PARAM *p, int id, int index, int pos);
02167 int qpwInsertMarker(PARAM *p, int id, int index);
02172 int qpwSetMarkerLineStyle(PARAM *p, int id, int index, int style);
02177 int qpwSetMarkerPos(PARAM *p, int id, int index, float x, float y);
02181 int qpwSetMarkerLabelAlign(PARAM *p, int id, int index, int align);
02186 int qpwSetMarkerPen(PARAM *p, int id, int index, int r, int g, int b, int style);
02191 int qpwSetMarkerLabel(PARAM *p, int id, int number, const char * text);
02196 int qpwSetMarkerFont(PARAM *p, int id, int index, const char *family, int size, int style);
02201 int qpwSetMarkerSymbol(PARAM *p, int id, int index, int symbol, int r1, int g1, int b1,
02202 int r2, int g2, int b2,
02203 int w, int h);
02208 int qpwInsertLineMarker(PARAM *p, int id, int index, const char *text, int pos);
02213 int qpwSetAxisScaleDraw( PARAM *p, int id, int pos, const char * text );
02215
02216
02217
02218
02225 int pvSetZoomX(PARAM *p, int id, float zoom);
02229 int pvSetZoomY(PARAM *p, int id, float zoom);
02233 int gWriteFile(const char *file);
02237 int gCloseFile();
02241 int gBeginDraw(PARAM *p, int id);
02245 int gBox(PARAM *p, int x, int y, int w, int h);
02249 int gRect(PARAM *p, int x, int y, int w, int h);
02253 int gEndDraw(PARAM *p);
02257 int gLineTo(PARAM *p, int x, int y);
02263 int gBufferedLine(PARAM *p);
02268 int gLine(PARAM *p, float *x, float *y, int n);
02272 int gMoveTo(PARAM *p, int x, int y);
02277 int gRightYAxis(PARAM *p, float start, float delta, float end, int draw);
02281 int gSetColor(PARAM *p, int r, int g, int b);
02285 int gSetWidth(PARAM *p, int w);
02289 int gSetStyle(PARAM *p, int style);
02294 int gDrawArc(PARAM *p, int x, int y, int w, int h, int start_angle, int angle_length);
02299 int gDrawPie(PARAM *p, int x, int y, int w, int h, int start_angle, int angle_length);
02304 int gDrawPolygon(PARAM *p, int *x, int *y, int n);
02308 int gSetFont(PARAM *p, const char *family, int size, int weight, int italic);
02312 int gSetLinestyle(PARAM *p, int style);
02317 int gText(PARAM *p, int x, int y, const char *text, int alignment);
02322 int gTextInAxis(PARAM *p, float x, float y, const char *text, int alignment);
02330 int gSetFloatFormat(PARAM *p, const char *text);
02335 int gXAxis(PARAM *p, float start, float delta, float end, int draw);
02340 int gYAxis(PARAM *p, float start, float delta, float end, int draw);
02344 int gXGrid(PARAM *p);
02348 int gYGrid(PARAM *p);
02354 int gBoxWithText(PARAM *p, int x, int y, int w, int h, int fontsize, const char *xlabel, const char *ylabel, const char *rylabel);
02358 int gComment(PARAM *p, const char *comment);
02364 int gPlaySVG(PARAM *p, const char *filename);
02368 int gSocketPlaySVG(PARAM *p, const char *svgstring);
02372 int gTranslate(PARAM *p, float x, float y);
02377 int gRotate(PARAM *p, float angle);
02381 int gScale(PARAM *p, float sx, float sy);
02383
02389 int qwtScaleSetTitle(PARAM *p, int id, const char *text);
02392 int qwtScaleSetTitleColor(PARAM *p, int id, int r, int g, int b);
02395 int qwtScaleSetTitleFont(PARAM *p, int id, const char *family, int pointsize, int bold, int italic, int underline, int strikeout);
02399 int qwtScaleSetTitleAlignment(PARAM *p, int id, int flags);
02402 int qwtScaleSetBorderDist(PARAM *p, int id, int start, int end);
02405 int qwtScaleSetBaselineDist(PARAM *p, int id, int bd);
02408 int qwtScaleSetScaleDiv(PARAM *p, int id, float lBound, float hBound, int maxMaj, int maxMin, int log, float step, int ascend);
02411 int qwtScaleSetLabelFormat(PARAM *p, int id, int f, int prec, int fieldWidth);
02415 int qwtScaleSetLabelAlignment(PARAM *p, int id, int align);
02418 int qwtScaleSetLabelRotation(PARAM *p, int id, float rotation);
02422 int qwtScaleSetPosition(PARAM *p, int id, int position);
02430 int qwtThermoSetScale(PARAM *p, int id, float min, float max, float step, int logarithmic);
02435 int qwtThermoSetOrientation(PARAM *p, int id, int orientation, int position);
02438 int qwtThermoSetBorderWidth(PARAM *p, int id, int width);
02441 int qwtThermoSetFillColor(PARAM *p, int id, int r, int g, int b);
02444 int qwtThermoSetAlarmColor(PARAM *p, int id, int r, int g, int b);
02447 int qwtThermoSetAlarmLevel(PARAM *p, int id, float level);
02450 int qwtThermoSetAlarmEnabled(PARAM *p, int id, int tf);
02453 int qwtThermoSetPipeWidth(PARAM *p, int id, int width);
02456 int qwtThermoSetRange(PARAM *p, int id, float vmin, float vmax);
02459 int qwtThermoSetMargin(PARAM *p, int id, int margin);
02462 int qwtThermoSetValue(PARAM *p, int id, float value);
02470 int qwtKnobSetScale(PARAM *p, int id, float min, float max, float step, int logarithmic);
02473 int qwtKnobSetMass(PARAM *p, int id, float mass);
02477 int qwtKnobSetOrientation(PARAM *p, int id, int orientation);
02481 int qwtKnobSetReadOnly(PARAM *p, int id, int rdonly);
02484 int qwtKnobSetKnobWidth(PARAM *p, int id, int width);
02487 int qwtKnobSetTotalAngle(PARAM *p, int id, float angle);
02490 int qwtKnobSetBorderWidth(PARAM *p, int id, int width);
02494 int qwtKnobSetSymbol(PARAM *p, int id, int symbol);
02497 int qwtKnobSetValue(PARAM *p, int id, float value);
02504 int qwtCounterSetStep(PARAM *p, int id, float step);
02507 int qwtCounterSetMinValue(PARAM *p, int id, float value);
02510 int qwtCounterSetMaxValue(PARAM *p, int id, float value);
02513 int qwtCounterSetStepButton1(PARAM *p, int id, int n);
02516 int qwtCounterSetStepButton2(PARAM *p, int id, int n);
02519 int qwtCounterSetStepButton3(PARAM *p, int id, int n);
02522 int qwtCounterSetNumButtons(PARAM *p, int id, int n);
02526 int qwtCounterSetIncSteps(PARAM *p, int id, int button, int n);
02529 int qwtCounterSetValue(PARAM *p, int id, float value);
02536 int qwtWheelSetMass(PARAM *p, int id, float mass);
02540 int qwtWheelSetOrientation(PARAM *p, int id, int orientation);
02544 int qwtWheelSetReadOnly(PARAM *p, int id, int rdonly);
02547 int qwtWheelSetTotalAngle(PARAM *p, int id, float angle);
02550 int qwtWheelSetTickCnt(PARAM *p, int id, int cnt);
02553 int qwtWheelSetViewAngle(PARAM *p, int id, float angle);
02556 int qwtWheelSetInternalBorder(PARAM *p, int id, int width);
02559 int qwtWheelSetWheelWidth(PARAM *p, int id, int width);
02562 int qwtWheelSetValue(PARAM *p, int id, float value);
02570 int qwtSliderSetScale(PARAM *p, int id, float min, float max, float step, int logarithmic);
02573 int qwtSliderSetMass(PARAM *p, int id, float mass);
02577 int qwtSliderSetOrientation(PARAM *p, int id, int orientation);
02581 int qwtSliderSetReadOnly(PARAM *p, int id, int rdonly);
02585 int qwtSliderSetBgStyle(PARAM *p, int id, int style);
02588 int qwtSliderSetScalePos(PARAM *p, int id, int pos);
02591 int qwtSliderSetThumbLength(PARAM *p, int id, int length);
02594 int qwtSliderSetThumbWidth(PARAM *p, int id, int width);
02597 int qwtSliderSetBorderWidth(PARAM *p, int id, int width);
02600 int qwtSliderSetMargins(PARAM *p, int id, int x, int y);
02603 int qwtSliderSetValue(PARAM *p, int id, float value);
02610 int qwtCompassSetSimpleCompassRose(PARAM *p, int id, int numThorns, int numThornLevels, float width=0.2f);
02613 int qwtCompassSetMass(PARAM *p, int id, float mass);
02617 int qwtCompassSetReadOnly(PARAM *p, int id, int rdonly);
02621 int qwtCompassSetFrameShadow(PARAM *p, int id, int shadow);
02624 int qwtCompassShowBackground(PARAM *p, int id, int show);
02627 int qwtCompassSetLineWidth(PARAM *p, int id, int width);
02631 int qwtCompassSetMode(PARAM *p, int id, int mode);
02634 int qwtCompassSetWrapping(PARAM *p, int id, int wrap);
02637 int qwtCompassSetScale(PARAM *p, int id, int maxMajIntv, int maxMinIntv, float step);
02640 int qwtCompassSetScaleArc(PARAM *p, int id, float min, float max);
02643 int qwtCompassSetOrigin(PARAM *p, int id, float o);
02652 int qwtCompassSetNeedle(PARAM *p, int id, int which, int r1=0, int g1=0, int b1=0, int r2=255, int g2=255, int b2=255, int r3=128, int g3=128, int b3=128);
02655 int qwtCompassSetValue(PARAM *p, int id, float value);
02657
02664 float unit(PARAM *p, float val, int conversion);
02666
02667 #endif
02668
02669
02670