dimensoes.janela {ArvoRe}R Documentation

~~function to do ... ~~

Description

~~ A concise (1-5 lines) description of what the function does. ~~

Usage

dimensoes.janela(janela, height, width)

Arguments

janela ~~Describe janela here~~
height ~~Describe height here~~
width ~~Describe width here~~

Details

~~ If necessary, more details than the description above ~~

Value

~Describe the value returned If it is a LIST, use

comp1 Description of 'comp1'
comp2 Description of 'comp2'

...

Warning

....

Note

~~further notes~~

~Make other sections like Warning with section{Warning }{....} ~

Author(s)

~~who you are~~

References

~put references to the literature/web site here ~

See Also

~~objects to See Also as help, ~~~

Examples

##---- 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)
  }

[Package ArvoRe version 0.1.6 Index]