]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseturl.h
Don't remove cell selections after fontchange.
[lyx.git] / src / insets / inseturl.h
index c995be0f54fe1cb3bc2c3ac2830516cfbc115f84..d077e33daebfe3ca7833428bf835e62fa48f96dc 100644 (file)
@@ -1,92 +1,58 @@
 // -*- C++ -*-
 /* This file is part of*
- * ======================================================
+ * ====================================================== 
  *
  *           LyX, The Document Processor
  *      
- *         Copyright (C) 1997 LyX Team (this file was created this year)
+ *         Copyright 1997-2001 The LyX Team.
  * 
- *======================================================*/
+ * ====================================================== */
 
-#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  
  */
-class InsetUrl: public InsetCommand {
+class InsetUrl : public InsetCommand {
 public:
-        ///
-        enum Url_Flags {
-               ///
-               URL,
-               ///
-               HTML_URL
-       };
-       
        ///
-       InsetUrl(): InsetCommand("url"), form(0) { flag = InsetUrl::URL; }
+       explicit
+       InsetUrl(InsetCommandParams const &, bool same_id = false);
        ///
-       InsetUrl(LString const &);
-       ///
-       InsetUrl(InsetCommand const&);
-       ///
-       InsetUrl(LString const &,LString const &,LString 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;
+       virtual Inset * clone(Buffer const &, bool same_id = false) const {
+               return new InsetUrl(params(), same_id);
        }
        ///
-       char const* EditMessage() {return "Opened Url";}
-        ///
-       bool Display() const { return false; }
-       ///
-       LString getScreenLabel() const;
-       ///
-       InsetUrl::Url_Flags getFlag() { return flag; }
-       ///
-       void setFlag(InsetUrl::Url_Flags f) { flag = f; }
-        ///
-        void gotoLabel();
+       Inset::Code lyxCode() const { return Inset::URL_CODE; }
        ///
-       int Latex(FILE *file, signed char fragile);
+       void validate(LaTeXFeatures &) const;
        ///
-       int Latex(LString &file, signed char fragile);
+       string const getScreenLabel(Buffer const *) const;
        ///
-       int Linuxdoc(LString &file);
+       EDITABLE editable() const { return IS_EDITABLE; }
        ///
-       int DocBook(LString &file);
-private:
+       void edit(BufferView *, int, int, unsigned int);
        ///
-        Url_Flags flag;
+       void edit(BufferView * bv, bool front = true);
        ///
-        FL_FORM *form;
+       bool display() const { return false; }
        ///
-       FL_OBJECT *url_name;
+       int latex(Buffer const *, std::ostream &,
+                 bool fragile, bool free_spc) const;
        ///
-       FL_OBJECT *name_name;
+       int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
-       FL_OBJECT *radio_html;
+       int linuxdoc(Buffer const *, std::ostream &) const;
        ///
-       static void CloseUrlCB(FL_OBJECT *, long data);
+       int docbook(Buffer const *, std::ostream &) const;
 };
 
 #endif