-extern "C" void C_InsetUrl_CloseUrlCB(FL_OBJECT * ob, long data)
-{
- InsetUrl::CloseUrlCB(ob, data);
-}
-
-
-char const * InsetUrl::EditMessage() const
-{
- return _("Opened Url");
-}
-
-
-void InsetUrl::Edit(BufferView * bv, int, int, unsigned int)
-{
- static int ow = -1, oh;
-
- if(bv->buffer()->isReadonly())
- WarnReadonly(bv->buffer()->fileName());
-
- if (!fd_form_url) {
- fd_form_url = create_form_form_url();
- holder.inset = this;
- fd_form_url->button_close->u_vdata = &holder;
- fl_set_form_atclose(fd_form_url->form_url,
- CancelCloseBoxCB, 0);
- }
- holder.view = bv;
- fl_set_input(fd_form_url->url_name, getContents().c_str());
- fl_set_input(fd_form_url->name_name, getOptions().c_str());
- switch(flag) {
- case InsetUrl::URL:
- fl_set_button(fd_form_url->radio_html, 0);
- break;
- case InsetUrl::HTML_URL:
- fl_set_button(fd_form_url->radio_html, 1);
- break;
- }
-
- if (fd_form_url->form_url->visible) {
- fl_raise_form(fd_form_url->form_url);
- } else {
- fl_show_form(fd_form_url->form_url,
- FL_PLACE_MOUSE | FL_FREE_SIZE,
- FL_FULLBORDER, _("Insert Url"));
- if (ow < 0) {
- ow = fd_form_url->form_url->w;
- oh = fd_form_url->form_url->h;
- }
- fl_set_form_minsize(fd_form_url->form_url, ow, oh);
- }
-}
-
-
-string InsetUrl::getScreenLabel() const