%D \module
%D   [       file=prop-run,
%D        version=2003.04.20,
%D          title=\CONTEXT\ Property Macros,
%D       subtitle=Runtime Macros,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\unprotect

\doglobal\newif\ifshowcomponents

\gdef\showlayoutcomponents
  {\showcomponentstrue}

% By postponing loading of the next two macro's till their usage, we
% don't put a burden on the system when they are not used.

\gdef\startlayoutcomponent#1#2%
  {\ifshowcomponents
     \doifelseproperty{#1}
        \donothing
       {\doifelsenothing{#2}%
          {\defineproperty[#1][\s!layer]}% [\c!title=#1]
          {\defineproperty[#1][\s!layer][\c!title=#2]}}%
     \startproperty[#1]%
   \fi}

\gdef\stoplayoutcomponent
  {\ifshowcomponents
     \stopproperty
   \fi}

\protect \endinput
