This is the substance of a patch I propose to apply tomorrow. It implements
tab widget and athena widget support under X.
andy
1999-07-28 Andy Piper <andy(a)xemacs.org>
* redisplay-output.c (redisplay_clear_bottom_of_window): remove
unneeded device.
* gutter.c (redraw_exposed_gutter): unmap subwindows from the
whole gutter.
* gui.h: declare parse_gui_item_tree_list and
parse_gui_item_tree_children.
* gui.c (parse_gui_item_tree_item): new function for parsing item
lists into gui-item trees.
(parse_gui_item_tree_children): ditto.
(parse_gui_item_tree_list): ditto.
* gui-x.h: declare gui_items_to_widget_values.
* gui-x.c (gui_items_to_widget_values_1): new function for
recursively parsing gui-items into widget_values.
(gui_item_children_to_widget_values): ditto.
(gui_items_to_widget_values): ditto.
(sanity_check_lwlib): add widgets macrolets.
* glyphs.h (IMAGE_INSTANCE_WIDGET_ITEMS): rename from *ITEM.
(XIMAGE_INSTANCE_WIDGET_ITEMS): ditto.
(IMAGE_INSTANCE_WIDGET_ITEM): rename from *SINGLE_ITEM.
(XIMAGE_INSTANCE_WIDGET_ITEM): ditto.
(struct expose_ignore): new structure for storing ignorable expose
events.
* glyphs.c (valid_image_instantiator_format_p): fix so that using
a console-type as a locale works.
(mark_image_instance): ITEM->ITEMS.
(image_instance_equal): ditto.
(image_instance_hash): ditto.
(struct expose_ignore_blocktype): new blocktype.
(check_for_ignored_expose): new function. checks frame exposure
list for events to ignore.
(register_ignored_expose): new function. registers an expose event
as ignorable.
(unmap_subwindow): register the expose event as ignorable.
(vars_of_glyphs): initialise the exposure blocktype.
* glyphs-x.c (x_finalize_image_instance): use lw_destroy_widget.
(x_update_subwindow): modify all widgets using widget_value tree
rather than just a single widget value.
(x_widget_instantiate): LWLIB_USES_MOTIF -> LWLIB_WIDGETS_MOTIF.
make sure widgets don't resize themselves.
(x_tab_control_instantiate): new function. use lwlib tab functions.
(x_tab_control_set_property): new function.
(image_instantiator_format_create_glyphs_x): add tab_control.
* glyphs-widget.c (widget_text_to_pixel_conversion): calculate
slightly more sensibly.
(initialize_widget_image_instance): ITEM->ITEMS.
(widget_instantiate_1): parse gui items generically into the ITEMS
entry.
* glyphs-msw.c (mswindows_update_subwindow): replace
SINGLE_ITEM->ITEM.
(mswindows_register_widget_instance): ditto.
(add_tree_item): modify to use new pre-initialised gui-item
structure.
(add_tab_item): ditto.
(mswindows_tab_control_instantiate): ditto.
(mswindows_tab_control_set_property): ditto.
(image_instantiator_format_create_glyphs_mswindows): predicate
existance of widgets on HAVE_WIDGETS.
* frame.h (struct frame): add subwindow_exposures variables.
* frame.c (allocate_frame_core): reset subwindow_exposures links.
* event-msw.c (mswindows_wnd_proc): check for ignored
expose events before redrawing.
* event-Xt.c (emacs_Xt_handle_magic_event): check for ignored
expose events before redrawing.
* config.h.in: add new LWLIB defines.
* internals.texi (Glyphs): add some glyph documentation.
1999-07-28 Andy Piper <andy(a)xemacs.org>
* xlwtabs.c: new lucid tabs widget from Ed Falk.
* xlwtabs.h: ditto.
* xlwtabsP.h: ditto.
* xlwgcs.c: GC manipulation for tab widgets.
* xlwgcs.h: ditto.
* xlwgauge.c: new athena gauge widget from Ed Falk.
* xlwgauge.h: ditto.
* xlwgaugeP.h: ditto.
* xlwradio.c: new athena radio widget from Ed Falk.
* xlwradio.h: ditto.
* xlwradioP.h: ditto.
* xlwcheckbox.c: new athena checkbox widget from Ed Falk.
* xlwcheckbox.h: ditto.
* xlwcheckboxP.h: ditto.
* lwlib-utils.c (destroy_all_children): moved from lwlib-Xm.c.
* lwlib-internal.h: declare destroy_all_children.
* lwlib-config.c: add widget checks.
* lwlib-Xm.h: declare xm_create_label;
* lwlib-Xm.c (destroy_all_children): move to lwlib-utils.c.
(xm_update_label): enable for widgets.
(xm_update_one_widget): ditto.
(xm_create_button): rename in line with lwlib-Xaw.c
(xm_create_progress): ditto.
(xm_create_text_field): ditto.
(xm_create_combo_box): ditto.
(xm_create_label): new function.
(xm_creation_table): rename widget creation functions.
(xm_destroy_instance): enable for widgets.
(xm_generic_callback): ditto.
(xm_generic_callback): ditto.
* lwlib-Xlw.c (xlw_tab_control_callback): new function. a special
callback that calls the correct function depending on what tab is
selected.
(xlw_create_tab_control): new function.
(build_tabs_in_widget): new function. puts tabs in a tab widget,
uses Xaw or Xm depending on how XEmacs was compiled.
(xlw_update_tab_control): update the resources for each
tab. optionally rebuild the contents of the tab widget.
(xlw_creation_table): add tab widget creation function.
(lw_lucid_widget_p): add tab widget.
(xlw_update_one_widget): ditto.
* lwlib-Xaw.h: declare xaw_create_label;
* lwlib-Xaw.c (lw_xaw_widget_p): add widgets classes.
(xaw_update_one_widget): ditto.
(xaw_update_one_value): add code from the Xm version.
(xaw_generic_callback): add Xm hack for setting command
states. beef up lookup of call data.
(xaw_create_button): new function.
(xaw_create_label): new function for use by tab widget.
(xaw_create_progress): new function.
(xaw_create_text_field): new function.
(xaw_creation_table): add new widget type creation functions.
* Makefile.in.in: add dependencies for new lw widgets.
* gutter-items.el (add-tab-to-gutter): put in specifier specs for
all devices that support tab controls.
(remove-buffer-from-gutter-tab): new function. to be used as a
value for kill-buffer-hook.
* configure.in: fix definitions of widget defines with various
toolkit options.
--------------------------------------------------------------
Dr Andy Piper
Senior Consultant Architect, BEA Systems Ltd
Show replies by date