Nothing
inpbox_reaction_formulation <-function(DBpp,inp){
table<-gtkTable(rows=8,columns=7,homogeneous=FALSE)
diag_label<-gtkVBox()
labelgp<-list()
labelgp$t1<-gtkLabel('Monomer ')
labelgp$t2<-gtkLabel('Initiator ')
labelgp$t3<-gtkLabel('Solvent ')
labelgp$t4<-gtkLabel('Inhibitor ')
labelgp$t5<-gtkLabel('CT Agent ')
labelgp$t6<-gtkLabel('CCT Agent ')
sapply(labelgp,diag_label$packStart)
diag_label1<-gtkVBox()
labelgp1<-list()
labelgp1$t1<-gtkLabel(' Amount (kg)')
labelgp1$t2<-gtkLabel(' Amount (kg)')
labelgp1$t3<-gtkLabel(' Amount (kg)')
labelgp1$t4<-gtkLabel(' Amount (kg)')
labelgp1$t5<-gtkLabel(' Amount (kg)')
labelgp1$t6<-gtkLabel(' Amount (kg)')
sapply(labelgp1,diag_label1$packStart)
diag_entry<-gtkVBox()
entrygp<-list()
entrygp$e1<-gtkEntryNew()
entrygp$e1$SetText(inp[1,2])
entrygp$e2<-gtkEntryNew()
entrygp$e2$SetText(inp[2,2])
entrygp$e3<-gtkEntryNew()
entrygp$e3$SetText(inp[3,2])
entrygp$e4<-gtkEntryNew()
entrygp$e4$SetText(inp[4,2])
entrygp$e5<-gtkEntryNew()
entrygp$e5$SetText(inp[5,2])
entrygp$e6<-gtkEntryNew()
entrygp$e6$SetText(inp[6,2])
sapply(entrygp,diag_entry$packStart)
diag_combo<-gtkVBox()
combogp<-list()
combogp$c1<-gtkComboBoxNewText()
sapply(c('None',as.character(DBpp$name[DBpp$type=='M'])),combogp$c1$appendText)
combogp$c1$SetActive(inp[1,1])
combogp$c2<-gtkComboBoxNewText()
sapply(c('None',as.character(DBpp$name[DBpp$type=='I'])),combogp$c2$appendText)
combogp$c2$SetActive(inp[2,1])
combogp$c3<-gtkComboBoxNewText()
sapply(c('None',as.character(DBpp$name[DBpp$type=='S'])),combogp$c3$appendText)
combogp$c3$SetActive(inp[3,1])
combogp$c4<-gtkComboBoxNewText()
sapply(c('None',as.character(DBpp$name[DBpp$type=='H'])),combogp$c4$appendText)
combogp$c4$SetActive(inp[4,1])
combogp$c5<-gtkComboBoxNewText()
sapply(c('None',as.character(DBpp$name[DBpp$type=='T'])),combogp$c5$appendText)
combogp$c5$SetActive(inp[5,1])
combogp$c6<-gtkComboBoxNewText()
sapply(c('None',as.character(DBpp$name[DBpp$type=='C'])),combogp$c6$appendText)
combogp$c6$SetActive(inp[6,1])
sapply(combogp,diag_combo$packStart)
submit_hbox<-gtkHBox()
button_ok<-gtkButton("OK")
button_canc<-gtkButton("Cancel")
submit_hbox$packStart(button_ok,expand=TRUE)
submit_hbox$packEnd(button_canc,expand=TRUE)
gSignalConnect(button_ok,"clicked",f=function(button_ok){
button_ok$setData('ans',
data.frame(
ing=as.numeric(c(
combogp$c1$getActive(),combogp$c2$getActive(),combogp$c3$getActive(),combogp$c4$getActive(),combogp$c5$getActive(),combogp$c6$getActive())),
qta=as.numeric(c(
entrygp$e1$getText(),entrygp$e2$getText(),entrygp$e3$getText(),entrygp$e4$getText(),entrygp$e5$getText(),entrygp$e6$getText()))
)
)
gtkMainQuit()
}
)
gSignalConnect(button_canc,"clicked",f=function(button_canc){
button_ok$setData('ans',NULL)
gtkMainQuit()
}
)
diag_align<-gtkAlignment(xalign=0)
diag_align$add(diag_label)
diag_align1<-gtkAlignment(xalign=0)
diag_align1$add(diag_entry)
diag_align2<-gtkAlignment(xalign=0)
diag_align2$add(diag_combo)
diag_align3<-gtkAlignment(xalign=0)
diag_align3$add(diag_label1)
table$attach(diag_align,left.attach=0,1,top.attach=1,2,xoptions=c('expand','fill'),yoptions=c('expand','fill'))
table$attach(diag_align2,left.attach=2,3,top.attach=1,2,xoptions=c('expand','fill'),yoptions=c('expand','fill'))
table$attach(diag_align1,left.attach=4,5,top.attach=1,2,xoptions=c('expand','fill'),yoptions=c('expand','fill'))
table$attach(diag_align3,left.attach=5,6,top.attach=1,2,xoptions=c('expand','fill'),yoptions=c('expand','fill'))
table$attach(submit_hbox,left.attach=0,6,top.attach=7,8,xoptions=c('expand','fill'),yoptions=c('expand','fill'))
table$setColSpacing(0,5)
window<-gtkWindow(show=FALSE)
window['border-width']<-14
window$setTitle('Formulation Input')
window$SetDeletable(FALSE)
window$SetResizable(FALSE)
window$add(table)
window$showAll()
gtkMain()
ans<-button_ok$GetData('ans')
window$Destroy()
return(ans)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.