]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseturl.h
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / inseturl.h
index d54768be8788a0433184e9c0ccad522d54a66e90..124600e091507125c60eaf27c6a2e02cf538002d 100644 (file)
@@ -1,92 +1,61 @@
 // -*- C++ -*-
-/* This file is part of*
- * ======================================================
+/**
+ * \file inseturl.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           LyX, The Document Processor
- *      
- *         Copyright (C) 1997 LyX Team (this file was created this year)
- * 
- *======================================================*/
+ * \author José Matos
+ *
+ * Full author contact details are available in file CREDITS.
+ */
 
-#ifndef _INSET_URL_H
-#define _INSET_URL_H
+#ifndef INSET_URL_H
+#define INSET_URL_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
 #include "insetcommand.h"
-#include "buffer.h"
 
-struct LaTeXFeatures;
 
-/** The url inset  
+namespace lyx {
+
+class LaTeXFeatures;
+
+/** The url inset
  */
-class InsetUrl: public InsetCommand {
+class InsetUrl : public InsetCommand {
 public:
-        ///
-        enum Url_Flags {
-               ///
-               URL,
-               ///
-               HTML_URL
-       };
-       
-       ///
-       InsetUrl(): InsetCommand("url"), form(0) { flag = InsetUrl::URL; }
        ///
-       InsetUrl(string const &);
+       explicit
+       InsetUrl(InsetCommandParams const &);
        ///
-       InsetUrl(InsetCommand const&);
+       InsetBase::Code lyxCode() const { return InsetBase::URL_CODE; }
        ///
-       InsetUrl(string const &,string const &,string const &);
-       ///
-       ~InsetUrl();
-        ///
-        Inset* Clone() { return new InsetUrl(getCommand()); }
-       ///
-       Inset::Code LyxCode() const { return Inset::URL_CODE; }
-       ///
-       void Validate(LaTeXFeatures &) const;
-       ///
-       void Edit(int, int);
-       ///
-       unsigned char Editable() const {
-               return 1;
-       }
+       void validate(LaTeXFeatures &) const;
        ///
-       char const* EditMessage() {return "Opened Url";}
-        ///
-       bool Display() const { return false; }
+       docstring const getScreenLabel(Buffer const &) const;
        ///
-       string getScreenLabel() const;
+       EDITABLE editable() const { return IS_EDITABLE; }
        ///
-       InsetUrl::Url_Flags getFlag() { return flag; }
+       bool display() const { return false; }
        ///
-       void setFlag(InsetUrl::Url_Flags f) { flag = f; }
-        ///
-        void gotoLabel();
+       int latex(Buffer const &, odocstream &,
+                 OutputParams const &) const;
        ///
-       int Latex(FILE *file, signed char fragile);
+       int plaintext(Buffer const &, odocstream &,
+                 OutputParams const &) const;
        ///
-       int Latex(string &file, signed char fragile);
-       ///
-       int Linuxdoc(string &file);
-       ///
-       int DocBook(string &file);
-       ///
-       static void CloseUrlCB(FL_OBJECT *, long data);
+       int docbook(Buffer const &, odocstream &,
+                   OutputParams const &) const;
+       /// the string that is passed to the TOC
+       virtual int textString(Buffer const &, odocstream &,
+               OutputParams const &) const;
 private:
-       ///
-        Url_Flags flag;
-       ///
-        FL_FORM *form;
-       ///
-       FL_OBJECT *url_name;
-       ///
-       FL_OBJECT *name_name;
-       ///
-       FL_OBJECT *radio_html;
+       virtual std::auto_ptr<InsetBase> doClone() const {
+               return std::auto_ptr<InsetBase>(new InsetUrl(params()));
+       }
 };
 
+
+} // namespace lyx
+
 #endif