X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finseturl.h;h=124600e091507125c60eaf27c6a2e02cf538002d;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=eaf1c2159e9efc6b6d74d31e70cf6b8c3442ae64;hpb=a77033585c912bd5c29c9b0a61a18bddeb109284;p=lyx.git diff --git a/src/insets/inseturl.h b/src/insets/inseturl.h index eaf1c2159e..124600e091 100644 --- a/src/insets/inseturl.h +++ b/src/insets/inseturl.h @@ -1,87 +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" -#include "form_url.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"), fd_form_url(0) { flag = InsetUrl::URL; } - /// - InsetUrl(string const &); - /// - InsetUrl(InsetCommand const&); - /// - InsetUrl(string const &,string const &,string const &); - /// - ~InsetUrl(); - /// - Inset* Clone() { return new InsetUrl(getCommand()); } /// - Inset::Code LyxCode() const { return Inset::URL_CODE; } + explicit + InsetUrl(InsetCommandParams const &); /// - void Validate(LaTeXFeatures &) const; + InsetBase::Code lyxCode() const { return InsetBase::URL_CODE; } /// - void Edit(int, int); + void validate(LaTeXFeatures &) const; /// - unsigned char Editable() const { - return 1; - } - /// - char const* EditMessage() {return "Opened Url";} - /// - bool Display() const { return false; } - /// - string getScreenLabel() const; - /// - InsetUrl::Url_Flags getFlag() { return flag; } - /// - void setFlag(InsetUrl::Url_Flags f) { flag = f; } - /// - void gotoLabel(); + docstring const getScreenLabel(Buffer const &) const; /// - int Latex(FILE *file, signed char fragile); + EDITABLE editable() const { return IS_EDITABLE; } /// - int Latex(string &file, signed char fragile); + bool display() const { return false; } /// - int Linuxdoc(string &file); + int latex(Buffer const &, odocstream &, + OutputParams const &) const; /// - int DocBook(string &file); + int plaintext(Buffer const &, odocstream &, + OutputParams const &) const; /// - 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; - /// - FD_form_url *fd_form_url; + virtual std::auto_ptr doClone() const { + return std::auto_ptr(new InsetUrl(params())); + } }; + +} // namespace lyx + #endif