home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / lyx-0.13.2.tar.gz / lyx-0.13.2.tar / lyx-0.13.2 / src / insetparent.h < prev    next >
C/C++ Source or Header  |  1998-04-23  |  1KB  |  56 lines

  1. // -*- C++ -*-
  2. /* This file is part of*
  3.  * ======================================================
  4.  *
  5.  *           LyX, The Document Processor
  6.  *      
  7.  *        Copyright (C) 1997-1998 LyX Team
  8.  * 
  9.  *======================================================*/
  10.  
  11. #ifndef _INSET_PARENT_H
  12. #define _INSET_PARENT_H
  13.  
  14. #ifdef __GNUG__
  15. #pragma interface
  16. #endif
  17.  
  18. #include "insetcommand.h"
  19. #include "gettext.h"
  20. // Created by asierra 970813
  21.  
  22. /** Reference to the parent document.
  23.  
  24.   Useful to load a parent document from a child document and to
  25.   share parent's properties between preambleless children. 
  26.  */
  27. class InsetParent: public InsetCommand {
  28. public:
  29.     /// Non-standard LyX macro
  30.     InsetParent(): InsetCommand("lyxparent") { }
  31.     ///
  32.         InsetParent(LString fn, Buffer* owner=0);
  33.     ///
  34.         ~InsetParent() { };
  35.     /// 
  36.     int Latex(FILE *file, signed char fragile);
  37.     ///
  38.     int Latex(LString &file, signed char fragile);
  39.         ///
  40.         Inset* Clone() { return new InsetParent(getContents()); }
  41.         ///
  42.     LString getScreenLabel() const { return LString(_("Parent:"))+getContents(); }
  43.         ///
  44.     void Edit(int, int);
  45.         ///
  46.     unsigned char Editable() const {
  47.         return 1;
  48.     }
  49.         ///
  50.         Inset::Code LyxCode() const { return Inset::PARENT_CODE; }
  51.         ///
  52.         void setParent(LString fn) { setContents(fn); }
  53. };
  54.  
  55. #endif
  56.