- /// Sees to that the textclass structure has been loaded
- void load();
-
- ///
- LString name;
- ///
- LString latexname;
- ///
- LString description;
- ///
- OutputType output_type;
-
- /// Specific class options
- LString opt_fontsize;
- ///
- LString opt_pagestyle;
- ///
- LString 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;
- ///
- LString pagestyle;
- ///
- LString preamble;
- ///
- /// Text that dictates how wide the left margin is on the screen
- LString leftmargin;
- ///
- /// Text that dictates how wide the right margin is on the screen
- LString 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, LString const & name); // add approp. signedness
-
- /// Gets a layout name from layout number and textclass number
- LString NameOfLayout(char textclass, char layout); // add approp. signedness
-
- /// Gets textclass number from name
- /** Returns -1 if textclass name does not exist */
- signed char NumberOfClass(LString const & textclass);
-
- ///
- LString NameOfClass(char number); // add approp. signedness
-
- ///
- LString LatexnameOfClass(char number); // add approp. signedness
-
- ///
- LString 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();
-};