MasterX-ovDM README
MasterX-ovDM for Leopard
How to compile
MasterX on Ubuntu Linux
MasterX Online Virtual Dimension Manager for Kubuntu 8.10 deb
MAsterX-ovDM Demo 1.0
-----------------------------------------------
What is MasterX ?
MasterX is a interactive application for Python.
It contains a embedded Python Interpreter and Multi-Dimensional
User Interface for creating Python Applications.
What is in Version 1.0 ?
This is a Demo Release, so not all the features are complete, but
the basic functionality is there. You can create dimensions, windows
assign skins, draw and process input.
When you first open the system, log in with
user: Jared
pass: masterx
case sensitive
then go to the menu, User->change user/pass
and create your own user name and password.
------------------------------------------------
Supported Platforms:
Mac OS X Leopard ( Intel )
Linux
FreeBSD
Program Controls
Controls:
Shift + Escape (Quick Quit)
LEFT ALT + CTRL + UP (Restore all Window)
LEFT ALT + CTRL+ DOWN (minimize all Windows)
LEFT SHIFT + LEFT (shift left one dimension)
LEFT SHIFT + RIGHT (shift right one dimension)
Left Alt + Left ShiftB (shift focus order of widgets)
F1 ( jump to Console Dimension )
F2 (take a screen shot)
CTRL+SHHIFT+UP (Restore all Windows )
CTRL+SHIFT+DOWN (Minimize all windows)
Click near the top of the screen to show the system menu
import masterx
in interactive session ( Dimensions -> Console ) to gain access to versions of libmxui classes
exported in python. ( Still in progress ).
program arguments:
--width=W
--width=H
W is width in pixels
H is height in pixels
example
./masterx --width=1280 --height=1024
when no arguments are given, defaults to 1024x768
--log=true
will send stdout log information to a file called system.log
versus printing to the standard output stream.
Python Feature Log:
in the shell:
masterx moudle classes
first:
import masterx
masterx classes so far as of Wed Oct 1 17:42:50 PDT 2008
masterx window classes:
creating a window:
win = masterx.mxWin("Title", x_cord, y_cord, width, height)
setting a skin:
win.useskin("img/skins/mx/black")
set window title:
win.settitle(" title ")
set position:
win.setpos(x,y)
set size:
win.setsize(width,height)
callbacks:
drawing
first set the objects name
win.setcallback("win")
second assign it a render callback
def render_callback():
# whatever you want here
win.fillrect(0,0,640,480,255,255,255)
assign input processing callbacks
def keydown(key):
print "key pressed: " + str(key) + " !"
win.keydown = keydown
other input processing callbacks
win.keyup
win.mousemove
win.mousedown
win.mouseup
soon child control callbacks will be added
filling a rectangle:
win.fillrect(x,y,width,height, red,green,blue)
setting a pixel:
first you must lock the surface:
win.lock()
then set the pixels:
win.setpixel(x,y,red,green,blue)
then when finished unlock the surface:
win.unlock()
exiting the program safeely (releasing all resources)
win.bail()
adding graphics to your window:
surf = masterx.mxSurf()
loading images from disk:
surf.loadpng("surf.png")
surf.load("surf.bmp")
freeing resources:
surf.release()
copying to a window:
win.copysurf(surf, 0, 0, 1024, 768)
resize copy
win.copyresizesurf(surf, 0, 0, 1280, 1024)
creating a dimension for your window:
dim = masterx.mxDim()
adding the dimension to list of dimensions:
dim.add()
adding your window to the dimension:
dim.add(win)
other dimension functions:
set background color:
dim.setbgcolor(r,g,b)
set background image:
dim.setbackground("image.png")
system output classes (stdout, stderr):
setting the font:
sys.stdout.setfont("font")
setting the font color:
sys.stdout.setcolor(red,green,blue)
IN PROGRESS MAY CHANGE OR UPDATE
CALLING SCRIPTS FROM THE SHELL:
PYTHONPATH
PYTHONPATH must point to the scripts directory
I have included a handy shell script called RunMasterX
which you can use to start the program and it will set the varaibles for you
so instead of running
./masterx
run
./RunMasterX
Write your pytthon script and place it in the scripts directory
in the shell type
if you script is called myscript:
from myscript import *
then it should execute without namspace errors
I am still working on getting all the controls
and call backs working it will take some time so be patient
Good Luck and thank you for taking interest in this project
- { Jared, Bruni };