-------------------------------------------------------------------------------------- -- this file is generated by pvdevelop. DO NOT EDIT !!! -------------------------------------------------------------------------------------- function showMask1(p) --- begin variables that are private to this mask ---------------------------------- iarray = pv.IntegerArray() -- see pv.getIntegers(text,iarray) below farray = pv.FloatArray() -- see pv.getFloats(text,farray) below --- begin construction of our mask ------------------------------------------------- ID_MAIN_WIDGET = 0 button1 = 1 button2 = 2 button3 = 3 button4 = 4 label1 = 5 label2 = 6 label3 = 7 label4 = 8 svg1 = 9 table1 = 10 ID_END_OF_WIDGETS = 11 toolTip = {} toolTip[0] = "" toolTip[1] = "" toolTip[2] = "" toolTip[3] = "" toolTip[4] = "" toolTip[5] = "" toolTip[6] = "" toolTip[7] = "" toolTip[8] = "" toolTip[9] = "" toolTip[10] = "" whatsThis = {} whatsThis[0] = "" whatsThis[1] = "" whatsThis[2] = "" whatsThis[3] = "" whatsThis[4] = "" whatsThis[5] = "" whatsThis[6] = "" whatsThis[7] = "" whatsThis[8] = "" whatsThis[9] = "test1.svg" whatsThis[10] = "" widgetType = {} widgetType[0] = pv.TQWidget widgetType[1] = pv.TQPushButton widgetType[2] = pv.TQPushButton widgetType[3] = pv.TQPushButton widgetType[4] = pv.TQPushButton widgetType[5] = pv.TQLabel widgetType[6] = pv.TQLabel widgetType[7] = pv.TQLabel widgetType[8] = pv.TQLabel widgetType[9] = pv.TQDraw widgetType[10] = pv.TQTable pv.pvStartDefinition(p,ID_END_OF_WIDGETS) pv.pvQPushButton(p,button1,0) pv.pvSetGeometry(p,button1,15,25,100,30) pv.pvSetText(p,button1,"Out 1") pv.pvSetFont(p,button1,"Sans Serif",10,0,0,0,0) pv.pvQPushButton(p,button2,0) pv.pvSetGeometry(p,button2,15,60,100,30) pv.pvSetText(p,button2,"Out 2") pv.pvSetFont(p,button2,"Sans Serif",10,0,0,0,0) pv.pvQPushButton(p,button3,0) pv.pvSetGeometry(p,button3,15,95,100,30) pv.pvSetText(p,button3,"Out 3") pv.pvSetFont(p,button3,"Sans Serif",10,0,0,0,0) pv.pvQPushButton(p,button4,0) pv.pvSetGeometry(p,button4,15,130,100,30) pv.pvSetText(p,button4,"Out 4") pv.pvSetFont(p,button4,"Sans Serif",10,0,0,0,0) pv.pvQLabel(p,label1,0) pv.pvSetGeometry(p,label1,135,25,100,30) pv.pvSetText(p,label1,"bit4") pv.pvSetFont(p,label1,"Sans Serif",10,0,0,0,0) pv.pvQLabel(p,label2,0) pv.pvSetGeometry(p,label2,135,60,100,30) pv.pvSetText(p,label2,"bit5") pv.pvSetFont(p,label2,"Sans Serif",10,0,0,0,0) pv.pvQLabel(p,label3,0) pv.pvSetGeometry(p,label3,135,95,100,30) pv.pvSetText(p,label3,"bit6") pv.pvSetFont(p,label3,"Sans Serif",10,0,0,0,0) pv.pvQLabel(p,label4,0) pv.pvSetGeometry(p,label4,135,130,100,30) pv.pvSetText(p,label4,"bit7") pv.pvSetFont(p,label4,"Sans Serif",10,0,0,0,0) pv.pvQDraw(p,svg1,0) pv.pvSetGeometry(p,svg1,275,10,635,450) pv.pvSetFont(p,svg1,"Sans Serif",10,0,0,0,0) pv.pvSetWhatsThis(p,svg1,"test1.svg") pv.pvQTable(p,table1,0,2,2) pv.pvSetGeometry(p,table1,5,170,265,290) pv.pvSetFont(p,table1,"Sans Serif",10,0,0,0,0) pv.pvEndDefinition(p); --- end construction of our mask --------------------------------------------------- --- end variables that are private to this mask ------------------------------------ dofile("mask1_slots.lua") -- include our slot functions if trace == 1 then print("show mask1") end pv.pvClearMessageQueue(p) -- clear all pending events ret = slotInit(p) -- intitialize our variables if ret ~= 0 then return ret end -- return number of next mask to call while(1) -- event loop do event = pv.pvGetEvent(p) -- get the next event result = pv.pvParseEventStruct(p,event) -- parse the event id = result.event i = result.i text = result.text -- now call the according slot function if id == pv.NULL_EVENT then ret = slotNullEvent(p) elseif id == pv.BUTTON_EVENT then if trace==1 then print("BUTTON_EVENT id=", i) end ret = slotButtonEvent(p,i) elseif id == pv.BUTTON_PRESSED_EVENT then if trace == 1 then print("BUTTON_PRESSED_EVENT id=",i) end ret=slotButtonPressedEvent(p,i) elseif id == pv.BUTTON_RELEASED_EVENT then if trace == 1 then print("BUTTON_RELEASED_EVENT id=",i) end ret=slotButtonReleasedEvent(p,i) elseif id == pv.TEXT_EVENT then if trace == 1 then print("TEXT_EVENT id=",i," text=",text) end ret=slotTextEvent(p,i,text) elseif id == pv.SLIDER_EVENT then pv.getIntegers(text,iarray) if trace == 1 then print("SLIDER_EVENT val=",iarray.i0) end ret=slotSliderEvent(p,i,iarray.i0) elseif id == pv.CHECKBOX_EVENT then if trace == 1 then print("CHECKBOX_EVENT id=",i," text=",text) end ret=slotCheckboxEvent(p,i,text) elseif id == pv.RADIOBUTTON_EVENT then if trace == 1 then print("RADIOBUTTON_EVENT id=",i," text=",text) end ret=slotRadioButtonEvent(p,i,text) elseif id == pv.GL_INITIALIZE_EVENT then if trace == 1 then print("you have to call initializeGL()") end ret=slotGlInitializeEvent(p,i) elseif id == pv.GL_PAINT_EVENT then if trace == 1 then print("you have to call paintGL()") end ret=slotGlPaintEvent(p,i) elseif id == pv.GL_RESIZE_EVENT then pv.getIntegers(text,iarray) if trace == 1 then print("you have to call resizeGL(w,h)") end ret=slotGlResizeEvent(p,i,iarray.i0,iarray.i1) elseif id == pv.GL_IDLE_EVENT then ret=slotGlIdleEvent(p,i) elseif id == pv.TAB_EVENT then pv.getIntegers(text,iarray) if trace == 1 then print("TAB_EVENT id=",i,"page=",iarray.i0) end ret=slotTabEvent(p,i,iarray.i0) elseif id == pv.TABLE_TEXT_EVENT then pv.getIntegers(text,iarray) pv.pvlock(p) str1 = pv.getTextFromText(text) pv.pvunlock(p) if trace == 1 then print("TABLE_TEXT_EVENT id=",i," x=",iarray.i0," y=",iarray.i1," text=",str1) end ret=slotTableTextEvent(p,i,iarray.i0,iarray.i1,str1) elseif id == pv.TABLE_CLICKED_EVENT then pv.getIntegers(text,iarray) if trace == 1 then print("TABLE_CLICKED_EVENT id=",i," x=",iarray.i0," y=",iarray.i1," button=",iarray.i2) end ret=slotTableClickedEvent(p,i,iarray.i0,iarray.i1,iarray.i2) elseif id == pv.SELECTION_EVENT then pv.getIntegers(text,iarray) pv.pvlock(p) str1 = pv.getTextFromText(text) pv.pvunlock(p) if trace == 1 then print("SELECTION_EVENT id=",i," column=",iarray.i0," text=",str1) end ret=slotSelectionEvent(p,i,iarray.i0,str1) elseif id == pv.CLIPBOARD_EVENT then pv.getIntegers(text,iarray) if trace == 1 then print("CLIPBOARD_EVENT id=",iarray.i0) end if trace == 1 then print("clipboard = ",p.clipboard) end ret=slotClipboardEvent(p,i,iarray.i0) elseif id == pv.RIGHT_MOUSE_EVENT then if trace == 1 then print("RIGHT_MOUSE_EVENT id=",i," text=",text) end ret=slotRightMouseEvent(p,i,text) elseif id == pv.KEYBOARD_EVENT then pv.getIntegers(text,iarray) if trace == 1 then print("KEYBOARD_EVENT modifier=",i," key=",iarray.i0) end ret=slotKeyboardEvent(p,i,iarray.i0,i) elseif id == pv.PLOT_MOUSE_MOVED_EVENT then pv.getFloats(text,farray) if trace == 1 then print("PLOT_MOUSE_MOVE ",farray.f0,farray.f1) end ret=slotMouseMovedEvent(p,i,farray.f0,farray.f1) elseif id == pv.PLOT_MOUSE_PRESSED_EVENT then pv.getFloats(text,farray) if trace == 1 then print("PLOT_MOUSE_PRESSED ",farray.f0,farray.f1) end ret=slotMousePressedEvent(p,i,farray.f0,farray.f1) elseif id == pv.PLOT_MOUSE_RELEASED_EVENT then pv.getFloats(text,farray) if trace == 1 then print("PLOT_MOUSE_RELEASED ",farray.f0,farray.f1) end ret=slotMouseReleasedEvent(p,i,farray.f0,farray.f1) elseif id == pv.MOUSE_OVER_EVENT then pv.getIntegers(text,iarray) if trace == 1 then print("MOUSE_OVER_EVENT ",iarray.i0) end ret=slotMouseOverEvent(p,i,iarray.i0) elseif id == pv.USER_EVENT then if trace == 1 then print("USER_EVENT id=",i," text=",text) end ret=slotUserEvent(p,i,text) else if trace == 1 then print("UNKNOWN_EVENT id=",i," text=",text) end ret = 0 end if ret ~= 0 then return ret end -- return number of next mask to call end -- end of event loop return 0 -- never come here end