\documentclass{report}
\usepackage{hyperref}
% WARNING: THIS SHOULD BE MODIFIED DEPENDING ON THE LETTER/A4 SIZE
\oddsidemargin 0cm
\evensidemargin 0cm
\marginparsep 0cm
\marginparwidth 0cm
\parindent 0cm
\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-2in}


% Conditional define to determine if pdf output is used
\newif\ifpdf
\ifx\pdfoutput\undefined
\pdffalse
\else
\pdfoutput=1
\pdftrue
\fi

\ifpdf
  \usepackage[pdftex]{graphicx}
\else
  \usepackage[dvips]{graphicx}
\fi

% Write Document information for pdflatex/pdftex
\ifpdf
\pdfinfo{
 /Author     (Pasdoc)
 /Title      ()
}
\fi


% definitons for warning and note tag
\usepackage[most]{tcolorbox}
\newtcolorbox{tcbwarning}{
 breakable,
 enhanced jigsaw,
 top=0pt,
 bottom=0pt,
 titlerule=0pt,
 bottomtitle=0pt,
 rightrule=0pt,
 toprule=0pt,
 bottomrule=0pt,
 colback=white,
 arc=0pt,
 outer arc=0pt,
 title style={white},
 fonttitle=\color{black}\bfseries,
 left=8pt,
 colframe=red,
 title={Warning:},
}
\newtcolorbox{tcbnote}{
 breakable,
 enhanced jigsaw,
 top=0pt,
 bottom=0pt,
 titlerule=0pt,
 bottomtitle=0pt,
 rightrule=0pt,
 toprule=0pt,
 bottomrule=0pt,
 colback=white,
 arc=0pt,
 outer arc=0pt,
 title style={white},
 fonttitle=\color{black}\bfseries,
 left=8pt,
 colframe=yellow,
 title={Note:},
}

\begin{document}
\label{toc}\tableofcontents
\newpage
% special variable used for calculating some widths.
\newlength{\tmplength}
\chapter{Unit ok{\_}objc}
\label{ok_objc}
\index{ok{\_}objc}
\section{Description}
Objective{-}C/Objective{-}Pascal FPC syntax tests. See \href{https://github.com/pasdoc/pasdoc/issues/220}{https://github.com/pasdoc/pasdoc/issues/220} \href{https://wiki.freepascal.org/FPC_PasCocoa}{https://wiki.freepascal.org/FPC{\_}PasCocoa}
\section{Overview}
\begin{description}
\item[\texttt{\begin{ttfamily}TSomeCocoaClassObject\end{ttfamily} ObjcClass}]
\item[\texttt{\begin{ttfamily}NSSomeObject\end{ttfamily} ObjcClass}]
\item[\texttt{\begin{ttfamily}NSView\end{ttfamily} ObjcClass}]
\item[\texttt{\begin{ttfamily}MyView\end{ttfamily} ObjcClass}]
\end{description}
\section{Classes, Interfaces, Objects and Records}
\ifpdf
\subsection*{\large{\textbf{TSomeCocoaClassObject ObjcClass}}\normalsize\hspace{1ex}\hrulefill}
\else
\subsection*{TSomeCocoaClassObject ObjcClass}
\fi
\label{ok_objc.TSomeCocoaClassObject}
\index{TSomeCocoaClassObject}
\subsubsection*{\large{\textbf{Hierarchy}}\normalsize\hspace{1ex}\hfill}
TSomeCocoaClassObject {$>$} NSObject
%%%%Description
\subsubsection*{\large{\textbf{Methods}}\normalsize\hspace{1ex}\hfill}
\paragraph*{SomeFunction}\hspace*{\fill}

\label{ok_objc.TSomeCocoaClassObject-SomeFunction}
\index{SomeFunction}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{Description}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\item[\textbf{Declaration}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
public procedure SomeFunction(someparameter: SomeType); message 'SomeFunction:';\end{ttfamily}

\ifpdf
\end{flushleft}
\fi

\end{list}
\ifpdf
\subsection*{\large{\textbf{NSSomeObject ObjcClass}}\normalsize\hspace{1ex}\hrulefill}
\else
\subsection*{NSSomeObject ObjcClass}
\fi
\label{ok_objc.NSSomeObject}
\index{NSSomeObject}
\subsubsection*{\large{\textbf{Hierarchy}}\normalsize\hspace{1ex}\hfill}
NSSomeObject {$>$} NSObject
%%%%Description
\subsubsection*{\large{\textbf{Methods}}\normalsize\hspace{1ex}\hfill}
\paragraph*{method}\hspace*{\fill}

\label{ok_objc.NSSomeObject-method}
\index{method}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{Description}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\item[\textbf{Declaration}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
public procedure method(params: Integer); message 'method:';\end{ttfamily}

\ifpdf
\end{flushleft}
\fi

\end{list}
\paragraph*{classmethod}\hspace*{\fill}

\label{ok_objc.NSSomeObject-classmethod}
\index{classmethod}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{Description}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\item[\textbf{Declaration}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
public class procedure classmethod(para: char); override;\end{ttfamily}

\ifpdf
\end{flushleft}
\fi

\end{list}
\ifpdf
\subsection*{\large{\textbf{NSView ObjcClass external}}\normalsize\hspace{1ex}\hrulefill}
\else
\subsection*{NSView ObjcClass external}
\fi
\label{ok_objc.NSView}
\index{NSView}
\subsubsection*{\large{\textbf{Hierarchy}}\normalsize\hspace{1ex}\hfill}
NSView {$>$} NSResponder
%%%%Description
\subsubsection*{\large{\textbf{Methods}}\normalsize\hspace{1ex}\hfill}
\paragraph*{initWithFrame}\hspace*{\fill}

\label{ok_objc.NSView-initWithFrame}
\index{initWithFrame}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{Description}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\item[\textbf{Declaration}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
public function initWithFrame(rect : NSRect): id; message 'initWithFrame:';\end{ttfamily}

\ifpdf
\end{flushleft}
\fi

\par
\item[\textbf{Description}]
private field

\end{list}
\paragraph*{addSubview}\hspace*{\fill}

\label{ok_objc.NSView-addSubview}
\index{addSubview}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{Description}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\item[\textbf{Declaration}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
public procedure addSubview(aview: NSView); message 'addSubview:';\end{ttfamily}

\ifpdf
\end{flushleft}
\fi

\end{list}
\paragraph*{setAutoresizingMask}\hspace*{\fill}

\label{ok_objc.NSView-setAutoresizingMask}
\index{setAutoresizingMask}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{Description}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\item[\textbf{Declaration}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
public procedure setAutoresizingMask(mask: NSUInteger); message 'setAutoresizingMask:';\end{ttfamily}

\ifpdf
\end{flushleft}
\fi

\end{list}
\paragraph*{setAutoresizesSubviews}\hspace*{\fill}

\label{ok_objc.NSView-setAutoresizesSubviews}
\index{setAutoresizesSubviews}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{Description}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\item[\textbf{Declaration}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
public procedure setAutoresizesSubviews(flag: LongBool); message 'setAutoresizesSubviews:';\end{ttfamily}

\ifpdf
\end{flushleft}
\fi

\end{list}
\paragraph*{drawRect}\hspace*{\fill}

\label{ok_objc.NSView-drawRect}
\index{drawRect}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{Description}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\item[\textbf{Declaration}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
public procedure drawRect(dirtyRect: NSRect); message 'drawRect:';\end{ttfamily}

\ifpdf
\end{flushleft}
\fi

\end{list}
\ifpdf
\subsection*{\large{\textbf{MyView ObjcClass}}\normalsize\hspace{1ex}\hrulefill}
\else
\subsection*{MyView ObjcClass}
\fi
\label{ok_objc.MyView}
\index{MyView}
\subsubsection*{\large{\textbf{Hierarchy}}\normalsize\hspace{1ex}\hfill}
MyView {$>$} MSView
%%%%Description
\subsubsection*{\large{\textbf{Fields}}\normalsize\hspace{1ex}\hfill}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{data}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\label{ok_objc.MyView-data}
\index{data}
\item[\textbf{data}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
public data: Integer;\end{ttfamily}

\ifpdf
\end{flushleft}
\fi


\par  \end{list}
\subsubsection*{\large{\textbf{Methods}}\normalsize\hspace{1ex}\hfill}
\paragraph*{customMessage}\hspace*{\fill}

\label{ok_objc.MyView-customMessage}
\index{customMessage}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{Description}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\item[\textbf{Declaration}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
public procedure customMessage(dirtyRect: NSRect); message 'customMessage';\end{ttfamily}

\ifpdf
\end{flushleft}
\fi

\end{list}
\paragraph*{drawRect}\hspace*{\fill}

\label{ok_objc.MyView-drawRect}
\index{drawRect}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{Description}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\item[\textbf{Declaration}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
public procedure drawRect(dirtyRect: NSRect); override;\end{ttfamily}

\ifpdf
\end{flushleft}
\fi

\end{list}
\end{document}
