// -*- C++ -*-
/* This file is part of*
- * ======================================================
+ * ======================================================
*
* LyX, The Document Processor
*
- * Copyright (C) 1997 LyX Team (this file was created this year)
+ * Copyright 1997-2000 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; }
- ///
- InsetUrl(LString const &);
- ///
- InsetUrl(InsetCommand const&);
///
- InsetUrl(LString const &,LString const &,LString const &);
- ///
- ~InsetUrl();
+ explicit
+ InsetUrl(InsetCommandParams const &);
///
- Inset* Clone() { return new InsetUrl(getCommand()); }
+ Inset * Clone(Buffer const &) const { return new InsetUrl(params()); }
///
Inset::Code LyxCode() const { return Inset::URL_CODE; }
///
void Validate(LaTeXFeatures &) const;
///
- void Edit(int, int);
+ string const getScreenLabel() const;
///
- unsigned char Editable() const {
- return 1;
- }
+ EDITABLE Editable() const { return IS_EDITABLE; }
///
- char const* EditMessage() {return "Opened Url";}
+ void Edit(BufferView *, int, int, unsigned int);
///
- bool Display() const { return false; }
- ///
- LString getScreenLabel() const;
- ///
- InsetUrl::Url_Flags getFlag() { return flag; }
- ///
- void setFlag(InsetUrl::Url_Flags f) { flag = f; }
- ///
- void gotoLabel();
- ///
- int Latex(FILE *file, signed char fragile);
- ///
- int Latex(LString &file, signed char fragile);
- ///
- int Linuxdoc(LString &file);
- ///
- int DocBook(LString &file);
-private:
- ///
- Url_Flags flag;
- ///
- 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