From 9d00a1464b722154a98a55019f81344c9950bcf0 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Wed, 7 Nov 2001 15:01:58 +0000 Subject: [PATCH] Updated docs for SaveArea. git-svn-id: https://rox.svn.sourceforge.net/svnroot/rox/trunk/ROX-Lib@901 66de3db3-b00d-0410-b41b-f4738ad19bea --- Help/python | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/Help/python b/Help/python index a2446cb..d0ac9f1 100644 --- a/Help/python +++ b/Help/python @@ -12,14 +12,14 @@ You can then include the other files, eg: The following modules are provided: - choices - Load and save user choices - filer - Open directories with ROX-Filer, etc - MultipleChoice - A message box with buttons along the bottom - SaveBox - Drag and drop saving - Toolbar - A ROX-Filer style toolbar - XDSLoader - Allow files to be dropped on your widgets - options - Load, save and edit settings - Menu - Menus with key-bindings + choices - Load and save user choices + filer - Open directories with ROX-Filer, etc + MultipleChoice - A message box with buttons along the bottom + SaveBox/SaveArea - Drag and drop saving + Toolbar - A ROX-Filer style toolbar + XDSLoader - Allow files to be dropped on your widgets + options - Load, save and edit settings + Menu - Menus with key-bindings choices @@ -95,8 +95,8 @@ for when the box is cancelled: box.show() -SaveBox -~~~~~~~ +SaveBox/SaveArea +~~~~~~~~~~~~~~~~ When you want to let the user save some data somewhere, use a SaveBox. You need to pass the constructor an object which can save, the default filename, and the MIME type for the data, eg: @@ -156,6 +156,20 @@ Example: support.rox_toplevel_unref() support.rox_mainloop() +You may also use the save_area.set_type() method to change the MIME type +and icon of the data being saved. This can be used if the application can +save in several formats (perhaps selected from a menu in the savebox). The +optional icon field is a pair (pixmap, mask) to use for the icon. If not given, +or None, the appropriate icon for the type is used. + + savebox.set_type('text/plain', icon = (pixmap, mask)) + +The SaveArea widget is similar to SaveBox, but can be added to an existing +window. In fact, a SaveBox is just a window with a SaveArea inside it. +The widget is created and used in the same way, except that there is no +'discard' field. + + Toolbar ~~~~~~~ To add a toolbar to your application, put a VBox in the main window and -- 2.11.4.GIT