+2000-09-29 Allan Rae <rae@lyx.org>
+
+ * src/frontends/xforms/FormBase.[Ch] (connect, disconnect): new.
+ Allow derived type to control connection and disconnection from signals
+ of its choice if desired.
+
2000-09-28 Juergen Vigna <jug@sad.it>
* src/insets/insettabular.C (update): fixed cursor setting when
FL_PLACE_MOUSE | FL_FREE_SIZE,
FL_TRANSIENT,
title.c_str());
- if( uSignal_ )
- u_ = uSignal_->connect(slot(this, &FormBase::update));
- h_ = hSignal_->connect(slot(this, &FormBase::hide));
+ connect();
}
}
{
if (form() && form()->visible) {
fl_hide_form(form());
- u_.disconnect();
- h_.disconnect();
+ disconnect();
}
// free up the dialog for another inset
}
+void FormBase::connect()
+{
+ if ( uSignal_ ) {
+ u_ = uSignal_->connect(slot(this, &FormBase::update));
+ }
+ h_ = hSignal_->connect(slot(this, &FormBase::hide));
+}
+
+
+void FormBase::disconnect()
+{
+ if (u_) {
+ u_.disconnect();
+ }
+ h_.disconnect();
+}
+
+
int FormBase::WMHideCB(FL_FORM * form, void *)
{
// Ensure that the signals (u and h) are disconnected even if the
#endif
/** This class is an XForms GUI base class
+ @author Angus Leeming
*/
class FormBase : public DialogBase, public noncopyable {
public:
void show();
/// Hide the dialog.
void hide();
+ /// Connect signals
+ virtual void connect();
+ /// Disconnect signals
+ virtual void disconnect();
/// Build the dialog
virtual void build() = 0;
/// Filter the inputs on callback from xforms