/************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ #include #include "pm_help.hxx" // NOT FULLY DEFINED SERVICES #include "navibar.hxx" #include "html_kit.hxx" using namespace csi; using csi::html::Paragraph; using csi::html::HorizontalLine; using csi::html::Headline; using csi::html::AlignAttr; using csi::html::Bold; using csi::html::Link; using csi::html::Sbr; using csi::html::LineBreak; using csi::xml::Element; const String C_sHelpText( "
\n" "

The Main Navigationbar

\n" "

On top of every page, there is a main navigationbar on a lightly coloured\n" "background with the following items:
\n" "

\n" "
    \n" "
  • Overview - the start page for this document,
  • \n" "
  • Namespace - the lowest/deepest namespace of the language objects, described\n" "on the current page,
  • \n" "
  • Class - the class, struct or union, which owns the methods or data,\n" "described on the current page,
  • \n" "
  • Index - the global alphabetical index,
  • \n" "
  • Help - this page.
  • \n" "
\n" " Each item in this  bar can be in three different states:
\n" "
    \n" "
  • Link - the item is valid and you can get there,
  • \n" "
  • Simple - the item does not apply (if this page described a namespace,\n" "there would be no owning class),
  • \n" "
  • Reversed (white text on dark background) - this is the current page.
  • \n" "
\n" "

Lower Navigationbars

\n" " Just below the main navigation bar, there may be zero to three lower navigationbars\n" "on white background.
\n" "
\n" "Their items are dependent of the context, but they always link to paragraphs\n" "on the same, current page.
\n" "Available items appear as links. Unavailable items appear as simple text.
\n" "\n" "\n" "

Namespace Descriptions

\n" "\n" "
\n" "
Parent namespaces
\n" "
\n" "
\n" "
In front of the namespace title, there is a linked list of the parent\n" "namespaces. The global namespace is linked with the first \"::\",
\n" "
the namespaces between the global and the current one are linked\n" "by their names.
\n" "
\n" "
\n" "
\n" "After the title, the documentation of the namespace follows (which is often\n" "missing, because the namespace name may be self-explaining).
\n" "
\n" "Below are the lists of nested namspaces and of the classes, functions and\n" "other program objects, that belong within this namespace.
\n" "Each of this lists is accessible by the lower navigationbar on top of the\n" "page.
\n" "\n" "

Class Descriptions

\n" "\n" "
\n" "
Parent namespaces and classes
\n" "
\n" "
\n" "
In front of the class title, there is a linked list of the\n" "parent namespaces or classes. The global namespace is linked with the first\n" "\"::\",
\n" "
the namespaces between the global and the current one are\n" "linked by their names. Enclosing classes are linked as well, but appear in\n" "green color. 
\n" "
So you see on the first glance, that this is a parent class,\n" "no namespace.
\n" "
\n" "

\n" "
\n" "
\n" "After the title, the bases and derivations of the class follow.
\n" "Base classes are displayed as a graph. The text around base classes can appear\n" "in different styles and colours:
\n" "
    \n" "
  • Green - public inherited,
  • \n" "
  • Orange - protected inherited,
  • \n" "
  • Red - private inherited,
  • \n" "
  • italic - a (public inherited) virtual base class.
  • \n" "
  • Bold and black without a link - the placeholder\n" "for the currently described class.
    \n" "
  • \n" "
\n" "There may be many derivations of a class, but only the known ones, which\n" "are described within this document also, are listed.
\n" "
\n" "Below the derivations is a little table with some properties of the class:
\n" "
    \n" "
  • virtual - the class owns at least one virtual method,
  • \n" "
  • abstract - the class owns at least one abstract method,
  • \n" "
  • interface - the class may or may be not abstract,\n" "but it is intended by its author to be used only as an interface and never\n" "to be instantiated,
  • \n" "
  • template - the class is a template class.
    \n" "
  • \n" "
\n" "Next comes further documentation of the class itself.
\n" "
\n" "Lastly, there are listed all members of the class. Public members come first,\n" "then protected, at last the private ones.
\n" "All member lists are accessible by the lower navigationbars on top of the\n" "page.
\n" "\n" "

Macros and Defines

\n" "In C++ and C, there are also program constructs, which do not fit into the\n" "name tree, because they are #define'd: macros and definitions.
\n" "These may be documented, too. Those comments you find \n" "here\n" " or from the \"Overview\" start page.\n" "

Links to IDL-Documentation

\n" "Some types, which appear as links, may refer to classes, enums or other\n" "entities, which are direct mappings of UNO-IDL entities.
\n" "In those cases the link doesn't lead to the C++ class, enum or whatever,\n" "but to the description of the IDL entity.\n" "

How to Link From Extern Documents

\n" "If you wish to write an extern html document, which links to types within\n" "this C++ reference, you can do so, if your links have the following format:
\n" "
\n" "<RootDirectory-of-this-Document>/names/<Namespace-A>/<Namespace-XY>/EnclosingClass-nn>/<TypePreFix>-<MyTypeName>.html
\n" "
\n" "<TypePreFix> can have the following values:
\n" "
    \n" "
  • c - class, struct or union
  • \n" "
  • e - enum
  • \n" "
  • t - typedef
  • \n" "
\n" "If this document would be located in directory  \"/doc/cpp/ref\", examples\n" "would look like this:
\n" "
\n" "<a href=\"/doc/cpp/ref/names/osl/c-File.html\">class File</a>
\n" "<a href=\"/doc/cpp/ref/names/osl/FileBase/e-RC.html\">enum FileBase::RC</a>
\n" "<a href=\"/doc/cpp/ref/names/t-oslMutex.html\">typedef oslMutex</a>
\n" "
\n" "Namespaces are described in the index.html file within their directory:
\n" "
\n" "<a href=\"/doc/cpp/ref/names/cppu/index.html\">namespace cppu</a>
\n" "
" ); PageMaker_Help::PageMaker_Help( PageDisplay & io_rPage ) : SpecializedPageMaker(io_rPage), pNavi(0) { } PageMaker_Help::~PageMaker_Help() { } void PageMaker_Help::MakePage() { pNavi = new NavigationBar( Env(), NavigationBar::LOC_Help ); Write_NavBar(); Write_TopArea(); Write_DocuArea(); } void PageMaker_Help::Write_NavBar() { pNavi->Write( CurOut() ); CurOut() << new HorizontalLine; } void PageMaker_Help::Write_TopArea() { adcdisp::PageTitle_Std fTitle; fTitle( CurOut(), "How to Use", "this Reference Document" ); CurOut() << new xml::XmlCode(C_sHelpText); } void PageMaker_Help::Write_DocuArea() { CurOut() << new HorizontalLine; }