The slot functions are contained in a header file included by "mask<X>". This are the functions you have to fill out in order to code your own logic. Many usefull slot functions will be listed within this documentation. These templates you may use to Copy&Paste predefined solutions into your own pvserver.
DATA will define your local data structure for your mask. This may be compared to the private data of a C++ class, although it is expressed in ANSI C.
slot<X> will handle the events that occur. Within slot<X> you may evaluate the names of the widgets, that are listed in the enum of mask<X>.
//############################################################### //# mask1_slots.h for ProcessViewServer created: Di Okt 6 11:25:46 2009 //# please fill out these slots //# here you find all possible events //# Yours: Lehrig Software Engineering //############################################################### // todo: uncomment me if you want to use this data aquisiton // also uncomment this classes in main.cpp and pvapp.h // also remember to uncomment rllib in the project file //extern rlModbusClient modbus; //extern rlSiemensTCPClient siemensTCP; //extern rlPPIClient ppi; typedef struct // (todo: define your data structure here) { } DATA; static int slotInit(PARAM *p, DATA *d) { if(p == NULL || d == NULL) return -1; //memset(d,0,sizeof(DATA)); return 0; } static int slotNullEvent(PARAM *p, DATA *d) { if(p == NULL || d == NULL) return -1; return 0; } static int slotButtonEvent(PARAM *p, int id, DATA *d) { if(p == NULL || id == 0 || d == NULL) return -1; return 0; } static int slotButtonPressedEvent(PARAM *p, int id, DATA *d) { if(p == NULL || id == 0 || d == NULL) return -1; return 0; } static int slotButtonReleasedEvent(PARAM *p, int id, DATA *d) { if(p == NULL || id == 0 || d == NULL) return -1; return 0; } static int slotTextEvent(PARAM *p, int id, DATA *d, const char *text) { if(p == NULL || id == 0 || d == NULL || text == NULL) return -1; return 0; } static int slotSliderEvent(PARAM *p, int id, DATA *d, int val) { if(p == NULL || id == 0 || d == NULL || val < -1000) return -1; return 0; } static int slotCheckboxEvent(PARAM *p, int id, DATA *d, const char *text) { if(p == NULL || id == 0 || d == NULL || text == NULL) return -1; return 0; } static int slotRadioButtonEvent(PARAM *p, int id, DATA *d, const char *text) { if(p == NULL || id == 0 || d == NULL || text == NULL) return -1; return 0; } static int slotGlInitializeEvent(PARAM *p, int id, DATA *d) { if(p == NULL || id == 0 || d == NULL) return -1; return 0; } static int slotGlPaintEvent(PARAM *p, int id, DATA *d) { if(p == NULL || id == 0 || d == NULL) return -1; return 0; } static int slotGlResizeEvent(PARAM *p, int id, DATA *d, int width, int height) { if(p == NULL || id == 0 || d == NULL || width < 0 || height < 0) return -1; return 0; } static int slotGlIdleEvent(PARAM *p, int id, DATA *d) { if(p == NULL || id == 0 || d == NULL) return -1; return 0; } static int slotTabEvent(PARAM *p, int id, DATA *d, int val) { if(p == NULL || id == 0 || d == NULL || val < -1000) return -1; return 0; } static int slotTableTextEvent(PARAM *p, int id, DATA *d, int x, int y, const char *text) { if(p == NULL || id == 0 || d == NULL || x < -1000 || y < -1000 || text == NULL) return -1; return 0; } static int slotTableClickedEvent(PARAM *p, int id, DATA *d, int x, int y, int button) { if(p == NULL || id == 0 || d == NULL || x < -1000 || y < -1000 || button < 0) return -1; return 0; } static int slotSelectionEvent(PARAM *p, int id, DATA *d, int val, const char *text) { if(p == NULL || id == 0 || d == NULL || val < -1000 || text == NULL) return -1; return 0; } static int slotClipboardEvent(PARAM *p, int id, DATA *d, int val) { if(p == NULL || id == 0 || d == NULL || val < -1000) return -1; return 0; } static int slotRightMouseEvent(PARAM *p, int id, DATA *d, const char *text) { if(p == NULL || id == 0 || d == NULL || text == NULL) return -1; //pvPopupMenu(p,-1,"Menu1,Menu2,,Menu3"); return 0; } static int slotKeyboardEvent(PARAM *p, int id, DATA *d, int val, int modifier) { if(p == NULL || id == 0 || d == NULL || val < -1000 || modifier < -1000) return -1; return 0; } static int slotMouseMovedEvent(PARAM *p, int id, DATA *d, float x, float y) { if(p == NULL || id == 0 || d == NULL || x < -1000 || y < -1000) return -1; return 0; } static int slotMousePressedEvent(PARAM *p, int id, DATA *d, float x, float y) { if(p == NULL || id == 0 || d == NULL || x < -1000 || y < -1000) return -1; return 0; } static int slotMouseReleasedEvent(PARAM *p, int id, DATA *d, float x, float y) { if(p == NULL || id == 0 || d == NULL || x < -1000 || y < -1000) return -1; return 0; } static int slotMouseOverEvent(PARAM *p, int id, DATA *d, int enter) { if(p == NULL || id == 0 || d == NULL || enter < -1000) return -1; return 0; } static int slotUserEvent(PARAM *p, int id, DATA *d, const char *text) { if(p == NULL || id == 0 || d == NULL || text == NULL) return -1; return 0; }