Ejemplo n.º 1
0
def main (argv=None):
    if not argv: argv = sys.argv

    cfg = conf.Cfg()
    cfg.toolkit = 'gtk'

    gui.load(cfg).enter_loop()

    return 0
Ejemplo n.º 2
0
def main(argv=None):
    if not argv: argv = sys.argv

    cfg = conf.Cfg()
    cfg.toolkit = 'gtk'

    gui.load(cfg).enter_loop()

    return 0
Ejemplo n.º 3
0
    def __init__(self, master, *args, **kwargs):

        Frame.__init__(self, master, *args, **kwargs)

        self.master = master
        self.master.minsize(500, 300)
        self.master.maxsize(500, 300)
        func.center_window(self, 500, 300)
        self.master.title("Dan's phonebook demo")
        self.master.configure(bg="#F0F0F0")
        self.master.protocol("WM_DELETE_WINDOW", lambda: func.ask_quit(self))
        arg = self.master
        gui.load(self)
Ejemplo n.º 4
0
def load(edit=False, dockable=False, *args, **kwargs):
    """To launch the ui and not get the same instance

    Returns:
        Anim_picker: instance

    Args:
        edit (bool, optional): Description
        dockable (bool, optional): Description

    """
    return gui.load(edit=edit, dockable=dockable)
Ejemplo n.º 5
0
    print "initializing!"
    evt.window["mypanel"]["mybutton"].label = "Click ME!!!!"
    evt.window.show()


def on_menu_file_about_click(event):
    pass


def on_menu_file_exit_click(evt):
    evt.window.close()


def on_field1_change(evt):
    print "Changed, new text: ", evt.window["field1"].value


def on_field1_keypress(evt):
    print "Keypress: ", evt.key
    if evt.key == 13:
        gui.alert(evt.window["field1"].value, "hello world!")


def on_mypanel_mybutton_click(etv):
    gui.alert("btn clicked!!!!")


if __name__ == "__main__":
    window = gui.load()
    gui.main_loop()
Ejemplo n.º 6
0
def setMode(isAuto):
    import gui

    isAuto = isAuto
    gui.load(isAuto)
Ejemplo n.º 7
0
    # create a toolbox 
    frame = wx.Frame(None, pos=(0, 25), size=(80, 600), title="GUI Toolbox")
    tb = ToolBox(frame)

    if len(sys.argv) > 1:
        filename = sys.argv[1]
    else:
        # let the user choose the file to edit:
        filename = gui.open_file("Select the file to edit", ".", "sample.pyw")
        if not filename:
            exit()
    
    vars = {}
    if filename.endswith(".rsrc.py"):
        # load the resource file (do not bind the controller event handlers)
        objs = gui.load(filename, controller=False)
    else:
        # exec a normal python file
        execfile(filename, vars)
        root = None
        objs = vars.values()
    for value in objs:
        if not isinstance(value, gui.Window):
            continue
        root = value       # TODO: support many windows
        # load the window in the widget inspector
        inspector.load_object(root)
        # associate the window with the designer: 
        # (override mouse events to allow moving and resizing)
        designer = BasicDesigner(root, inspector)
        # associate the window with the toolbox:
Ejemplo n.º 8
0
    # create a toolbox 
    frame = wx.Frame(None, pos=(0, 25), size=(80, 600), title="GUI Toolbox")
    tb = ToolBox(frame)

    if len(sys.argv) > 1:
        filename = sys.argv[1]
    else:
        # let the user choose the file to edit:
        filename = gui.open_file("Select the file to edit", ".", "sample.pyw")
        if not filename:
            exit()
    
    vars = {}
    if filename.endswith(".rsrc.py"):
        # load the resource file (do not bind the controller event handlers)
        objs = gui.load(filename=filename, controller=False)
    else:
        # exec a normal python file
        execfile(filename, vars)
        root = None
        objs = vars.values()
    for value in objs:
        if not isinstance(value, gui.Window):
            continue
        root = value       # TODO: support many windows
        # load the window in the widget inspector
        inspector.load_object(root)
        # associate the window with the designer: 
        # (override mouse events to allow moving and resizing)
        designer = BasicDesigner(root, inspector)
        # associate the window with the toolbox:
Ejemplo n.º 9
0
def load(edit=False, multi=False):
    '''Fast load method
    '''
    import gui
    return gui.load(edit=edit, multi=multi)
Ejemplo n.º 10
0
def load(edit=False, multi=False):
    """Fast load method
    """
    import gui

    return gui.load(edit=edit, multi=multi)
Ejemplo n.º 11
0
    print "initializing!"
    evt.window['mypanel']['mybutton'].label = "Click ME!!!!"
    evt.window.show()


def on_menu_file_about_click(event):
    pass


def on_menu_file_exit_click(evt):
    evt.window.close()


def on_field1_change(evt):
    print "Changed, new text: ", evt.window['field1'].value


def on_field1_keypress(evt):
    print "Keypress: ", evt.key
    if evt.key == 13:
        gui.alert(evt.window['field1'].value, "hello world!")


def on_mypanel_mybutton_click(etv):
    gui.alert("btn clicked!!!!")


if __name__ == '__main__':
    window = gui.load()
    gui.main_loop()
Ejemplo n.º 12
0
def load(edit=False, multi=False):
    '''Fast load method
    '''
    import gui
    return gui.load(edit=edit, multi=multi)
Ejemplo n.º 13
0
import gui_auto
import gui_man

#std lib
import threading

#local used variables
_loopDelayTimer = 2.0

param.isAuto = True


#define methods
def _mainLoop():
    threading.Timer(_loopDelayTimer, _mainLoop).start()

    if param.isAuto:
        if param.isOn:
            program.update()
    if (param.isOn):
        tempControl.update(tempSens.get())
    else:
        tempControl.off()


#initialisation script
tempControl.init()

_mainLoop()  #start mainLoop
gui.load(True)  #load manual user interface
Ejemplo n.º 14
0
        font["face"] = font.pop("faceName")
    if "family" in font and font["family"] == "sansSerif":
        font["family"] = "sans serif"
    return font


if __name__ == "__main__":

    import sys
    import os
    import pprint
    import gui

    if len(sys.argv) > 1:
        # use the provided resource file:
        rsrc = gui.load(sys.argv[1])
    else:
        # use a test resource file (see minimal.rsrc.py sample):
        rsrc = {
            "application": {
                "type": "Application",
                "name": "Minimal",
                "backgrounds": [
                    {
                        "type": "Background",
                        "name": "bgMin",
                        "title": "Minimal PythonCard Application",
                        "size": (200, 100),
                        "menubar": {
                            "type": "MenuBar",
                            "menus": [
Ejemplo n.º 15
0
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   FreeEMS software is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with any FreeEMS software.  If not, see <http://www.gnu.org/licenses/>.
#
#   We ask that if you make any changes to this file you send them upstream to us at [email protected]

# Attempt to load bootstrap file
try:
    import bootstrap
except ImportError:
    pass

# Load libraries
import libs.data, controller, gui

# Begin setting up program
libs.data.createDirectory()

# Start up the program controller
ctr = controller.app()

# Start up the gui
gui.load(ctr)
Ejemplo n.º 16
0
import gui
import gui_auto
import gui_man

#std lib
import threading

#local used variables
_loopDelayTimer = 2.0


#define methods
def _mainLoop():
    threading.Timer(_loopDelayTimer, _mainLoop).start()

    if param.isAuto:
        if param.isOn:
            program.update()
    if (param.isOn):
        tempControl.update(tempSens.get())
    else:
        tempControl.off()
        motor.update()


#initialisation script
tempControl.init()

_mainLoop()  #start mainLoop
gui.load(False)  #load manual user interface