[XGP-announce] XGP 0.4.0
Brought to you by:
spratt
|
From: Lindsey S. <sp...@al...> - 2005-08-18 20:11:14
|
XGP 0.4.0 is now available at http://xgp.sourceforge.net/ From the NEWS file: Changes from release 0.3.4 to 0.4.0: =================== OVERVIEW OF CHANGES: There are major changes to XGP with this release in the architecture of XGP and the graphics system. It is now possible to create stand-alone applications using XGP. Also, the XGP environment can be substantially modified without recompiling XGP. These new features are supported by the "initialize environment" mechanism and many changes to the menuing, control window, and document systems. As a result of these changes, substantially more of XGP is implemented in Prolog than in previous releases: the 'Evaluate Query' and 'Preferences...' dialogs are both implemented in Prolog in this release instead of using Interface Builder, NIBs, and Cocoa Objective-C. The graphics system has been changed in this release to use the Cocoa NSImage class for displaying XGDL-defined items. Also, some geometric transformation operations have been added. The NSImage change allows supports Quartz composition of graphic items. Eventually, this implementation will be extended to give Prolog control over "recording" or "caching" a picture (as an image) versus "drawing" a picture (displaying an image). =================== DETAILS: * Changed XGP to use the 'initialize_environment.pl' file to set up the XGP environment (located in XGP.app/Contents/Resources/English.lproj). It uses the environment_basics.pl and standard_application_menus.pl files to define the XGP, File, Edit, Tools, Window, and Help menus. The 'Evaluate Query...' 'Preferences' dialogs are implemented in the 'evaluate_query_dialog.pl' and 'preferences_dialog.pl' files at the same location. These files are consulted when the XGP application is opened--they can be changed to redefine the XGP environment. - Added definition of XGPINITPATH environment variable. This can be used in the path given to the include/1 directive. - Added user_default/2 predicate to support the new implementation of the Preferences dialog. - The XGP user preferences mechanism now checks in the [NSBundle mainBundle]'s infoDictionary for the requested key before using the coded-in default value. This is particularly useful in defining XGP-based applications for overriding the initial defaults used in XGP (e.g. setting 'check for new version' 'off' and resetting the storage values). * Changed XGP to use gprolog-1.2.18 (it was using gprolog-1.2.16). * Menu system changes: - Added 'XGP' menu definition (in initialize_environment.pl) including implementation of the XGP Preferences dialog (in preferences_dialog.pl). Added 'File' menu definition, including custom "Open Recent" submenu mechanism. Added 'Edit' and 'Tools' menu definitions. - Added support for the "apple" (application) menu. This menu cannot be installed or killed, but it can be otherwise operated on in the same way as other XGP-managed menus (e.g. using extend_menu/2, rename_item/3, get_items/2). - Implemented custom "Open Recent" mechanism for XGP so that all application menus can be implemented from within XGP. - Extended menu item definition used in install_menu and extend_menu to in two ways: 1. support 'shift', 'command', 'option' (or 'alternate'), and 'control' key specifications (e.g. 'Foo/b/shift/option' specifies an item named "Foo" with key option-B). 2. support "foo=>bar" form, where "foo" is the menu item name and key shortcut (as above) and "bar" is the value to use when calling the menu handler predicate. - Added support for prolog menu item validation. * Control Windows and Dialogs: - Extended cw and dialog interface to support color/1 "color well" item. - Added cwmacro_add_labeled_item, cwmacro_labeled_item_positions, cwmacro_max_button_label_width, and cwmacro_add_items/6. - Extended cw_set_item and setditem to support setting the items in a menu as well as which items are selected. Fixed bug in setditem where it wasn't handling special terms (e.g. wseq(Terms)). - Added 'tabs' control window item and extended control window predicates to support locating items within a specific tab. - Changed cw_add_item/3, cw_get_item/3, cw_delete_item/2, and cw_set_item/3 to take nested view path as Window arg (e.g. [foo, bar], where foo is a window name and bar is a tab name). - Added cw_set_item_tooltip/3, and cw_get_item_type/3. - Changed cw_add_item to set the 'first responder' to the first edit or scroll-edit type of control item added to the window. - Changed 'edit' control window items to be bezeled and not bordered if the containing window is textured. If the containing window is not textured then the item is not bezeled and is bordered. - Added cw_get_item/4. Same as cw_get_item/3 plus a 'text value mode' argument (atom, chars). - Fixed control windows to 'close' correctly when the 'close' button is used. * Source document windows: + 'definitions' popup on the source document window: - Fixed to update correctly after editing and re-consulting the window. - Extended to show the definitions sorted alphabetically when the popup is option-clicked. + consulting and opening - Fixed opening (via source_load/1) an already-opened file (i.e. a file for which there is already a document window). Also fixed closing a document and re-opening (via source_load/1) that document. - Fixed xgp__consult_load/1 to always put its compilation message at the end of #XGP Console# and to a blank line before the message. - Changed source_load/1 to enable undo and autosave. Extended xgp__create_document/2 to /3 to add enableUndoAutosave parameter (1 = enable, 0 = disable). + Fixed wshow/1 and whide/1 to work on source documents as well as graphics documents. * Graphics: - Fixed 'close' of graphics document to "forget" the document. - Added scale/3, trans/3, and rotate/4 XGDL items. - Added caching of the 'draw' image to improve performance of redrawing (e.g. when scrolling). This may eventually be made optional. - Extended the 'picture' XGDL item to take a file path specifying the desired image and to take a compositing operation parameter. - Extended fill and pen pattern XGDL items to allow specifying a path of an image file (e.g. JPEG or GIF) for an image as the pattern. * Utility predicates: + Atom handling utilities: - Fixed lower/2 and upper/2 to work with numbers and to not double-quote the atom results. - Added proper/2 predicate to "proper case" the input atom. + Geometry utilities: - Added vertical_shift_box/3, horizontal_split_box/5, box_top/2, box_left/2, box_depth/2, and box_width/2 utilities to simplify common operations on 'box(T, L, D, W)' terms. * Window activation - Improved document activation handling by using suspend/resume of GProlog in more situations. - Extended activation handling to include control windows. - Fixed 'close' activation handling to ensure the activation handler is invoked before the window being closed is released. * Threads: - Improved internal thread handling to clean up threads that were "leaking" and to allow many threads (1000) which can occur due to programmatically processing many windows (each of which spawns two threads to handle activation events). - Fixed sleep and wait to suspend the invoking prolog thread to allow other prolog threads to run while that thread waits (similar to the behavior for the select/5 predicate). Fixed include/1 directive path processing to allow "_" as part of environment variable names (e.g. FOO_BAR). * Minor fix for AppleScript 'query' action. * Added predicates: - documented: user_default/2, extend_menu/2, proper/2, cwmacro_add_labeled_item/6, cwmacro_add_items/6, cw_set_item_tooltip/3, cw_get_item_type/3, cw_get_item/4, vertical_shift_box/3, horizontal_split_box/5, box_top/2, box_left/2, box_depth/2, and box_width/2. - undocumented: xgp__set_validation_functor_for_menu/2, xgp__set_windows_menu/1, xgp__rename_item_in_menu/3, xgp__send_application_action/1, xgp__application_responds_to_action/1, xgp__application_first_responder_undo_manager_item_title/2, xgp__application_first_responder_nonempty_selection/1, xgp__send_text_finder_action/1, xgp__default_font_info_by_type/5, xgp__display_about_panel/1, xgp__user_default/2,xgp__set_user_default/2, xgp__cw_get_item_type/3, xgp__set_services_menu/1, xgp__base_actdeact_handler/2, xgp__add_actdeact_handler/1, xgp__remove_actdeact_handler/1, xgp__front_document/1, xgp__document_changed_since_consult/1, xgp__consult_document/1, xgp__halt_thread/1, xgp__thread_ID/1, xgp__wait_thread/0, xgp__wakeup_thread/1, xgp__documents/1, xgp__display_help/0, xgp__arrange_to_front/0, xgp__front_window/1, xgp__minimize_window/1, xgp__zoom_window/1, xgp__hide_document/1 and xgp__show_document/1. Enjoy, Lindsey Spratt |