2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2000 The LyX Team.
9 * ======================================================
11 * \author Angus Leeming <a.leeming@ic.ac.uk>
17 #pragma implementation
26 #include "support/LAssert.h"
29 FormBase::FormBase(ControlBase & c, string const & t)
30 : ViewBC<qt2BC>(c), title_(t)
41 update(); // make sure its up-to-date
43 if (form()->isVisible()) {
46 form()->setCaption( title_.c_str() );
54 if (form() && form()->isVisible() )
59 // void FormBase::InputCB(FL_OBJECT * ob, long data)
61 // bc().input(input(ob, data));
65 // ButtonPolicy::SMInput FormBase::input(FL_OBJECT *, long)
67 // return ButtonPolicy::SMI_VALID;
73 // FormBase * GetForm(QWidget * ob)
75 // Assert(ob && ob->form && ob->form->u_vdata);
76 // FormBase * pre = static_cast<FormBase *>(ob->form->u_vdata);
83 // extern "C" int C_FormBaseWMHideCB(FL_FORM * form, void *)
85 // // Close the dialog cleanly, even if the WM is used to do so.
86 // Assert(form && form->u_vdata);
87 // FormBase * pre = static_cast<FormBase *>(form->u_vdata);
88 // pre->CancelButton();
93 // extern "C" void C_FormBaseApplyCB(FL_OBJECT * ob, long)
95 // GetForm(ob)->ApplyButton();
99 // extern "C" void C_FormBaseOKCB(FL_OBJECT * ob, long)
101 // GetForm(ob)->OKButton();
105 // extern "C" void C_FormBaseCancelCB(FL_OBJECT * ob, long)
107 // FormBase * form = GetForm(ob);
108 // form->CancelButton();
112 // extern "C" void C_FormBaseRestoreCB(FL_OBJECT * ob, long)
114 // GetForm(ob)->RestoreButton();
118 // extern "C" void C_FormBaseInputCB(FL_OBJECT * ob, long d)
120 // GetForm(ob)->InputCB(ob, d);