]> git.lyx.org Git - lyx.git/blob - src/insets/inseturl.h
removed a warning from screen and added CFLAGS in lyx.spec.in.
[lyx.git] / src / insets / inseturl.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *       
7  *          Copyright (C) 1997 LyX Team (this file was created this year)
8  * 
9  *======================================================*/
10
11 #ifndef _INSET_URL_H
12 #define _INSET_URL_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "insetcommand.h"
19 #include "buffer.h"
20 #include "form_url.h"
21
22 struct LaTeXFeatures;
23
24 /** The url inset  
25  */
26 class InsetUrl: public InsetCommand {
27 public:
28         ///
29         enum Url_Flags {
30                 ///
31                 URL,
32                 ///
33                 HTML_URL
34         };
35         
36         ///
37         InsetUrl(): InsetCommand("url"), fd_form_url(0) { flag = InsetUrl::URL; }
38         ///
39         InsetUrl(string const &);
40         ///
41         InsetUrl(InsetCommand const&);
42         ///
43         InsetUrl(string const &,string const &,string const &);
44         ///
45         ~InsetUrl();
46         ///
47         Inset* Clone() { return new InsetUrl(getCommand()); }
48         ///
49         Inset::Code LyxCode() const { return Inset::URL_CODE; }
50         ///
51         void Validate(LaTeXFeatures &) const;
52         ///
53         void Edit(int, int);
54         ///
55         unsigned char Editable() const {
56                 return 1;
57         }
58         ///
59         char const* EditMessage() {return "Opened Url";}
60         ///
61         bool Display() const { return false; }
62         ///
63         string getScreenLabel() const;
64         ///
65         InsetUrl::Url_Flags getFlag() { return flag; }
66         ///
67         void setFlag(InsetUrl::Url_Flags f) { flag = f; }
68         ///
69         void gotoLabel();
70         ///
71         int Latex(FILE *file, signed char fragile);
72         ///
73         int Latex(string &file, signed char fragile);
74         ///
75         int Linuxdoc(string &file);
76         ///
77         int DocBook(string &file);
78         ///
79         static void CloseUrlCB(FL_OBJECT *, long data);
80 private:
81         ///
82         Url_Flags flag;
83         ///
84         FD_form_url *fd_form_url;
85 };
86
87 #endif