function aObj = axischild(HG)
%AXISCHILD/AXISCHILD

%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 1.23 $  $Date: 2000/08/01 22:09:35 $
%   B.A. Jones & J.H. Roh 4-25-97.

if nargin==0
   aObj.Class = 'axischild';
   aObj.DragConstraint = [];
   aObj.AutoDragConstraint = [];
   aObj.OldDragConstraint = [];
   aObj.Prefix = [];
   aObj.Suffix = [];
   aObj = class(aObj,'axischild',scribehgobj);
   return
end

hgObj = scribehgobj(HG);

%set(HG,'ButtonDownFcn','doclick(gcbo)')
setappdata(HG,'ScribeButtonDownFcn','doclick');


aObj.Class = 'axischild';
aObj.DragConstraint = 'nodrag';
aObj.AutoDragConstraint = 0;
aObj.OldDragConstraint = '';
aObj.Prefix = {'set','EraseMode','xor'};
aObj.Suffix = '';

fig = get(get(HG,'Parent'),'Parent');
LAddContextMenu(HG,fig);

aObj = class(aObj,'axischild',hgObj);

myH = scribehandle(aObj);


function u = LAddContextMenu(HG,fig)

   u = findall(fig,'Tag','ScribeAxischildObjContextMenu');

   if ishandle(u)
      setscribecontextmenu(HG, u); 
   else
      
      u = uicontextmenu(...
              'Parent',fig,...
              'Serializable','off', ...
              'HandleVisibility','off',...
              'Tag','ScribeAxischildObjContextMenu');

      
      ucut = uimenu(...
              'Label','Cu&t',...
              'Callback', 'domymenu cut',...
              'Parent',u,...
              'HandleVisibility','off',...
              'Tag','ScribeAxischildObjCutMenu');
      ucopy = uimenu(...
              'Label','&Copy',...
              'Callback', 'domymenu copy',...
              'Parent',u,...
              'HandleVisibility','off',...
              'Tag','ScribeAxischildObjCopyMenu');
      upaste = uimenu(...
              'Label','&Paste',...
              'Callback', 'domymenu paste',...
              'Parent',u,...
              'HandleVisibility','off',...
              'Tag','ScribeAxischildObjPasteMenu');
      uclear = uimenu(...
              'Label','Clea&r',...
              'Callback', 'domymenu clear',...
              'Parent',u,...
              'HandleVisibility','off',...
              'Tag','ScribeAxischildObjClearMenu');
      
      
      u4 = uimenu(...
              'Label','Properties...',...
              'Callback', 'domymenu more',...
              'Separator','on',...
              'Parent',u,...
              'HandleVisibility','off',...
              'Tag','ScribeAxischildObjMoreMenu');
   end

   setscribecontextmenu(HG, u); 

   
