head	2.3;
access;
symbols
	Rel2_1:2.1
	Rel2_0:2.0
	Xo52:1.11
	Xo51:1.11;
locks; strict;
comment	@# @;


2.3
date	93.11.16.01.33.59;	author ware;	state Exp;
branches;
next	2.2;

2.2
date	92.12.23.15.39.18;	author ware;	state Exp;
branches;
next	2.1;

2.1
date	92.08.11.00.36.02;	author pete;	state Exp;
branches;
next	2.0;

2.0
date	92.04.23.02.46.37;	author ware;	state Exp;
branches;
next	1.12;

1.12
date	92.04.23.02.40.03;	author ware;	state Exp;
branches;
next	1.11;

1.11
date	92.03.03.17.15.41;	author ware;	state Exp;
branches;
next	1.10;

1.10
date	92.02.04.21.16.16;	author pete;	state Exp;
branches;
next	1.9;

1.9
date	91.11.30.20.03.10;	author pete;	state Exp;
branches;
next	1.8;

1.8
date	91.09.12.09.35.31;	author pete;	state Exp;
branches;
next	1.7;

1.7
date	91.09.04.19.33.51;	author pete;	state Exp;
branches;
next	1.6;

1.6
date	91.08.30.18.02.06;	author pete;	state Exp;
branches;
next	1.5;

1.5
date	91.07.19.00.59.55;	author pete;	state Exp;
branches;
next	1.4;

1.4
date	91.06.14.17.40.25;	author pete;	state Exp;
branches;
next	1.3;

1.3
date	91.05.25.11.03.00;	author pete;	state Exp;
branches;
next	;


desc
@Part of the Open Widget Set.
@


2.3
log
@Working on Column widget, etc.
@
text
@----------------------------------------------------------------------
Widget related things to do
----------------------------------------------------------------------

DONE - Column.c(SizeConstraintsFill): Need to make vspace_used a floating
  point value and accumulate the error.  As it stands, probably always
  zero.

- Column.c: On a resize, find out the preferred dimension of each
  child.  Then ask each child what it thinks of the adjusted size.
  Figure out how children should respond for those that can shrink to
  the given height.

- Implement checkbox, box and pullright/down objects

- Implement a toggle

- Implement a viewport

- Implement a List widget.

- Maybe make the menubar a constraint widget.  One should be able to
  set the number of columns.  Widgets can be sorted by the constraint
  key.

- Widgets in menubar can be placed on the right (i.e. for Help) or
  from the left.  Need an internal value for left_x and right_x to
  keep track of the two sides.  If stretching is off and insert_hspace
  is off, then all the space is inserted between the left and right
  sides.  If insert_hspace is on, then space is evenly distributed.
  If stretching is on then all the widgets are the same width and
  fill up the row.

- Add a little space between menubar items so it looks good for 2d
  borders.  This should be done in the Row widget.

- Change Simple class to Base class or CoreBase.  Change ObjDraw to ObjBase.

- When converting the strings to widget classes: instead of a hard
  coded table, have each class add an entry for the one it uses.

- Create the class hierarchy:
	ObjBorder
		Obj3dBorder
		Obj2dBorder
		ObjOvalBorder
		ObjDropShadowBorder

  and make each class more aggresive in terms of modifying attributes
  of its parent.  In particular, add a "Realize" method that can
  change the attributes used in the XtCreateWindow() call and that
  can be called after the create to, for example, change the shape of
  the window.  Allow the ObjBorder to change the background color (maybe).
  Standardize the meanings:
  	Highlighted	- Widget has focus
	Set		- Widget is about to be executed.
  Add methods for Set() and Highlight() as well as a utility for
  calling them that checks if it is a sublcass of ObjBorder else
  executes a XtN<Op>Callback.

  Add method to determine rectangle for drawing after ObjBorder takes
  its space.

  Add a reverseVideo flag so menu's can be highlighted on monochrome systems.

- Allow "styles" to be created.  For example:
	Boring = {
		labelBorder:	None
		buttonBorder: Obj2dBorder
		menuBorder:   Obj2dBorder
		background:   white
	}
  To establish default values for various "common" features.

- Implement generic hooks that work much like callbacks.  Be able to
  create a hook list, add hooks with private data, execute a list of
  hooks passing along some call data and private data automatically
  done.  Be able to remove hooks.  I could probably use the Object
  class and then the intrinsics could function normally.  Who would be
  the Object's parent, though?
  
- Use Hooks to implement:
	- ClassInitHooks - called when a class is initialized first time.
			   call data is the widget class
	- ClassPartInitHooks - called when the class part is
			   initialized.  Call data is classrecord and
			   class record for this part.
	- ClassDisplayInit - called when a class is initialized for
			   the first time on a display.  Args are the
			   display and the widget.  Called by Initialize
			   method

- In the accept focus method put in place a mechanism to insure that
  the child is visible if it is in a scrolling window.  This can be
  done by traversing all the parents until either a shell is
  reached and calling some "scrolling callback" that causes the
  viewport to scroll.  Each parent has it's x & y location added to
  that of the child and the scrolling should attempt to make that
  rectangle of x, y, width and height visible.

- Make the CallbackMenu a generic function that can be added by any
  class.  In particular, use XtGetValues to find out the popup.

- A second button press event in a menubar causes menu to popdown and
  then up.

- Implement postscript printing:
	DONE - Implement function that traverses (breadth first) all children
	  and there children then all popped up popups.  Executes an
	  extension for each child.
	DONE - Add utility for adding the hardcopy extension.
	- Add utilities for converting points into postscript coordinates
	  relative to some widget.
	- Add utitity for converting a pixel into a postscript color

- Make the num_cols calculation a method in the Box widget.

- Implement scalable text.

- Suggested geometry policies:
	- Make all widgets to be the same size but arrange them
	  to fill the available space.  Similar to the Box but with
	  num_cols arranged so that all display according to the current
	  size.  Some method for determining the preferred size should
	  be arranged (like a square).

- What kind of resize policies are possible w.r.t. to simple widgets?
  For example:
  	XoSTATIC	- Do not change the size of the object
	XoSCALE		- Scale to fit to the current size.
	XoMIN		- Do not scale below the optimum size.
	XoSTRETCH	- Expand each widget to fill current size
	XoSHRINK	- Make each widget smaller so they all fit
	XoPAD		- Insert space to fill current size

----------------------------------------------------------------------
 Documentation related things to do
----------------------------------------------------------------------

- Include documentation on how to subclass an existing composite
  widget to turn it into a menu handler

- Document how to create menus.  Make it a seperate chapter.

- Document how the debug macros work.  Try to describe what can
  informative messages can be turned on and off.

----------------------------------------------------------------------
 Grammar/build related things to do
----------------------------------------------------------------------

- Add documentation for the class methods.

- When writing out the resource default values in the <class>Rec.h
  file, automatically detect if it needs to be coerced to an
  XtPointer.  I.e. if it is not '0', NULL, False, "string", or (cast) add the
  cast.  This should also clean up the resource summary because
  existing casts will not be needed.  Also, values of XtDefault...
  should not be cast (already strings).

- Create an appendix with each resource name, class and type listed.
  Each entry should identify which classes defined and which classes
  use the resource.

- Create a check list to verify each instance variable is properly
  used, intialized, destroyed and setvalues checks for changes.

- Add some error productions to the grammar and attempt a meaningful
  error message.

- Need to add all the resources defined in StringDefs.h to global list.

- Add a comment for which class variables are being initialized in the
  <class>Rec.h file.

- Would it be worthwhile to include documentation of each of the
  widget classes in the <class>.h file?

- During override class initializations, make the comment refer to what
  class actually redefined the value instead of using the name to override.

- Attach the description of the translations and actions to the class
  variable.  This allows the widget to be self documenting, to a
  small degree.

- Output functions should not be changing the state -- for example,
  the code that outputs the defines for resource and class names
  should be operating on already created lists.  This way one can output
  only a subset of the classes without there being any real
  difference.

- Allow backups to be an option.

- Generate output files for only a subset of classes.

- Generate only a subset of the files possible.

----------------------------------------------------------------------
Finished
----------------------------------------------------------------------

DONE - Column.geometry_handler does not respond to changes in
  both width and height

DONE - Add a left and right glyph to the label so toggles and pullrights
  are supported

DONE - InSensitive colors do not work on monochrome display.  Need to
  use a stipple pattern.

DONE - Work on geometry handling for Column.

DONE - XoPlaceRelative doesn't work for non-override shells.  (Added
  XoPlaceRelativePopup).

DONE - Implement scrollbars

DONE - Add automatic generation of constraint documentation.

DONE - Work under monochrome automatically.

DONE - Set the background color automatically.

DONE - When a menubutton pops up the submenu it needs to move the focus
  over to submenu -- which is not happening now.  Need to add left and
  right traversals instead of just previous and next.  The menu's need
  to interpret them appropriately.

DONE - If menu's are popped up with keyboard, we need to not grab the
  pointer.  So how to have menus and keyboard traversals work?  The up
  and down traversals are simple -- they are handled by the manager of
  of the buttons (i.e. Menu, MenuBox) and just keep cycling within
  that menu.  The next and previous are a little trickier.  If the
  button that starts the traversal is a next, we need to determine if
  it has a submenu.  If so, we need to popup that submenu and change
  the focus.

  If it does not have a submenu on a next, then the Menu needs to ask
  it's parent to move to the next menu.  We should be at a MenuShell,
  now.  The MenuShell needs to know who popped it up so we need to add
  a resource indicating who is doing the calling.  This should not be
  too hard -- perhaps some changes to XoMenuNew to indicate who is
  actually popuping up/changing the menu.  The MenuShell now tells
  it's parent (something like a MenuBar, Menu or MenuBox) to move to
  the next widget.  It can do this.  We then need to change the
  menubarbutton so when it gets the focus it checks if it should popup
  the menu.

DONE - Add an XoPlaceRelative() function that places a popup in relation
  to it's parent.  Use XoGravity to determine where it should be placed.

DONE -  Remove XoGravity from Label.h and place in Xo.h.

DONE - Output constraint resources in documentation file.

DONE - MenuBarButtons would probably work better if instead of popping up the
  menu in Highlight(), a motion event is used to actually popup the
  menu.  This way they shouldn't all popup as the mouse moves across
  the bar.

  This works, except really need to put a timeout in Highlight() so if
  the cursor stops (without any motion events) the menu will popup
  1/100 second later.  Need the same timeout in MenuButton.  (Doesn't
  seem to be needed, now)

DONE - MenuShell is ugly in the SetValues method.  Also shouldn't be doing
  the XtSetValues () on width and height -- this is a no no.

DONE - Need to get window enter and leaves to work correctly with
  keyboard focus.  Each manager widget should find it's shell and see
  if a context of <Shell-window, "FocusWidget"> exists (make it so if
  it doesn't).  Add a translation to that shell so <Enter> and <Leave>
  events are tracked.  On <Enter>, restore the focus to the widget
  stored in the context.  If one does not exist in the context, then
  choose the first available widget.  When a widget gets the focus, it
  needs to change the context on the shell to be itself.  It also
  needs to install a destroy callback (but how to remove that callback
  when it looses the focus?).

DONE - Wrap each #define in ifdef's.

DONE - Change String to Object converter to use a DefaultBorder so
  monochrome and color systems can coexist.  Update widgets to use this.  

DONE - Implement automatic declaration of methods.  In other words, include
  the prototype in <class>Rec.h.  Need to allow for the occasional
  non-static class method.

  Add another value to the "class fields" that indicates if the method
  is static or extern.  Then implement the "methods" that list the
  fields name, return type and give the prototype arguments.  Then
  generate the prototypes in the <class>Rec.h file when the field is
  set in the "class fields" and an entry exists in the "methods" list.
  Note the class hierarchy will have to be traversed in much the same
  manner as done for creating the class init record.

DONE - Include a cross reference to the definition of the parent class.

DONE - Output a tree describing class hierarchy.

DONE - Set a flag on any errors and do not produce any output if they occur.

DONE - Use XoProto() for action prototypes.

DONE - Use WindowOfObject in Obj gadgets.

DONE - Improve the menu performance.  Try using a single override shell as
  a child of the menubar.  Each menubarbutton then changes the
  currently managed child in the overrideshell.  Need to pass along
  where the shell should be placed.

DONE - Rename files so that all widget code starts with a capital
  letter and utilitiy files start with lowercase.

DONE - Need to be able to override resources in ``build''.

DONE - Remove the lines between each table in the documentation.

DONE - Remove the captions on the tables except for the first one

DONE - Sort the names of the fields seperately from the resoure names.

DONE - Allow long default values, as needed by XtNinherit, to display
  properly  in the tables (use \parbox).

DONE - Need to add constraints to ``build''.

DONE - Handle constraint resources

DONE - Handle long resource default values in the documentation probably by
  using \parbox's.

DONE - Make the generated files readonly.

DONE - Create the file with some temporary name then compare the old file
  with this temporary.  If they are different then make the backup
  otherwise delete the temporary.  This should save a lot of directoy
  and file access() calls.

DONE - Reset line number on new file.  Report filename during errors.

DONE - Report errors in a format useable by M-x compile

DONE - A class should only override subclass values if the default for the
  subclasses is changed!

DONE - Check to see if the generated files are changed.  Only create
  the newfile if it has changed.

DONE - Document class variables in description and output to res_<class>.tex.

DONE - Add option for including a widget set global file -- both a private
  and a public one.

DONE - XEvent misspelt in actions.

DONE - Quote the fields going into the summary table.

DONE - Allow a spec to say that the class should not have any .h files
  generated.  This is used by the intrinsic classes to insure we don't
  get two copies of them.

DONE - Allow a widget to only inherit instance variables (RectObj)
  should be the only class that ever does this.

DONE - Name the instance field correctly.  In particular, RectObj is
  not consistent between it's class name (rect_class) and the instance
  name (rectangle).

DONE - Need to be able to relate the name of the instance variable to the
  resource in the documentation.

DONE - Let '\' only escape quotes during input.

DONE - Allow mutliple input files

DONE - Split the class description into several files.

DONE - Need to output newly defined resources (i.e. XtR...)

DONE - Define the offset() macro in <class>Rec.h file

DONE - Overrides are adding a field to declare_class_record.

DONE - Be able to add code fragments to public and private include files.
  Just add a variable that is looked up and dumped to the file for
  public, private, rec pre and post values.

DONE - Allow default specifications to be more flexible.  For example, if
  no actions are defined, then the default should be empty. Similar
  for translations.  Kludged around using some #defines and changes to the
  class descriptions.

DONE - Added #defines for instance and class names to <class>.h

DONE - Document actions in description and add table to <class>Rec.h

DONE - Add translations to description and add to <class>Rec.h

DONE - Make output_goto() insert tabs instead of spaces.

DONE - Add typedef's for widget structures.

DONE - Override superclasses values.

DONE - Fill in variable values when outputting ($superclass, etc)

DONE - Sort resources when writing to <class>.h

DONE - Sort resources for writing to res_<class>.tex

DONE - Sort resources for writing defines to <class.h>

DONE - Add which class when writing resources to <class>.h


DONE - Minimize the amount of redrawing that goes on as labels and especially
  menus are highlighted and unhighlighted.  This was accomplished by
  removing the _xoObjRedraw() in the Button.Set() action and making the
  ObjBorder.SetValues() smarter about refreshing.

DONE - Implement xfontsel using this widget set.  Need the
  menubar and possibly a vpaned widget.

DONE - Implement insensitive display (at least for ObjText).

DONE - Allow newlines in ObjText gadgets.

DONE - Buttons should not be highlighted in menubar until a button
  is pressed.

DONE - Need to be able to press mouse button down and move across each item.

DONE - Rename the MenuItem to a MenuButton?

DONE - Remove is_up resource from MenuItem.

DONE - Make MenuItems popped down submenu even when other child has the
  menu.   But be smart about not popping down are own submenu.

DONE - Have the menus popup 10 pixels to the right.  This seems to
  provide a little more usability when walking down submenus.

DONE - Get MenuItem to inherit resize proc.

DONE - Implement menu parser for external definition of menus.

DONE - Allow Label, etc to be added to menus.

DONE - Work on popup, walking menus.

DONE - Should Button::RedisplaySelf() be a general _xo() method?

DONE - Implement query_geometry.

DONE - Allow gadgets to inherit resources that are set in SetValues and
  Initialize as well as from the resource database.  _xoInheritSet()
  and _xoInheritInit() are the corresponding functions.

DONE - Add a resource, XtNinheritResources, to objDraw that is the string
  list of inherited resources.

DONE - Add a callback to Simple widget to allow gadgets to update their
  values.  Not needed.

DONE - Implement SetValues for ObjBorder

DONE - Add an inverted resource to ObjBorder.  Set/Unset it in Button.c
@


2.2
log
@Added macros to support using lex and yacc to Xo.tmpl.  Integrated new
scheme with XoUnitStd.h and Xo.tmpl.  Updated README.  Added Xpm3.2a
to the distribution.
@
text
@d5 3
a7 2
- Column.geometry_handler does not respond to changes in
  both width and height
d9 4
a12 2
DONE - Add a left and right glyph to the label so toggles and pullrights
  are supported
a36 3
DONE - InSensitive colors do not work on monochrome display.  Need to
  use a stipple pattern.

d201 14
@


2.1
log
@Things left todo.
@
text
@d5 3
@


2.0
log
@First public release.
@
text
@d5 2
a6 12
- The following needs to be done before this is ready for general
  consumption:
  	1. Add a left and right glyph to the label so toggles and
	   pullrights are supported
	2. Implement checkbox, box and pullright/down objects
	3. Implement a toggle
	4. Implement scrollbars
	5. Implement a viewport
	6. Add automatic generation of constraint documentation.
	7. Work under monochrome automatically.
	8. Set the background color automatically.
	9. Implement a List widget.
d8 1
a8 8
- Allow "styles" to be created.  For example:
	Boring = {
		labelBorder:	None
		buttonBorder: Obj2dBorder
		menuBorder:   Obj2dBorder
		background:   white
	}
  To establish default values for various "common" features.
d10 1
a10 4
- When a menubutton pops up the submenu it needs to move the focus
  over to submenu -- which is not happening now.  Need to add left and
  right traversals instead of just previous and next.  The menu's need
  to interpret them appropriately.
d12 1
a12 8
- If menu's are popped up with keyboard, we need to not grab the
  pointer.  So how to have menus and keyboard traversals work?  The up
  and down traversals are simple -- they are handled by the manager of
  of the buttons (i.e. Menu, MenuBox) and just keep cycling within
  that menu.  The next and previous are a little trickier.  If the
  button that starts the traversal is a next, we need to determine if
  it has a submenu.  If so, we need to popup that submenu and change
  the focus.
d14 1
a14 10
  If it does not have a submenu on a next, then the Menu needs to ask
  it's parent to move to the next menu.  We should be at a MenuShell,
  now.  The MenuShell needs to know who popped it up so we need to add
  a resource indicating who is doing the calling.  This should not be
  too hard -- perhaps some changes to XoMenuNew to indicate who is
  actually popuping up/changing the menu.  The MenuShell now tells
  it's parent (something like a MenuBar, Menu or MenuBox) to move to
  the next widget.  It can do this.  We then need to change the
  menubarbutton so when it gets the focus it checks if it should popup
  the menu.
d16 3
a18 2
DONE - Add an XoPlaceRelative() function that places a popup in relation
  to it's parent.  Use XoGravity to determine where it should be placed.
d20 7
a26 1
DONE -  Remove XoGravity from Label.h and place in Xo.h.
d28 6
a38 6
- InSensitive colors do not work on monochrome display.  Need to use a stipple
  pattern.

- Add a little space between menubar items so it looks good for 2d
  borders.  This should be done in the Row widget.

d63 9
d75 3
a77 1
  done.  Be able to remove hooks.
a89 15
- Buttons works a lot better with the following translations.
	<FocusIn>:	Highlight()\n\
	<FocusOut>:	Unhighlight()\n\
	<Leave>:	UnsetTemp() Unhighlight()\n\
	<Enter>:	Highlight() SetTemp()\n\

- MenuBarButtons would probably work better if instead of popping up the
  menu in Highlight(), a motion event is used to actually popup the
  menu.  This way they shouldn't all popup as the mouse moves across
  the bar.

  This works, except really need to put a timeout in Highlight() so if
  the cursor stops (without any motion events) the menu will popup
  1/100 second later.  Need the same timeout in MenuButton.

a112 12
- Maybe make the menubar a constraint widget.  One should be able to
  set the number of columns.  Widgets can be sorted by the constraint
  key.

- Widgets in menubar can be placed on the right (i.e. for Help) or
  from the left.  Need an internal value for left_x and right_x to
  keep track of the two sides.  If stretching is off and insert_hspace
  is off, then all the space is inserted between the left and right
  sides.  If insert_hspace is on, then space is evenly distributed.
  If stretching is on then all the widgets are the same width and
  fill up the row.

a114 4
- Write a pullright symbol

- Use a pullright object in the MenuItem widget.

d149 2
d199 38
d238 10
@


1.12
log
@Just the latest changes.
@
text
@@


1.11
log
@Adding scrollbar.
@
text
@a204 2
- Output constraint resources in documentation file.

d245 2
@


1.10
log
@Many Changes
@
text
@a4 8
- MenuShell is ugly in the SetValues method.  Also shouldn't be doing
  the XtSetValues () on width and height -- this is a no no.

- Change Simple class to Base class or CoreBase.  Change ObjDraw to ObjBase.

- When converting the strings to widget classes: instead of a hard
  coded table, have each class add an entry for the one it uses.

d13 1
a13 1
	6. Add automatic generation of constraint documents.
d18 47
d132 1
a132 1
  class.  In particular, use XtGetValeus to find out the popup.
d247 3
@


1.9
log
@*** empty log message ***
@
text
@d5 8
d22 3
d26 58
d152 3
d159 7
a182 4
- Implement automatic declaration of methods.  In other words, include
  the prototype in <class>Rec.h.  Need to allow for the occasional
  non-static class method.

d208 28
@


1.8
log
@*** empty log message ***
@
text
@a88 2
- Include a cross reference to the definition of the parent class.

a95 2
- Output a tree describing class hierarchy.

d133 4
@


1.7
log
@Updated to reflect current chagnes.
@
text
@d5 10
a102 2
- Set a flag on any errors and do not produce any output if they occur.

d137 2
@


1.6
log
@Updated for changes to support new menuing callbacks and hierarchies.
@
text
@d5 8
@


1.5
log
@Use shorter file names.  Various speedups.
@
text
@d5 2
a6 4
- Improve the menu performance.  Try using a single override shell as
  a child of the menubar.  Each menubarbutton then changes the
  currently managed child in the overrideshell.  Need to pass along
  where the shell should be placed.
d32 1
a32 3
- Make the num_cols calculation a method in the Box widget.  Implement
  Row and Column widgets based on the Box but with different num_cols
  methods.
a39 2
- Use WindowOfObject in Obj gadgets.

d60 9
d77 3
a81 4
----------------------------------------------------------------------
 Grammar/build related things to do
----------------------------------------------------------------------

d121 9
@


1.4
log
@*** empty log message ***
@
text
@d1 3
a3 2
- Implement xfontsel using this widget set.  Need the
  menubar and possibly a vpaned widget.
d5 4
a8 3
- Maybe make the menubar a constraint widget.  One
  should be able to set the number of columns.  Widgets can be sorted
  by the constraint key.
d10 2
a11 7
- Widgets in menubar can be placed on the right (i.e. for
  Help) or from the left.  Need an internal value for left_x and
  right_x to keep track of the two sides.  If stretching is off and
  insert_hspace is off, then all the space is inserted between the left
  and right sides.  If insert_hspace is on, then space is evenly
  distributed.  If stretching is on then all the the widgets are the
  same width and fill up the row.
d13 21
a43 2
- Allow newlines in ObjText gadgets.

d46 7
d61 175
@


1.3
log
@Adding external menus
@
text
@d1 4
a4 3
- Work on menubar (pulldown menus).  Need to be able to press mouse
  button down and move across each item.  Buttons should not be
  highlighted.  Maybe make the menubar a constraint widget.  One
d6 3
a8 1
  by the constraint key.  Widgets can be placed on the right (i.e. for
d14 1
a14 2
  same width and fill up the row.  Should work identically as the
  Menu widget as far as managing the popups/popdowns
d20 1
a20 1
- Rename the MenuItem to a MenuButton?
a21 2
- Add a pullright symbol

d26 1
a26 1
- Remove is_up resource from MenuItem.
d28 2
d39 8
a46 2
- Consider implementing xfontsel using this widget set.  Need the
  menubar and possibly a vpaned widget.
@
