function aObj = axischild(HG)
%AXISCHILD/AXISCHILD

%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.19 $  $Date: 1998/08/24 18:11:23 $
%   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)
      u = uicontextmenu(...
              'Parent',fig,...
              'HandleVisibility','off',...
              'Tag','ScribeAxischildObjContextMenu');
      u1 = uimenu(...
              'Label','Size',...
              'Callback', 'domymenu size',...
              'Parent',u,...
              'HandleVisibility','off',...
              'Tag','ScribeAxischildObjSizeMenu');
      u2 = uimenu(...
              'Label','Style',...
              'Callback', 'domymenu style',...        
              'Parent',u,...
              'HandleVisibility','off',...
              'Tag','ScribeAxischildObjStyleMenu');
      u3 = uimenu(...
              'Label','Color...',...
              'Callback', 'domymenu color',...        
              'Parent',u,...
              'HandleVisibility','off',...
              'Tag','ScribeAxischildObjColorMenu');
   
      u4 = uimenu(...
              'Label','Properties...',...
              'Callback', 'domymenu more',...
              'Separator','on',...
              'Parent',u,...
              'HandleVisibility','off',...
              'Tag','ScribeAxischildObjMoreMenu');
   end

   % set(HG,'UIContextMenu',u);
   setappdata(HG,'ScribeUIContextMenu',u);

