PLT MrLib-Graphical Libraries Manual

How to Design Programs: An Introduction to Programming and Computing

Info icon This preview shows pages 1–7. Sign up to view the full content.

PLT MrLib: Graphical Libraries Manual PLT ([email protected]) 372 Released December 2007
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Copyright notice Copyright c 1996-2007 PLT Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Library General Public License, Version 2 published by the Free Software Foundation. A copy of the license is included in the appendix entitled “License.” Send us your Web links If you use any parts or all of the PLT Scheme package (software, lecture notes) for one of your courses, for your research, or for your work, we would like to know about it. Furthermore, if you use it and publicize the fact on some Web page, we would like to link to that page. Please drop us a line at [email protected] . Evidence of interest helps the DrScheme Project to maintain the necessary intellectual and financial support. We appreciate your help. Thanks Contributors to MrLib include Mike MacHenry. This manual was typeset using L A T E X, SL A T E X, and tex2page . Some typesetting macros were originally taken from Julian Smart’s Reference Manual for wxWindows 1.60: a portable C++ GUI toolkit . This manual was typeset on December 28, 2007.
Image of page 2
Contents 1 MrLib 1 2 aligned-pasteboard.ss : Aligned Pasteboard 2 2.1 aligned-editor-canvas% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 aligned-editor-snip% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.3 aligned-pasteboard<%> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.4 aligned-pasteboard-parent<%> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.5 horizontal-pasteboard% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.6 stretchable-snip<%> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.7 vertical-pasteboard% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3 bitmap-label.ss : Bitmap Labels 9 4 cache-image-snip.ss : Cache-image Snip 10 4.1 cache-image-snip% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.2 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5 interactive-value-port.ss : Interactive Value Port 13 6 gif.ss : GIF and Animated GIF Writing 14 7 graph.ss : Graph 15 7.1 graph-pasteboard<%> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 7.2 graph-pasteboard-mixin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 7.3 graph-snip<%> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 7.4 graph-snip-mixin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 7.5 Graph Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 i
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

CONTENTS CONTENTS 8 include-bitmap.ss : Include Bitmap 20 9 name-message.ss : Name Message 21 9.1 name-message% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 9.2 Name-Message Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 10 path-dialog.ss : File/Directory Dialog 25 10.1 path-dialog% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 11 plot.ss : Plot 27 License 28 Index 32 ii
Image of page 4
1. MrLib The MrLib collection consists of several libraries, each of which provides a set of procedures and syntax. To use a MrLib library, either at the top-level or within a module, import it with (require (lib " libname " "mrlib")) For example, to use the graph.ss library: (require (lib "graph.ss" "mrlib")) The MrLib collection provides the following libraries: aligned-pasteboard.ss – pasteboards that manage the geometry of their snips bitmap-label.ss – builds button labels from bitmaps cache-image-snip.ss – the core of the drscheme image teachpack fancy-value-port.ss – allows ports to show syntax and numbers interactively graph.ss – shows graphs in a pasteboard include-bitmap.ss – inlines bitmaps into source text for stand-alone executables name-message.ss – a control for showing a path in a pop-down menu plot.ss – library for plotting values to a dc path-dialog.ss – a platform-independent file/directory dialog syntax-browser.ss – library for browsing the structure of syntax objects text-string-style-desc.ss – normalizes snips and styles into sexps 1
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

2.
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '07
  • Fisler
  • Subroutine, Negative and non-negative numbers, snip

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern