- /// Sees to that the textclass structure has been loaded
- void load();
-
- ///
- string name;
- ///
- string latexname;
- ///
- string description;
- ///
- OutputType output_type;
-
- /// Specific class options
- string opt_fontsize;
- ///
- string opt_pagestyle;
- ///
- string options;
-
- /// Packages that are already loaded by the class
- bool provides_amsmath;
- ///
- bool provides_makeidx;
- ///
- bool provides_url;
-
- /// Base font. This one has to be fully instantiated.
- /** Base font. The paragraph and layout fonts are resolved against
- this font. Attributes LyXFont::INHERIT, LyXFont::IGNORE, and
- LyXFont::TOGGLE are extremely illegal.
- */
- LyXFont defaultfont;
- /// Array of styles in this textclass
- LyXLayout* style;
- ///
- unsigned char number_of_defined_layouts;
- ///
- unsigned char columns;
- ///
- unsigned char sides;
- ///
- signed char secnumdepth;
- ///
- signed char tocdepth;
- ///
- string pagestyle;
- ///
- string preamble;
- ///
- /// Text that dictates how wide the left margin is on the screen
- string leftmargin;
- ///
- /// Text that dictates how wide the right margin is on the screen
- string rightmargin;
- ///
- char maxcounter; // add approp. signedness
-private:
- /// Has this layout file been loaded yet?
- bool loaded;
-};
-
-
-///
-class LyXTextClassList {
-public:
- ///
- LyXTextClassList();
-
- ///
- ~LyXTextClassList();
-
- /// Gets layout structure from layout number and textclass number
- LyXLayout *Style(char textclass, char layout);
-
- /// Gets layout number from textclass number and layout name
- char NumberOfLayout(char textclass, string const & name); // add approp. signedness
-
- /// Gets a layout name from layout number and textclass number
- string NameOfLayout(char textclass, char layout); // add approp. signedness
-
- /// Gets textclass number from name
- /** Returns -1 if textclass name does not exist */
- signed char NumberOfClass(string const & textclass);
-
- ///
- string NameOfClass(char number); // add approp. signedness
-
- ///
- string LatexnameOfClass(char number); // add approp. signedness
-
- ///
- string DescOfClass(char number); // add approp. signedness
-
- ///
- LyXTextClass * TextClass(char textclass); // add approp. signedness
-
- /// Read textclass list
- /** Returns false if this fails */
- bool Read();
-
- /// Load textclass
- /** Returns false if this fails */
- bool Load(const char number);
-private:
- ///
- struct LyXTextClassL {
- ///
- LyXTextClass * textclass;
- ///
- LyXTextClassL * next;
- };
-
- ///
- LyXTextClassL * l;
-
- ///
- int num_textclass;
-
- /// After reading, this arrays holds the textclasses
- LyXTextClass * ar;
-
- /// Add a textclass to list
- void Add (LyXTextClass *l);
-
- /// Convert final linked list to array
- /** We read the textclasses into a linked list. After the reading,
- the list is converted to an array, and the linked list is nuked. */
- void ToAr();
-};