September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -1,5 +0,0 @@
browser Browser{};
bvh int = browser.getViewportHeight();
bvw int = browser.getViewportWidth();
SysLib.writeStdout("ViewportHeight: " + bvh);
SysLib.writeStdout("ViewportWidth: " + bvw);

View file

@ -1,2 +0,0 @@
FMain.Maximized = True
FMain.Visible = False ' The form can be invisible

View file

@ -1,7 +0,0 @@
PUBLIC SUB _new()
END
PUBLIC SUB Form_Open()
END

View file

@ -1,3 +0,0 @@
PUBLIC SUB Form_Resize()
PRINT "The maximum window size that can be used without scrolling is "; FMain.Width; " x "; FMain.Height
END

View file

@ -1,2 +0,0 @@
FMain.Maximized = True
FMain.Visible = False ' The form can be invisible

View file

@ -1,7 +0,0 @@
PUBLIC SUB _new()
END
PUBLIC SUB Form_Open()
END

View file

@ -1,3 +0,0 @@
PUBLIC SUB Form_Resize()
PRINT "The maximum window size that can be used without scrolling is "; FMain.Width; " x "; FMain.Height
END

View file

@ -0,0 +1,6 @@
Public Sub Form_Open()
Print Desktop.Width
Print Desktop.Height
End

View file

@ -0,0 +1,35 @@
DEF Win:WINDOW
DEF Close:CHAR
DEF ScreenSizeX,ScreenSizeY:UINT
DEF L,T,ClientWidth,ClientHeight:INT
GETSCREENSIZE(ScreenSizeX,ScreenSizeY)
OPENWINDOW Win,0,0,ScreenSizeX,ScreenSizeY,@MAXBOX|@MINBOX|@SIZE|@MAXIMIZED,NULL,"Get client area",&MainHandler
'Left and top are always zero for this function.
GETCLIENTSIZE (Win,L,T,ClientWidth,ClientHeight)
PRINT Win,"Maximum drawing area values: width is"+STR$(ClientWidth)+" and height is"+STR$(ClientHeight)+"."
WAITUNTIL Close=1
CLOSEWINDOW WIN
END
SUB MainHandler
SELECT @MESSAGE
CASE @IDCLOSEWINDOW
Close=1
ENDSELECT
RETURN
ENDSUB
Output: Maximum drawing area values: width is 1280 and height is 749.

View file

@ -0,0 +1,24 @@
// version 1.1
import java.awt.Toolkit
import javax.swing.JFrame
class Test : JFrame() {
init {
val r = Regex("""\[.*\]""")
val toolkit = Toolkit.getDefaultToolkit()
val screenSize = toolkit.screenSize
println("Physical screen size : ${formatOutput(screenSize, r)}")
val insets = toolkit.getScreenInsets(graphicsConfiguration)
println("Insets : ${formatOutput(insets, r)}")
screenSize.width -= (insets.left + insets.right)
screenSize.height -= (insets.top + insets.bottom)
println("Max available : ${formatOutput(screenSize, r)}")
}
private fun formatOutput(output: Any, r: Regex) = r.find(output.toString())!!.value.replace(",", ", ")
}
fun main(args: Array<String>) {
Test()
}

View file

@ -1,7 +0,0 @@
import
gtk2, gdk2
nimrod_init()
var w = gdk2.screen_width()
var h = gdk2.screen_height()
echo("WxH=",w,"x",h)

View file

@ -0,0 +1,15 @@
include pGUI.e
IupOpen()
string scrnFullSize = IupGetGlobal("FULLSIZE")
string scrnSize = IupGetGlobal("SCREENSIZE")
string scrnMInfo = IupGetGlobal("MONITORSINFO")
string scrnVScreen = IupGetGlobal("VIRTUALSCREEN")
Ihandle dlg = IupDialog(NULL,"SIZE=FULL")
string scrnXSize = IupGetAttribute(dlg,"MAXSIZE")
?{scrnFullSize, scrnSize, scrnMInfo, scrnVScreen, scrnXSize}
IupClose()

View file

@ -0,0 +1,10 @@
#!/usr/bin/env python3
import tkinter as tk # import the module.
root = tk.Tk() # Create an instance of the class.
root.state('zoomed') # Maximized the window.
root.update_idletasks() # Update the display.
tk.Label(root, text=(str(root.winfo_width())+ " x " +str(root.winfo_height())),
font=("Helvetica", 25)).pack() # add a label and set the size to text.
root.mainloop()