+2000-07-27 Lars Gullik Bjønnes <larsbj@lyx.org>
+
+ * src/frontends/xforms/FormUrl.h: ditto
+
+ * src/frontends/xforms/FormPrint.h: ditto
+
+ * src/frontends/xforms/FormPreferences.h: ditto
+
+ * src/frontends/xforms/FormCopyright.h: ditto
+
+ * src/frontends/xforms/FormCitation.C: ditto
+
+ * src/frontends/Dialogs.h (class Dialogs): use noncopyable, remove
+ private copyconstructor and private default contructor
+
+ * src/support/Makefile.am: add utility.hpp
+
+ * src/support/utility.hpp: new file from boost
+
+ * src/insets/insetbib.h: set owner in clone
+
+ * src/frontends/xforms/FormCitation.C: added missing include
+ algorithm
+
+ * src/insets/form_url.[Ch]: removed
+
2000-07-26 Kayvan A. Sylvan <kayvan@sylvan.com>
* development/lyx.spec.in
src/gettext.h
src/insets/figinset.C
src/insets/form_graphics.C
-src/insets/form_url.C
src/insets/insetbib.C
src/insets/inset.C
src/insets/inseterror.C
#include <vector>
#include <sigc++/signal_system.h>
-using std::vector;
-
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Signal0;
-using SigC::Signal1;
-#endif
-
#include "LString.h"
+#include "support/utility.hpp"
class DialogBase;
class InsetTabular;
class InsetUrl;
+using std::vector;
+
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::Signal0;
+using SigC::Signal1;
+#endif
+
/** Container of all dialogs and signals a LyXView needs or uses to access them
The list of dialog signals isn't comprehensive but should be a good guide
for any future additions. Remember don't go overboard -- think minimal.
*/
-class Dialogs
+class Dialogs : public noncopyable
{
public:
/**@name Constructors and Deconstructors */
Signal1<void, InsetInfo *> showInfo;
//@}
private:
- /// Disallow default constructor
- Dialogs() {}
- /// Disallow copy constructor
- Dialogs(Dialogs &) {}
///
vector<DialogBase *> dialogs_;
};
*/
#include <config.h>
-#include "gettext.h"
+
+#include <algorithm>
+
#include FORMS_H_LOCATION
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+
+#include "gettext.h"
#include "BufferView.h"
#include "Dialogs.h"
#include "FormCitation.h"
#include "insets/insetcite.h"
#include "support/filetools.h"
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
using std::vector;
using std::pair;
using std::max;
#ifndef FORMCITATION_H
#define FORMCITATION_H
+#include <vector>
+
#include "DialogBase.h"
#include "LString.h"
-#include <vector>
+#include "support/utility.hpp"
+
+#ifndef __GNUG__
+#pragma interface
+#endif
class Dialogs;
// same arguement as in Dialogs.h s/LyX/UI/
/** This class provides an XForms implementation of the FormCitation Dialog.
*/
-class FormCitation : public DialogBase {
+class FormCitation : public DialogBase, public noncopyable {
public:
///
enum State {
//@}
private:
- FormCitation() {}
- FormCitation(FormCitation &) : DialogBase() {}
-
/**@name Slot Methods */
//@{
/// Create the dialog if necessary, update it and display it.
*/
#include <config.h>
-#include "lyx_gui_misc.h"
-#include "gettext.h"
+
#include FORMS_H_LOCATION
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
#include "xform_macros.h"
#include "FormCopyright.h"
#include "Dialogs.h"
#include "LyXView.h"
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
+#include "lyx_gui_misc.h"
+#include "gettext.h"
C_RETURNCB(FormCopyright, WMHideCB)
C_GENERICCB(FormCopyright, OKCB)
#include "DialogBase.h"
#include "form_copyright.h"
+#include "support/utility.hpp"
+
+#ifdef __GNUG__
+#pragma interface
+#endif
class Dialogs;
// same arguement as in Dialogs.h s/LyX/UI/
/** This class provides an XForms implementation of the FormCopyright Dialog.
*/
-class FormCopyright : public DialogBase {
+class FormCopyright : public DialogBase, public noncopyable {
public:
/**@name Constructors and Destructors */
//@{
//@}
private:
- FormCopyright() {}
- FormCopyright(FormCopyright &) : DialogBase() {}
-
/**@name Slot Methods */
//@{
/// Create the dialog if necessary, update it and display it.
*/
#include <config.h>
-#include "lyx_gui_misc.h"
-#include "gettext.h"
+
#include FORMS_H_LOCATION
+#ifdef __GNUG_
+#pragma implementation
+#endif
+
#include "FormPreferences.h"
#include "form_preferences.h"
#include "xform_macros.h"
#include "Dialogs.h"
#include "lyxrc.h"
#include "debug.h"
-
+#include "lyx_gui_misc.h"
+#include "gettext.h"
#ifdef SIGC_CXX_NAMESPACES
using SigC::slot;
#define FORMPREFERENCES_H
#include "DialogBase.h"
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Connection;
+#include "support/utility.hpp"
+
+#ifdef __GNUG_
+#pragma interface
#endif
class LyXView;
struct FD_form_printer;
struct FD_form_paths;
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::Connection;
+#endif
+
/** This class provides an XForms implementation of the FormPreferences Dialog.
The preferences dialog allows users to set/save their preferences.
*/
-class FormPreferences : public DialogBase {
+class FormPreferences : public DialogBase, public noncopyable {
public:
/**@name Constructors and Destructors */
//@{
//@}
private:
- FormPreferences() {}
- FormPreferences(FormPreferences &) : DialogBase() {}
-
/**@name Slot Methods */
//@{
/// Create the dialog if necessary, update it and display it.
*/
#include <config.h>
-#include "lyx_gui_misc.h"
-#include "gettext.h"
+
#include FORMS_H_LOCATION
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
#include "FormPrint.h"
#include "form_print.h"
#include "xform_macros.h"
#include "Liason.h"
#include "debug.h"
#include "BufferView.h"
+#include "lyx_gui_misc.h"
+#include "gettext.h"
#ifdef SIGC_CXX_NAMESPACES
#define FORMPRINT_H
#include "DialogBase.h"
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Connection;
+#include "support/utility.hpp"
+
+#ifdef __GNUG__
+#pragma interface
#endif
class LyXView;
class Dialogs;
struct FD_form_print;
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::Connection;
+#endif
+
/** This class provides an XForms implementation of the FormPrint Dialog.
The print dialog allows users to print their documents.
*/
-class FormPrint : public DialogBase {
+class FormPrint : public DialogBase, public noncopyable {
public:
/**@name Constructors and Destructors */
//@{
//@}
private:
- FormPrint() {}
- FormPrint(FormPrint &) : DialogBase() {}
-
/**@name Slot Methods */
//@{
/// Create the dialog if necessary, update it and display it.
*/
#include <config.h>
-#include "gettext.h"
+
#include FORMS_H_LOCATION
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+
+#include "gettext.h"
#include "BufferView.h"
#include "Dialogs.h"
#include "FormUrl.h"
#include "insets/inseturl.h"
#include "support/filetools.h"
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
C_RETURNCB(FormUrl, WMHideCB)
C_GENERICCB(FormUrl, OKCB)
C_GENERICCB(FormUrl, CancelCB)
#include "DialogBase.h"
#include "LString.h"
+#include "support/utility.hpp"
+
class Dialogs;
class LyXView;
class InsetCommandParams;
class InsetUrl;
struct FD_form_url;
+#ifdef __GNUG__
+#pragma interface
+#endif
+
/** This class provides an XForms implementation of the FormUrl Dialog.
*/
-class FormUrl : public DialogBase {
+class FormUrl : public DialogBase, public noncopyable {
public:
/**@name Constructors and Destructors */
//@{
//@}
private:
- FormUrl() {}
- FormUrl(FormUrl &) : DialogBase() {}
-
/**@name Slot Methods */
//@{
/// Create the dialog if necessary, update it and display it.
FormTabular.h \
form_tabular.C \
form_tabular.h \
+ FormUrl.C \
+ FormUrl.h \
+ form_url.C \
+ form_url.h \
Toolbar_pimpl.C \
Toolbar_pimpl.h \
Menubar_pimpl.C \
+++ /dev/null
-// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext
-#include <config.h>
-#include "lyx_gui_misc.h"
-#include "gettext.h"
-
-/* Form definition file generated with fdesign. */
-
-#include FORMS_H_LOCATION
-#include <cstdlib>
-#include "form_url.h"
-
-FD_form_url *create_form_form_url(void)
-{
- FL_OBJECT *obj;
- FD_form_url *fdui = (FD_form_url *) fl_calloc(1, sizeof(FD_form_url));
-
- fdui->form_url = fl_bgn_form(FL_NO_BOX, 530, 150);
- obj = fl_add_box(FL_UP_BOX, 0, 0, 530, 150, "");
- fdui->url_name = obj = fl_add_input(FL_NORMAL_INPUT, 50, 20, 460, 30, _("Url"));
- fl_set_input_shortcut(obj, scex(_("Url|#U")), 1);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fdui->name_name = obj = fl_add_input(FL_NORMAL_INPUT, 50, 60, 460, 30, _("Name"));
- fl_set_input_shortcut(obj, scex(_("Name|#N")), 1);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fdui->radio_html = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 50, 110, 250, 30, _("HTML type"));
- fl_set_button_shortcut(obj, scex(_("HTML type|#H")), 1);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON, 410, 110, 100, 30, _("Close"));
- fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, C_InsetUrl_CloseUrlCB, 0);
- fl_end_form();
-
- //fdui->form_url->fdui = fdui;
-
- return fdui;
-}
-/*---------------------------------------*/
-
+++ /dev/null
-/** Header file generated with fdesign on Mon Oct 25 15:21:02 1999.**/
-
-#ifndef FD_form_url_h_
-#define FD_form_url_h_
-
-/** Callbacks, globals and object handlers **/
-extern "C" void C_InsetUrl_CloseUrlCB(FL_OBJECT *, long);
-
-
-/**** Forms and Objects ****/
-typedef struct {
- FL_FORM *form_url;
- void *vdata;
- char *cdata;
- long ldata;
- FL_OBJECT *url_name;
- FL_OBJECT *name_name;
- FL_OBJECT *radio_html;
- FL_OBJECT *button_close;
-} FD_form_url;
-
-extern FD_form_url * create_form_form_url(void);
-
-#endif /* FD_form_url_h_ */
///
Inset * Clone() const {
- return new InsetBibtex(getCmdName(), getOptions(), 0);
+ return new InsetBibtex(getCmdName(), getOptions(), owner);
}
///
Inset::Code LyxCode() const
syscontr.C \
syscontr.h \
syssingleton.C \
- textutils.h
+ textutils.h \
+ utility.hpp
--- /dev/null
+// boost utility.hpp header file ----------------------------------------//
+
+// (C) Copyright boost.org 1999. Permission to copy, use, modify, sell
+// and distribute this software is granted provided this copyright
+// notice appears in all copies. This software is provided "as is" without
+// express or implied warranty, and with no claim as to its suitability for
+// any purpose.
+
+// See http://www.boost.org for most recent version including documentation.
+
+// Classes appear in alphabetical order
+
+// Revision History
+// 10 Dec 99 next() and prior() templates added.
+// 30 Aug 99 moved cast templates to cast.hpp
+// 3 Aug 99 cast templates added
+// 20 Jul 99 name changed to utility.hpp
+// 9 Jun 99 protected noncopyable default ctor
+// 2 Jun 99 Initial Version. Class noncopyable only contents.
+
+#ifndef BOOST_UTILITY_HPP
+#define BOOST_UTILITY_HPP
+
+//#include <boost/config.hpp>
+//#include <cstddef> // for size_t
+
+//namespace boost
+//{
+
+// next() and prior() template functions -----------------------------------//
+
+ // Helper functions for classes like bidirectional iterators not supporting
+ // operator+ and operator-.
+ //
+ // Usage:
+ // const std::list<T>::iterator p = get_some_iterator();
+ // const std::list<T>::iterator prev = boost::prior(p);
+
+ // Contributed by Dave Abrahams
+
+ template <class T>
+ T next(T x) { return ++x; }
+
+ template <class T>
+ T prior(T x) { return --x; }
+
+
+// class noncopyable -------------------------------------------------------//
+
+ // Private copy constructor and copy assignment ensure classes derived from
+ // class noncopyable cannot be copied.
+
+ // Contributed by Dave Abrahams
+
+ class noncopyable
+ {
+ protected:
+ noncopyable(){}
+ private: // emphasize the following members are private
+ noncopyable( const noncopyable& );
+ const noncopyable& operator=( const noncopyable& );
+ }; // noncopyable
+
+//} // namespace boost
+
+#endif // BOOST_UTILITY_HPP