X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finseturl.h;h=d077e33daebfe3ca7833428bf835e62fa48f96dc;hb=4a5b7a5952ad2381fcdf4830511293e184c7c5a1;hp=d54768be8788a0433184e9c0ccad522d54a66e90;hpb=c35b288b74ac9b1450a81c1520292ab95735bb0f;p=lyx.git diff --git a/src/insets/inseturl.h b/src/insets/inseturl.h index d54768be87..d077e33dae 100644 --- a/src/insets/inseturl.h +++ b/src/insets/inseturl.h @@ -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(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; } - /// - 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; } - /// - string 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(string &file, signed char fragile); + string const getScreenLabel(Buffer const *) const; /// - int Linuxdoc(string &file); + EDITABLE editable() const { return IS_EDITABLE; } /// - int DocBook(string &file); + void edit(BufferView *, int, int, unsigned int); /// - static void CloseUrlCB(FL_OBJECT *, long data); -private: + void edit(BufferView * bv, bool front = true); /// - Url_Flags flag; + bool display() const { return false; } /// - FL_FORM *form; + int latex(Buffer const *, std::ostream &, + bool fragile, bool free_spc) const; /// - FL_OBJECT *url_name; + int ascii(Buffer const *, std::ostream &, int linelen) const; /// - FL_OBJECT *name_name; + int linuxdoc(Buffer const *, std::ostream &) const; /// - FL_OBJECT *radio_html; + int docbook(Buffer const *, std::ostream &) const; }; #endif