dimensoes.janela {ArvoRe} | R Documentation |
~~ A concise (1-5 lines) description of what the function does. ~~
dimensoes.janela(janela, height, width)
janela |
~~Describe janela here~~ |
height |
~~Describe height here~~ |
width |
~~Describe width here~~ |
~~ If necessary, more details than the description above ~~
~Describe the value returned If it is a LIST, use
comp1 |
Description of 'comp1' |
comp2 |
Description of 'comp2' |
...
....
~~further notes~~
~Make other sections like Warning with section{Warning }{....} ~
~~who you are~~
~put references to the literature/web site here ~
~~objects to See Also as help
, ~~~
##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. ## The function is currently defined as function(janela, height, width) { MAX.height <- as.integer( tclvalue( tkwinfo("screenheight", janela) ) ) MAX.width <- as.integer( tclvalue( tkwinfo("screenwidth", janela) ) ) wm.x <- as.integer( tclvalue( tkwinfo("x", janela) ) ) wm.y <- as.integer( tclvalue( tkwinfo("y", janela) ) ) if( height > MAX.height ) height <- MAX.height if( width > MAX.width ) width <- MAX.width limite.sup.x <- round( MAX.width - width ) limite.inf.x <- round( width ) limite.sup.y <- round( MAX.height - height ) limite.sup.y <- round( height ) # Limitantes para o tamanho da tela. Quem tem tela virtural... #$%#$% if (wm.x > limite.sup.x) wm.x <- limite.sup.x if (wm.x < limite.inf.x) wm.x <- limite.inf.x if (wm.y > limite.sup.y) wm.y <- limite.sup.y if (wm.y > limite.sup.y) wm.y <- limite.sup.y posicao <- paste(width, "x", height, "+", wm.x,"+", wm.y, sep="") tkwm.geometry(janela,posicao) }