X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finseturl.h;h=124600e091507125c60eaf27c6a2e02cf538002d;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=c995be0f54fe1cb3bc2c3ac2830516cfbc115f84;hpb=27de1486ca34aaad446adb798d71a77d6f6304da;p=lyx.git diff --git a/src/insets/inseturl.h b/src/insets/inseturl.h index c995be0f54..124600e091 100644 --- a/src/insets/inseturl.h +++ b/src/insets/inseturl.h @@ -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(LString const &); + explicit + InsetUrl(InsetCommandParams const &); /// - InsetUrl(InsetCommand const&); + InsetBase::Code lyxCode() const { return InsetBase::URL_CODE; } /// - 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; - } + void validate(LaTeXFeatures &) const; /// - char const* EditMessage() {return "Opened Url";} - /// - bool Display() const { return false; } + docstring const getScreenLabel(Buffer const &) const; /// - LString 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(LString &file, signed char fragile); - /// - int Linuxdoc(LString &file); - /// - int DocBook(LString &file); + 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; - /// - static void CloseUrlCB(FL_OBJECT *, long data); + virtual std::auto_ptr doClone() const { + return std::auto_ptr(new InsetUrl(params())); + } }; + +} // namespace lyx + #endif