Path: utzoo!attcan!uunet!mcvax!kth!sunic!dkuug!freja!skinfaxe!seindal From: seindal@skinfaxe.diku.dk (Rene' Seindal) Newsgroups: comp.lang.c++ Subject: Re: What would a man page for a class look like? Message-ID: <4730@freja.diku.dk> Date: 9 Jun 89 18:20:08 GMT References: <5474@pbhyf.PacBell.COM> Sender: news@freja.diku.dk Lines: 72 rob@PacBell.COM (Rob Bernardo) writes: > I've just started using C++, but I have not yet seen a man page > for a class and was wondering how a class would be documented via > traditional UNIX man page. Try to look at the man pages from InterViews. I find the quite readable and easy to use. The all follow the same scheme. Here's an example: ----------------------------------------------------------------- NAME Frame, TitleFrame, BorderFrame, ShadowFrame - surrounding interactor SYNOPSIS #include DESCRIPTION A frame is a monoscene subclass that outlines another interactor. A title frame provides a banner in addition to the outline and highlights the banner when the frame con- tains the input focus. A border frame draws the outline using a solid pattern when it contains the input focus and using a gray pattern otherwise. A shadow frame draws an outline with a drop shadow. PUBLIC OPERATIONS Frame(Interactor*, int width = 1) Construct a frame. If the given interactor is not nil, it is inserted as the frame's component. The frame extends width pixels outside of the interactor. TitleFrame(Banner*, Interactor*, int width = 1) Construct a title frame with the given banner. BorderFrame(Interactor*, int width = 1) Construct a border frame. ShadowFrame(Interactor*, int h = 1, int v = 1) Construct a shadow frame. The h and v ShadowFrame parameters specify the width of the horizontal and vertical shadows, respectively. Positive values for these parameters specify shadows falling to the right and below the interactor, respectively; negative values specify shadows falling to the left and above. virtual void HandleInput(Event&) A frame listens for OnEvent and OffEvent to detect when it has input focus. When an OnEvent is received, Frame::Handle calls Highlight(true); when an OffEvent is received, it calls Highlight(false). For any other event, it calls HandleInput. Frame::HandleInput does nothing. virtual void Highlight(boolean) The base class Highlight operation does nothing. PROTECTED OPERATIONS Frame(Interactor*, int, int, int, int) This constructor is used by subclasses to explicitly set the widths of each line in the outline. The integers specify the width of the left, bottom, right, and top lines, respectively. SEE ALSO Banner(3I), Event(3I), Scene(3I) InterViews Last change: 15 June 1987 2 Rene' Seindal (seindal@diku.dk).