]> 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 9016efc2a14f2c2dfc2db4cf1bcce2608417b29a..d077e33daebfe3ca7833428bf835e62fa48f96dc 100644 (file)
@@ -4,7 +4,7 @@
  *
  *           LyX, The Document Processor
  *      
- *         Copyright 1997-2000 The LyX Team.
+ *         Copyright 1997-2001 The LyX Team.
  * 
  * ====================================================== */
 
@@ -16,8 +16,6 @@
 #endif
 
 #include "insetcommand.h"
-#include "buffer.h"
-#include "form_url.h"
 
 struct LaTeXFeatures;
 
@@ -25,80 +23,36 @@ struct LaTeXFeatures;
  */
 class InsetUrl : public InsetCommand {
 public:
-        ///
-        enum Url_Flags {
-               ///
-               URL,
-               ///
-               HTML_URL
-       };
-       
        ///
-       InsetUrl() : InsetCommand("url"), fd_form_url(0) {
-               flag = InsetUrl::URL;
-       }
-       ///
-       InsetUrl(string const &);
-       ///
-       InsetUrl(InsetCommand const &);
-       ///
-       InsetUrl(string const &, string const &, string const &);
-       ///
-       ~InsetUrl();
-        ///
-        Inset * Clone() const { return new InsetUrl(getCommand()); }
-       ///
-       Inset::Code LyxCode() const { return Inset::URL_CODE; }
-       ///
-       void Validate(LaTeXFeatures &) const;
-       ///
-       void Edit(BufferView *, int, int, unsigned int);
+       explicit
+       InsetUrl(InsetCommandParams const &, bool same_id = false);
        ///
-       EDITABLE Editable() const {
-               return IS_EDITABLE;
+       virtual Inset * clone(Buffer const &, bool same_id = false) const {
+               return new InsetUrl(params(), same_id);
        }
        ///
-       const char * EditMessage() const {return _("Opened Url");}
-        ///
-       bool display() const { return false; }
-       ///
-       string getScreenLabel() const;
-       ///
-       InsetUrl::Url_Flags getFlag() const { return flag; }
-       ///
-       void setFlag(InsetUrl::Url_Flags f) { flag = f; }
-        ///
-        void gotoLabel();
+       Inset::Code lyxCode() const { return Inset::URL_CODE; }
        ///
-       int Latex(ostream &, signed char fragile, bool free_spc) const;
-#ifndef USE_OSTREAM_ONLY
+       void validate(LaTeXFeatures &) const;
        ///
-       int Latex(string & file, signed char fragile, bool free_spc) const;
+       string const getScreenLabel(Buffer const *) const;
        ///
-       int Linuxdoc(string & file) const;
+       EDITABLE editable() const { return IS_EDITABLE; }
        ///
-       int DocBook(string & file) const;
-#else
+       void edit(BufferView *, int, int, unsigned int);
        ///
-       int Linuxdoc(ostream &) const;
+       void edit(BufferView * bv, bool front = true);
        ///
-       int DocBook(ostream &) const;
-#endif
-       ///
-       static void CloseUrlCB(FL_OBJECT *, long data);
-private:
+       bool display() const { return false; }
        ///
-       struct Holder {
-               InsetUrl * inset;
-               BufferView * view;
-       };
+       int latex(Buffer const *, std::ostream &,
+                 bool fragile, bool free_spc) const;
        ///
-       Holder holder;
-       
+       int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
-        Url_Flags flag;
+       int linuxdoc(Buffer const *, std::ostream &) const;
        ///
-        FD_form_url * fd_form_url;
+       int docbook(Buffer const *, std::ostream &) const;
 };
 
 #endif