1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of*
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright (C) 1997 LyX Team (this file was created this year)
|
|
|
|
*
|
1999-11-04 01:40:20 +00:00
|
|
|
* ======================================================*/
|
1999-09-27 18:44:28 +00:00
|
|
|
|
1999-11-04 01:40:20 +00:00
|
|
|
#ifndef INSET_URL_H
|
|
|
|
#define INSET_URL_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "insetcommand.h"
|
|
|
|
#include "buffer.h"
|
1999-10-25 14:50:26 +00:00
|
|
|
#include "form_url.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
struct LaTeXFeatures;
|
|
|
|
|
|
|
|
/** The url inset
|
|
|
|
*/
|
|
|
|
class InsetUrl: public InsetCommand {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
enum Url_Flags {
|
|
|
|
///
|
|
|
|
URL,
|
|
|
|
///
|
|
|
|
HTML_URL
|
|
|
|
};
|
|
|
|
|
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
InsetUrl(): InsetCommand("url"), fd_form_url(0) {
|
|
|
|
flag = InsetUrl::URL;
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
InsetUrl(string const &);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
InsetUrl(InsetCommand const &);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
InsetUrl(string const &, string const &, string const &);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
~InsetUrl();
|
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
Inset * Clone() { return new InsetUrl(getCommand()); }
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
Inset::Code LyxCode() const { return Inset::URL_CODE; }
|
|
|
|
///
|
|
|
|
void Validate(LaTeXFeatures &) const;
|
|
|
|
///
|
|
|
|
void Edit(int, int);
|
|
|
|
///
|
|
|
|
unsigned char Editable() const {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
char const * EditMessage() {return "Opened Url";}
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
bool Display() const { return false; }
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string getScreenLabel() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
InsetUrl::Url_Flags getFlag() const { return flag; }
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
void setFlag(InsetUrl::Url_Flags f) { flag = f; }
|
|
|
|
///
|
|
|
|
void gotoLabel();
|
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
int Latex(FILE * file, signed char fragile);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
int Latex(string & file, signed char fragile);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
int Linuxdoc(string & file);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
int DocBook(string & file);
|
1999-10-19 15:06:30 +00:00
|
|
|
///
|
|
|
|
static void CloseUrlCB(FL_OBJECT *, long data);
|
1999-09-27 18:44:28 +00:00
|
|
|
private:
|
|
|
|
///
|
|
|
|
Url_Flags flag;
|
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
FD_form_url * fd_form_url;
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|