


XmDrawingArea(3X)					    XmDrawingArea(3X)
OSF/Motif							    OSF/Motif



NAME
  XXmmDDrraawwiinnggAArreeaa	- The DrawingArea widget class

SYNOPSIS


  ##iinncclluuddee <<XXmm//DDrraawwiinnggAA..hh>>

DESCRIPTION
  DrawingArea is an empty widget that is easily	adaptable to a variety of
  purposes.  It	does no	drawing	and defines no behavior	except for invoking
  callbacks.  Callbacks	notify the application when graphics need to be	drawn
  (exposure events or widget resize) and when the widget receives input	from
  the keyboard or mouse.

  Applications are responsible for defining appearance and behavior as needed
  in response to DrawingArea callbacks.

  DrawingArea is also a	composite widget and subclass of XXmmMMaannaaggeerr that	sup-
  ports	minimal	geometry management for	multiple widget	or gadget children.

  Classes

  DrawingArea inherits behavior	and resources from the CCoorree, CCoommppoossiittee,	CCoonn--
  ssttrraaiinntt, and XXmmMMaannaaggeerr classes.

  The class pointer is xxmmDDrraawwiinnggAArreeaaWWiiddggeettCCllaassss.

  The class name is XXmmDDrraawwiinnggAArreeaa.

  New Resources

  The following	table defines a	set of widget resources	used by	the program-
  mer to specify data.	The programmer can also	set the	resource values	for
  the inherited	classes	to set attributes for this widget.  To reference a
  resource by name or by class in a .Xdefaults file, remove the	XXmmNN or XXmmCC
  prefix and use the remaining letters.	 To specify one	of the defined values
  for a	resource in a .Xdefaults file, remove the XXmm prefix and	use the
  remaining letters (in	either lowercase or uppercase, but include any under-
  scores between words).  The codes in the access column indicate if the
  given	resource can be	set at creation	time (C), set by using XXttSSeettVVaalluueess
  (S), retrieved by using XXttGGeettVVaalluueess (G), or is not applicable	(N/A).

			  XXmmDDrraawwiinnggAArreeaa	RReessoouurrccee SSeett
	    ______________________________________________________
	    NNaammee		    DDeeffaauulltt		    AAcccceessss
		  CCllaassss			  TTyyppee
	    ______________________________________________________
	    ______________________________________________________
	    XmNexposeCallback	    NULL		    C
		  XmCCallback		   XtCallbackList
	    ______________________________________________________
	    XmNinputCallback	    NULL		    C
		  XmCCallback		   XtCallbackList
	    ______________________________________________________
	    XmNmarginHeight	    10			    CSG
		  XmCMarginHeight	   Dimension
	    ______________________________________________________
	    XmNmarginWidth	    10			    CSG
		  XmCMarginWidth	   Dimension
	    ______________________________________________________
	    XmNresizeCallback	    NULL		    C
		  XmCCallback		   XtCallbackList
	    ______________________________________________________
	    XmNresizePolicy	    XmRESIZE_ANY	    CSG
		  XmCResizePolicy	   unsigned char
	    ______________________________________________________

  XXmmNNeexxppoosseeCCaallllbbaacckk
	    Specifies the list of callbacks that is called when	DrawingArea
	    receives an	exposure event.	 The callback reason is	XXmmCCRR__EEXXPPOOSSEE.
	    The	callback structure also	includes the exposure event.
	    The	default	bit gravity for	Manager	windows	is NNoorrtthhWWeessttGGrraavviittyy.
	    This may cause the XXmmNNeexxppoosseeCCaallllbbaacckk procedures not	to be invoked
	    when the DrawingArea window	is made	smaller.

  XXmmNNiinnppuuttCCaallllbbaacckk
	    Specifies the list of callbacks that is called when	the
	    DrawingArea	receives a keyboard or mouse event (key	or button, up
	    or down).  The callback reason is XXmmCCRR__IINNPPUUTT.  The callback
	    structure also includes the	input event.

  XXmmNNmmaarrggiinnHHeeiigghhtt
	    Specifies the minimum spacing in pixels between the	top or bottom
	    edge of DrawingArea	and any	child widget.

  XXmmNNmmaarrggiinnWWiiddtthh
	    Specifies the minimum spacing in pixels between the	left or	right
	    edge of DrawingArea	and any	child widget.

  XXmmNNrreessiizzeeCCaallllbbaacckk
	    Specifies the list of callbacks that is called when	the
	    DrawingArea	is resized.  The callback reason is XXmmCCRR__RREESSIIZZEE.

  XXmmNNrreessiizzeePPoolliiccyy
	    Controls the policy	for resizing DrawingArea widgets.  Possible
	    values include XXmmRREESSIIZZEE__NNOONNEE (fixed	size), XXmmRREESSIIZZEE__AANNYY (shrink
	    or grow as needed),	and XXmmRREESSIIZZEE__GGRROOWW (grow	only).

  Inherited Resources

  DrawingArea inherits behavior	and resources from the following superc-
  lasses.  For a complete description of each resource,	refer to the man page
  for that superclass.

			    XXmmMMaannaaggeerr RReessoouurrccee SSeett
	_______________________________________________________________
	NNaammee			      DDeeffaauulltt			 AAcccceessss
	      CCllaassss			    TTyyppee
	_______________________________________________________________
	_______________________________________________________________
	XmNbottomShadowColor	      dynamic			 CSG
	      XmCBottomShadowColor	     Pixel
	_______________________________________________________________
	XmNbottomShadowPixmap	      XmUNSPECIFIED_PIXMAP	 CSG
	      XmCBottomShadowPixmap	     Pixmap
	_______________________________________________________________
	XmNforeground		      dynamic			 CSG
	      XmCForeground		     Pixel
	_______________________________________________________________
	XmNhelpCallback		      NULL			 C
	      XmCCallback		     XtCallbackList
	_______________________________________________________________
	XmNhighlightColor	      dynamic			 CSG
	      XmCHighlightColor		     Pixel
	_______________________________________________________________
	XmNhighlightPixmap	      dynamic			 CSG
	      XmCHighlightPixmap	     Pixmap
	_______________________________________________________________
	XmNinitialFocus		      NULL			 CSG
	      XmCInitialFocus		     Widget
	_______________________________________________________________
	XmNnavigationType	      XmTAB_GROUP		 CSG
	      XmCNavigationType		     XmNavigationType
	_______________________________________________________________
	XmNshadowThickness	      0				 CSG
	      XmCShadowThickness	     Dimension
	_______________________________________________________________
	XmNstringDirection	      dynamic			 CG
	      XmCStringDirection	     XmStringDirection
	_______________________________________________________________
	XmNtopShadowColor	      dynamic			 CSG
	      XmCTopShadowColor		     Pixel
	_______________________________________________________________
	XmNtopShadowPixmap	      dynamic			 CSG
	      XmCTopShadowPixmap	     Pixmap
	_______________________________________________________________
	XmNtraversalOn		      True			 CSG
	      XmCTraversalOn		     Boolean
	_______________________________________________________________
	XmNunitType		      dynamic			 CSG
	      XmCUnitType		     unsigned char
	_______________________________________________________________
	XmNuserData		      NULL			 CSG
	      XmCUserData		     XtPointer
	_______________________________________________________________

			    CCoommppoossiittee RReessoouurrccee SSeett
	     _____________________________________________________
	     NNaammee		       DDeeffaauulltt		    AAcccceessss
		   CCllaassss		     TTyyppee
	     _____________________________________________________
	     _____________________________________________________
	     XmNchildren	       NULL		    G
		   XmCReadOnly		      WidgetList
	     _____________________________________________________
	     XmNinsertPosition	       NULL		    CSG
		   XmCInsertPosition	      XtOrderProc
	     _____________________________________________________
	     XmNnumChildren	       0		    G
		   XmCReadOnly		      Cardinal
	     _____________________________________________________

			      CCoorree RReessoouurrccee SSeett
     ____________________________________________________________________
     NNaammee				   DDeeffaauulltt		   AAcccceessss
	   CCllaassss				 TTyyppee
     ____________________________________________________________________
     ____________________________________________________________________
     XmNaccelerators			   dynamic		   CSG
	   XmCAccelerators			  XtAccelerators
     ____________________________________________________________________
     XmNancestorSensitive		   dynamic		   G
	   XmCSensitive				  Boolean
     ____________________________________________________________________
     XmNbackground			   dynamic		   CSG
	   XmCBackground			  Pixel
     ____________________________________________________________________
     XmNbackgroundPixmap		   XmUNSPECIFIED_PIXMAP	   CSG
	   XmCPixmap				  Pixmap
     ____________________________________________________________________
     XmNborderColor			   XtDefaultForeground	   CSG
	   XmCBorderColor			  Pixel
     ____________________________________________________________________
     XmNborderPixmap			   XmUNSPECIFIED_PIXMAP	   CSG
	   XmCPixmap				  Pixmap
     ____________________________________________________________________
     XmNborderWidth			   0			   CSG
	   XmCBorderWidth			  Dimension
     ____________________________________________________________________
     XmNcolormap			   dynamic		   CG
	   XmCColormap				  Colormap
     ____________________________________________________________________
     XmNdepth				   dynamic		   CG
	   XmCDepth				  int
     ____________________________________________________________________
     XmNdestroyCallback			   NULL			   C
	   XmCCallback				  XtCallbackList
     ____________________________________________________________________
     XmNheight				   dynamic		   CSG
	   XmCHeight				  Dimension
     ____________________________________________________________________
     XmNinitialResourcesPersistent	   True			   C
	   XmCInitialResourcesPersistent	  Boolean
     ____________________________________________________________________
     XmNmappedWhenManaged		   True			   CSG
	   XmCMappedWhenManaged			  Boolean
     ____________________________________________________________________
     XmNscreen				   dynamic		   CG
	   XmCScreen				  Screen *
     ____________________________________________________________________
     XmNsensitive			   True			   CSG
	   XmCSensitive				  Boolean
     ____________________________________________________________________
     XmNtranslations			   dynamic		   CSG
	   XmCTranslations			  XtTranslations
     ____________________________________________________________________
     XmNwidth				   dynamic		   CSG
	   XmCWidth				  Dimension
     ____________________________________________________________________
     XmNx				   0			   CSG
	   XmCPosition				  Position
     ____________________________________________________________________
     XmNy				   0			   CSG
	   XmCPosition				  Position
     ____________________________________________________________________

  Callback Information

  A pointer to the following structure is passed to each callback:


  ttyyppeeddeeff ssttrruucctt
  {{
    iinntt	     _r_e_a_s_o_n;;
    XXEEvveenntt   * _e_v_e_n_t;;
    WWiinnddooww   _w_i_n_d_o_w;;
  }} XXmmDDrraawwiinnggAArreeaaCCaallllbbaacckkSSttrruucctt;;


  _r_e_a_s_o_n Indicates why the callback was	invoked

  _e_v_e_n_t	 Points	to the XXEEvveenntt that triggered the callback.  This is NULL for
	 the XXmmNNrreessiizzeeCCaallllbbaacckk.

  _w_i_n_d_o_w Is set	to the widget window

  Translations

  XmDrawingArea	inherits translations from XmManager.  Before calling the
  XmManager actions, all events	in the inherited translations except <<BBttnnMMoo--
  ttiioonn>>, <<EEnntteerrWWiinnddooww>>,	<<LLeeaavveeWWiinnddooww>>, <<FFooccuussIInn>>, and <<FFooccuussOOuutt>> also call
  the DDrraawwiinnggAArreeaaIInnppuutt(()) action.

  XmDrawingArea	has the	additional translations	listed below.  These transla-
  tions	may not	directly correspond to a translation table.

       MMAAnnyy BBAAnnyy PPrreessss::DDrraawwiinnggAArreeaaIInnppuutt(())
       MMAAnnyy BBAAnnyy RReelleeaassee::DDrraawwiinnggAArreeaaIInnppuutt(())
       MMAAnnyy KKAAnnyy PPrreessss::DDrraawwiinnggAArreeaaIInnppuutt(())
		      MMaannaaggeerrGGaaddggeettKKeeyyIInnppuutt(())
       MMAAnnyy KKAAnnyy RReelleeaassee::DDrraawwiinnggAArreeaaIInnppuutt(())

  Action Routines

  The XmDrawingArea action routines are	described below:

  DDrraawwiinnggAArreeaaIInnppuutt(()):
	    Unless the event takes place in a gadget, calls the	callbacks for
	    XXmmNNiinnppuuttCCaallllbbaacckk.

  MMaannaaggeerrGGaaddggeettKKeeyyIInnppuutt(()):
	    Causes the current gadget to process a keyboard event.

  Additional Behavior

  The XmDrawingArea widget has the additional behavior described below:

  <<EExxppoossee>>: Calls the callbacks	for XXmmNNeexxppoosseeCCaallllbbaacckk.

  <<WWiiddggeett RReessiizzee>>:
	    Calls the callbacks	for XXmmNNrreessiizzeeCCaallllbbaacckk.

  Virtual Bindings

  The bindings for virtual keys	are vendor specific.  For information about
  bindings for virtual buttons and keys, see VViirrttuuaallBBiinnddiinnggss((33XX)).

RELATED	INFORMATION
  CCoommppoossiittee((33XX)), CCoonnssttrraaiinntt((33XX)), CCoorree((33XX)), XXmmCCrreeaatteeDDrraawwiinnggAArreeaa((33XX)), and
  XXmmMMaannaaggeerr((33XX)).





















