Ejemplo n.º 1
0
 def __init__(self):
     Struct.__init__(self,
         # line[0]
         version = 1,
         ext = ".gif",
         type = CSI.TYPE_FRENCH,
         ncards = -1,
         styles = [],
         year = 0,
         # line[1]
         ident = "",
         name = "",
         # line[2]
         CARDW = 0,
         CARDH = 0,
         CARDD = 0,
         # line[3]
         CARD_XOFFSET = 0,
         CARD_YOFFSET = 0,
         SHADOW_XOFFSET = 0,
         SHADOW_YOFFSET = 0,
         # line[4]
         backindex = 0,
         # line[5]
         backnames = (),
         # other
         CARD_DX = 0,        # relative pos of real card image within Card
         CARD_DY = 0,
     )
Ejemplo n.º 2
0
 def __init__(self, **kw):
     kw = KwStruct(kw,
         name = "",
         filename = "",
         basename = "",      # basename of filename
         absname = "",       # absolute filename
         # implicit
         index = -1,
         error = 0,          # error while loading this resource
     )
     Struct.__init__(self, **kw.getKw())
Ejemplo n.º 3
0
    def __init__(self, parent):
        self.parent = parent
        self.home = None
        self.url = None
        self.history = Struct(
            list = [],
            index = 0,
        )
        self.images = []    # need to keep a reference because of garbage collection
        self.defcursor = parent["cursor"]
        self.handcursor = "hand2"

        # create buttons
        frame = self.frame = Tkinter.Frame(parent)
        frame.pack(side="bottom", fill="x")
        self.homeButton = Tkinter.Button(frame, text="Index",
                                         command=self.goHome)
        self.homeButton.pack(side="left")
        self.backButton = Tkinter.Button(frame, text="Back",
                                         command=self.goBack)
        self.backButton.pack(side="left")
        self.forwardButton = Tkinter.Button(frame, text="Forward",
                                            command=self.goForward)
        self.forwardButton.pack(side="left")
        self.closeButton = Tkinter.Button(frame, text="Close",
                                          command=self.destroy)
        self.closeButton.pack(side="right")

        # create text widget
        basefont = ("Helvetica", 12)
        if os.name == "nt":
            ##basefont = ("comic sans ms", -14, "italic")
            ##basefont = ("comic sans ms", -14, "bold", "italic")
            ##basefont = ("Arial", 14)
            basefont = ("Times New Roman", 12)
        self.text = MfxReadonlyScrolledText(parent,
                                    fg="#000000", bg="#f7f3ff",
                                    cursor=self.defcursor,
                                    font=basefont, wrap="word",
                                    padx=20, pady=20)
        self.text.pack(side="top", fill="both", expand=1)
        self.initBindings()