Exemple #1
0
    Backplane("RAWINPUT").activate()
    Backplane("PARSEDINPUT").activate()
    Backplane("DISPLAYCONSOLE").activate()

    Image(
        image="kamaelia_logo.png",
        bgcolour=(255, 255, 255),
        position=(20, 20),
        size=(64, 64),
        maxpect=(64, 64),
    ).activate()

    Pipeline(
        SubscribeTo("RAWINPUT"),
        text_to_tokenlists(),
        Memory(),  # These two can be mutually exclusive at times
        Repeater(
        ),  # Which is interesting. Probably want a TPipe with some interesting control.
        PublishTo("PARSEDINPUT"),
    ).activate()

    Pipeline(
        SubscribeTo("RAWINPUT"),
        PublishTo("DISPLAYCONSOLE"),
    ).activate()

    Pipeline(
        SubscribeTo("PARSEDINPUT"),
        DrawingCanvas(
            background=0xD0D0D0,  # Grey!
Exemple #2
0
            ("CANVAS", "eventsOut"): ("PAINTER", "inbox"),
            ("PALETTE", "outbox"): ("PAINTER", "colour"),
            ("ERASER", "outbox"): ("PAINTER", "erase"),
            ("LOAD", "outbox"): ("CANVAS", "inbox"),
            ("SAVE", "outbox"): ("CANVAS", "inbox"),
            ("PAINTER", "outbox"): ("SPLIT", "inbox"),
            ("SPLIT", "outbox"): ("CANVAS", "inbox"),
            ("self", "inbox"): ("CANVAS", "inbox"),
            ("SPLIT", "outbox2"): ("self", "outbox"),
            ("CANVAS", "outbox"): ("self", "outbox"),
        },
    )

mainsketcher = \
    Graphline( SKETCHER = makeBasicSketcher(width=1024,height=768),
               CONSOLE = Pipeline(ConsoleReader(),text_to_tokenlists(),parseCommands()),

               linkages = { ('self','inbox'):('SKETCHER','inbox'),
                            ('SKETCHER','outbox'):('self','outbox'),
                            ('CONSOLE','outbox'):('SKETCHER','inbox'),
                          }
                 )

# primary whiteboard
Pipeline(subscribeTo("WHITEBOARD"), TagAndFilterWrapper(mainsketcher),
         publishTo("WHITEBOARD")).activate()

if __name__ == "__main__":
    import sys, getopt, re

    rhost, rport, serveport = parseOptions()
Exemple #3
0
                          ("PAINTER", "outbox")    : ("SPLIT", "inbox"),
                          ("SPLIT", "outbox")      : ("CANVAS", "inbox"),
                          ("SPLIT", "outbox2")     : ("self", "outbox"), # send to network

                          ("self", "inbox")        : ("PREFILTER", "inbox"),
                          ("PREFILTER", "outbox")  : ("CANVAS", "inbox"),
                          ("PREFILTER", "history_event")  : ("HISTORY", "inbox"),
                          ("CANVAS", "outbox")     : ("self", "outbox"),

                          ("CANVAS","surfacechanged") : ("HISTORY", "inbox"),
                          },
                    )

mainsketcher = \
    Graphline( SKETCHER = makeBasicSketcher(width=1024,height=768),
               CONSOLE = pipeline(ConsoleReader(),text_to_tokenlists(),parseCommands()),

               linkages = { ('self','inbox'):('SKETCHER','inbox'),
                            ('SKETCHER','outbox'):('self','outbox'),
                            ('CONSOLE','outbox'):('SKETCHER','inbox'),
                          }
                 )

# primary whiteboard
pipeline( subscribeTo("WHITEBOARD"),
          TagAndFilterWrapper(mainsketcher),
          publishTo("WHITEBOARD")
        ).activate()

if __name__=="__main__":
    import sys, getopt, re
def CommandConsole():
    return Pipeline(ConsoleReader(),
                 text_to_tokenlists(),
                 parseCommands())
Exemple #5
0
    from Kamaelia.Util.PureTransformer import PureTransformer as Transform

    Backplane("RAWINPUT").activate()
    Backplane("PARSEDINPUT").activate()
    Backplane("DISPLAYCONSOLE").activate()

    Image(image="kamaelia_logo.png",
          bgcolour=(255,255,255),
          position=(20, 20),
          size = (64,64),
          maxpect = (64,64),
          ).activate()

    Pipeline(
        SubscribeTo("RAWINPUT"),
        text_to_tokenlists(),
        Memory(),    # These two can be mutually exclusive at times
        Repeater(),  # Which is interesting. Probably want a TPipe with some interesting control.
        PublishTo("PARSEDINPUT"),
    ).activate()

    Pipeline(
        SubscribeTo("RAWINPUT"),
        PublishTo("DISPLAYCONSOLE"),
    ).activate()

    Pipeline(
        SubscribeTo("PARSEDINPUT"),
        DrawingCanvas(background = 0xD0D0D0, # Grey!
                      surfacesize = (570, 650),
                      surfaceposition=(430,90)),