]> git.lyx.org Git - features.git/blob - src/insets/inseturl.h
Initial revision
[features.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
21 struct LaTeXFeatures;
22
23 /** The url inset  
24  */
25 class InsetUrl: public InsetCommand {
26 public:
27         ///
28         enum Url_Flags {
29                 ///
30                 URL,
31                 ///
32                 HTML_URL
33         };
34         
35         ///
36         InsetUrl(): InsetCommand("url"), form(0) { flag = InsetUrl::URL; }
37         ///
38         InsetUrl(LString const &);
39         ///
40         InsetUrl(InsetCommand const&);
41         ///
42         InsetUrl(LString const &,LString const &,LString const &);
43         ///
44         ~InsetUrl();
45         ///
46         Inset* Clone() { return new InsetUrl(getCommand()); }
47         ///
48         Inset::Code LyxCode() const { return Inset::URL_CODE; }
49         ///
50         void Validate(LaTeXFeatures &) const;
51         ///
52         void Edit(int, int);
53         ///
54         unsigned char Editable() const {
55                 return 1;
56         }
57         ///
58         char const* EditMessage() {return "Opened Url";}
59         ///
60         bool Display() const { return false; }
61         ///
62         LString getScreenLabel() const;
63         ///
64         InsetUrl::Url_Flags getFlag() { return flag; }
65         ///
66         void setFlag(InsetUrl::Url_Flags f) { flag = f; }
67         ///
68         void gotoLabel();
69         ///
70         int Latex(FILE *file, signed char fragile);
71         ///
72         int Latex(LString &file, signed char fragile);
73         ///
74         int Linuxdoc(LString &file);
75         ///
76         int DocBook(LString &file);
77 private:
78         ///
79         Url_Flags flag;
80         ///
81         FL_FORM *form;
82         ///
83         FL_OBJECT *url_name;
84         ///
85         FL_OBJECT *name_name;
86         ///
87         FL_OBJECT *radio_html;
88         ///
89         static void CloseUrlCB(FL_OBJECT *, long data);
90 };
91
92 #endif