X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finseturl.h;h=d077e33daebfe3ca7833428bf835e62fa48f96dc;hb=4a5b7a5952ad2381fcdf4830511293e184c7c5a1;hp=eaf1c2159e9efc6b6d74d31e70cf6b8c3442ae64;hpb=a77033585c912bd5c29c9b0a61a18bddeb109284;p=lyx.git diff --git a/src/insets/inseturl.h b/src/insets/inseturl.h index eaf1c2159e..d077e33dae 100644 --- a/src/insets/inseturl.h +++ b/src/insets/inseturl.h @@ -1,87 +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" -#include "form_url.h" struct 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; } + 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; } + Inset::Code lyxCode() const { return Inset::URL_CODE; } /// - string getScreenLabel() const; + void validate(LaTeXFeatures &) const; /// - InsetUrl::Url_Flags getFlag() { return flag; } + string const getScreenLabel(Buffer const *) const; /// - void setFlag(InsetUrl::Url_Flags f) { flag = f; } - /// - void gotoLabel(); + EDITABLE editable() const { return IS_EDITABLE; } /// - int Latex(FILE *file, signed char fragile); + void edit(BufferView *, int, int, unsigned int); /// - int Latex(string &file, signed char fragile); + void edit(BufferView * bv, bool front = true); /// - int Linuxdoc(string &file); + bool display() const { return false; } /// - int DocBook(string &file); + int latex(Buffer const *, std::ostream &, + bool fragile, bool free_spc) const; /// - static void CloseUrlCB(FL_OBJECT *, long data); -private: + 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