Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!rice!sun-spots-request From: mbp@lakisis.umd.edu (Mark Phillips) Newsgroups: comp.sys.sun Subject: [Source] Paneledit: interactive editor for SunView panels Keywords: Source Message-ID: <2131@brazos.Rice.edu> Date: 1 Oct 89 21:11:57 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 30 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 160, message 12 of 15 Here is a piece of code which I call "paneledit" that can save SunView programmers hours of development time. It allows you to reposition any panel item in your program interactively. It is not a standalone program, but rather can be incorporated into any SunView program at any time by simply adding one line to the program's source code and recompiling. It allows you to switch between the program's normal operational mode and a special "editing" mode, in which you can use the mouse to drag panel items around and find out their new x,y coordinates. You can switch modes as often as you like. Paneledit incorporates a procedure called "move_item" by Chuck Musciano (posted to Sun-Spots in July '88) in a way that frees you from having to explicitly change your code to reference move_item. You just add one line to your program, and poof!, you can drag panel items around to your heart's content, without interfering with the normal functionality of the program. The code, instructions, and a short example program are in the shar file below. Enjoy! Ed's Note: Hostname : titan.rice.edu Directory: sun-source Filename : paneledit.shar Mark Phillips mbp@lakisis.umd.edu Department of Mathematics (301) 454-6550 University of Maryland College Park, Maryland 20742 USA