[gtkmm] Split H/V* classes into separate files.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Split H/V* classes into separate files.
- Date: Sat, 11 Jun 2011 10:15:59 +0000 (UTC)
commit a55700ca2908c50f006c321bfa1c0a5108ce3974
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Jun 10 22:18:42 2011 +0200
Split H/V* classes into separate files.
* gtk/src/filelist.am:
* gtk/src/box.hg:
* gtk/src/buttonbox.[hg|ccg]:
* gtk/src/filelist.am:
* gtk/src/hvbox.[hg|ccg]:
* gtk/src/hvbuttonbox.[hg|ccg]:
* gtk/src/hvpaned.[hg|ccg]:
* gtk/src/hvscale.[hg|ccg]:
* gtk/src/hvseparator.[hg|ccg]:
* gtk/src/paned.hg:
* gtk/src/scale.[hg|ccg]:
* gtk/src/separator.hg: Move the deprecated classes into
separate files because gmmproc deprecates the whole file when
using _IS_DEPRECATED, which causes the non-deprecated classes to
be ifdefed too.
ChangeLog | 26 ++++++++------
gtk/gtkmm.h | 5 +++
gtk/src/box.hg | 62 -------------------------------
gtk/src/buttonbox.ccg | 15 --------
gtk/src/buttonbox.hg | 49 -------------------------
gtk/src/hvbox.ccg | 26 +++++++++++++
gtk/src/hvbox.hg | 89 +++++++++++++++++++++++++++++++++++++++++++++
gtk/src/hvbuttonbox.ccg | 39 ++++++++++++++++++++
gtk/src/hvbuttonbox.hg | 76 ++++++++++++++++++++++++++++++++++++++
gtk/src/hvpaned.ccg | 24 ++++++++++++
gtk/src/hvpaned.hg | 65 +++++++++++++++++++++++++++++++++
gtk/src/hvscale.ccg | 87 ++++++++++++++++++++++++++++++++++++++++++++
gtk/src/hvscale.hg | 93 +++++++++++++++++++++++++++++++++++++++++++++++
gtk/src/hvseparator.ccg | 18 +++++++++
gtk/src/hvseparator.hg | 71 ++++++++++++++++++++++++++++++++++++
gtk/src/paned.hg | 39 --------------------
gtk/src/scale.ccg | 60 +++---------------------------
gtk/src/scale.hg | 74 ++++---------------------------------
gtk/src/separator.hg | 42 ---------------------
19 files changed, 622 insertions(+), 338 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 21529e4..f75de39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,17 +1,21 @@
2011-06-10 Murray Cumming <murrayc murrayc com>
- Several classes: Derive from Box instead of HBox or VBox.
+ Split H/V* classes into separate files.
- * gtk/src/colorselection.hg:
- * gtk/src/filechooserbutton.hg:
- * gtk/src/filechooserwidget.hg:
- * gtk/src/fontselection.hg:
- * gtk/src/hvbox.ccg:
- * gtk/src/hvbox.hg:
- * gtk/src/infobar.hg:
- * gtk/src/recentchooserwidget.hg:
- * gtk/src/statusbar.hg: The base class was changed in GTK+ in
- GTK+ 3.1.x. And HBox and VBox are deprecated now.
+ * gtk/src/filelist.am:
+ * gtk/src/box.hg:
+ * gtk/src/buttonbox.[hg|ccg]:
+ * gtk/src/hvbox.[hg|ccg]:
+ * gtk/src/hvbuttonbox.[hg|ccg]:
+ * gtk/src/hvpaned.[hg|ccg]:
+ * gtk/src/hvscale.[hg|ccg]:
+ * gtk/src/hvseparator.[hg|ccg]:
+ * gtk/src/paned.hg:
+ * gtk/src/scale.[hg|ccg]:
+ * gtk/src/separator.hg: Move the deprecated classes into
+ separate files because gmmproc deprecates the whole file when
+ using _IS_DEPRECATED, which causes the non-deprecated classes to
+ be ifdefed too.
2011-06-10 Murray Cumming <murrayc murrayc com>
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index 2c7754a..a23491a 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -150,6 +150,11 @@ extern const int gtkmm_micro_version;
#include <gtkmm/frame.h>
#include <gtkmm/grid.h>
#include <gtkmm/handlebox.h>
+#include <gtkmm/hvbox.h>
+#include <gtkmm/hvbuttonbox.h>
+#include <gtkmm/hvpaned.h>
+#include <gtkmm/hvscale.h>
+#include <gtkmm/hvseparator.h>
#include <gtkmm/iconset.h>
#include <gtkmm/iconfactory.h>
#include <gtkmm/iconsource.h>
diff --git a/gtk/src/box.hg b/gtk/src/box.hg
index 247dbd1..0a6604d 100644
--- a/gtk/src/box.hg
+++ b/gtk/src/box.hg
@@ -20,10 +20,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/container_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
-
#include <gtkmm/container.h>
#include <gtkmm/orientable.h>
#include <gtk/gtk.h> /* For _GtkBoxChild */
@@ -118,63 +114,5 @@ public:
_WRAP_PROPERTY("homogeneous", bool)
};
-//TODO: Remove HBox and VBox now that Box can be instantiated?
-/** Vertical Box for laying widgets in a vertical row.
- *
- * You should create these objects, but it is more confortable to pass
- * around pointers of Gtk::Box. All the methods that do anything are in
- * class Gtk::Box and this allows you to later change the direction of the
- * box, when there's no dependencies to HBox and VBox classes.
- *
- * @ingroup Widgets
- * @ingroup Containers
- *
- * @deprecated Use Box instead, which is a very quick and easy change. But we recommend switching to Grid, since
- * Box will go away eventually.
- */
-class VBox : public Box
-{
- _CLASS_GTKOBJECT(VBox,GtkVBox,GTK_VBOX,Gtk::Box,GtkBox)
- _IS_DEPRECATED
-public:
-
- //TODO: Remove the homogoenous parameter as it was removed in gtk_box_new().
- /** Creates a new vertical box.
- * @param spacing Determines the space in pixels between child widgets.
- */
- _WRAP_CTOR(VBox(bool homogeneous = false, int spacing = 0), gtk_vbox_new)
-};
-
-/** Horizontal Box for laying widgets in a horizontal row.
- *
- * You should create these objects, but it is more confortable to pass
- * around pointers of Gtk::Box. All the methods that do anything are in
- * class Gtk::Box and this allows you to later change the direction of the
- * box, when there's no dependencies to HBox and VBox classes.
- *
- * Use the Gtk::Box packing interface to determine the arrangement, spacing,
- * width, and alignment of Gtk::HBox children.
- *
- * All children are allocated the same height.
- *
- * @ingroup Widgets
- * @ingroup Containers
- *
- * @deprecated Use Box instead, which is a very quick and easy change. But we recommend switching to Grid, since
- * Box will go away eventually.
- */
-class HBox : public Box
-{
- _CLASS_GTKOBJECT(HBox,GtkHBox,GTK_HBOX,Gtk::Box,GtkBox)
- _IS_DEPRECATED
-public:
-
- //TODO: Remove the homogoenous parameter as it was removed in gtk_box_new().
- /** Creates a new horizontal box.
- * @param spacing Determines the space in pixels between child widgets.
- */
- _WRAP_CTOR(HBox(bool homogeneous = false, int spacing = 0), gtk_hbox_new)
-
-};
} // namespace Gtk
diff --git a/gtk/src/buttonbox.ccg b/gtk/src/buttonbox.ccg
index b90af69..cde8287 100644
--- a/gtk/src/buttonbox.ccg
+++ b/gtk/src/buttonbox.ccg
@@ -25,20 +25,5 @@
namespace Gtk
{
-VButtonBox::VButtonBox(ButtonBoxStyle layout, int spacing)
-:
- _CONSTRUCT_SPECIFIC(ButtonBox, VButtonBox)
-{
- set_layout(layout);
- set_spacing(spacing);
-}
-
-HButtonBox::HButtonBox(ButtonBoxStyle layout, int spacing)
-:
- _CONSTRUCT_SPECIFIC(ButtonBox, HButtonBox)
-{
- set_layout(layout);
- set_spacing(spacing);
-}
} // namespace Gtk
diff --git a/gtk/src/buttonbox.hg b/gtk/src/buttonbox.hg
index 8e1f851..075145d 100644
--- a/gtk/src/buttonbox.hg
+++ b/gtk/src/buttonbox.hg
@@ -23,9 +23,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/box_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
namespace Gtk
{
@@ -63,51 +60,5 @@ public:
_WRAP_PROPERTY("layout-style", ButtonBoxStyle)
};
-/** A container for arranging buttons vertically.
- *
- * A button box should be used to provide a consistent layout of buttons
- * throughout your application. There is one default layout and a default spacing
- * value that are persistant across all Gtk::VButtonBox widgets.
- *
- * The layout/spacing can then be altered by the programmer, or if desired,
- * by the user to alter the 'feel' of a program to a small degree.
- *
- * @ingroup Widgets
- * @ingroup Containers
- *
- * @deprecated Use ButtonBox instead.
- */
-class VButtonBox : public ButtonBox
-{
- _CLASS_GTKOBJECT(VButtonBox,GtkVButtonBox,GTK_VBUTTON_BOX,Gtk::ButtonBox,GtkButtonBox)
- _IS_DEPRECATED
-public:
- explicit VButtonBox(ButtonBoxStyle layout = BUTTONBOX_EDGE, int spacing = BUTTONBOX_DEFAULT_SPACING);
-};
-
-/** A container for arranging buttons horizontally.
- *
- * A button box should be used to provide a consistent layout of buttons
- * throughout your application. There is one default layout and a default spacing
- * value that are persistant across all Gtk::HButtonBox widgets.
- *
- * The layout/spacing can then be altered by the programmer, or if desired,
- * by the user to alter the 'feel' of a program to a small degree.
- *
- * The HButtonBox widget looks like this:
- * @image html hbuttonbox1.png
- *
- * @ingroup Widgets
- * @ingroup Containers
- *
- * @deprecated Use ButtonBox instead.
- */
-class HButtonBox : public ButtonBox
-{
- _CLASS_GTKOBJECT(HButtonBox,GtkHButtonBox,GTK_HBUTTON_BOX,Gtk::ButtonBox,GtkButtonBox)
- _IS_DEPRECATED
-public:
- explicit HButtonBox(ButtonBoxStyle layout = BUTTONBOX_EDGE, int spacing = BUTTONBOX_DEFAULT_SPACING);
-};
} // namespace Gtk
diff --git a/gtk/src/hvbox.ccg b/gtk/src/hvbox.ccg
new file mode 100644
index 0000000..b9811e3
--- /dev/null
+++ b/gtk/src/hvbox.ccg
@@ -0,0 +1,26 @@
+/* Copyright 1998-2011 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <gtk/gtk.h>
+#include <glibmm/wrap.h>
+
+
+namespace Gtk
+{
+
+
+} /* namespace Gtk */
diff --git a/gtk/src/hvbox.hg b/gtk/src/hvbox.hg
new file mode 100644
index 0000000..6bee6c4
--- /dev/null
+++ b/gtk/src/hvbox.hg
@@ -0,0 +1,89 @@
+/* Copyright (C) 1998-2011 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/box_p.h)
+
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
+
+#include <gtkmm/box.h>
+
+namespace Gtk
+{
+
+//TODO: Remove HBox and VBox now that Box can be instantiated?
+/** Vertical Box for laying widgets in a vertical row.
+ *
+ * You should create these objects, but it is more comfortable to pass
+ * around pointers of Gtk::Box. All the methods that do anything are in
+ * class Gtk::Box and this allows you to later change the direction of the
+ * box, when there's no dependencies to HBox and VBox classes.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ *
+ * @deprecated Use Box instead, which is a very quick and easy change. But we recommend switching to Grid, since
+ * Box will go away eventually.
+ */
+class VBox : public Box
+{
+ _CLASS_GTKOBJECT(VBox,GtkVBox,GTK_VBOX,Gtk::Box,GtkBox)
+ _IS_DEPRECATED
+public:
+
+ //TODO: Remove the homogoenous parameter as it was removed in gtk_box_new().
+ /** Creates a new vertical box.
+ * @param spacing Determines the space in pixels between child widgets.
+ */
+ _WRAP_CTOR(VBox(bool homogeneous = false, int spacing = 0), gtk_vbox_new)
+};
+
+/** Horizontal Box for laying widgets in a horizontal row.
+ *
+ * You should create these objects, but it is more comfortable to pass
+ * around pointers of Gtk::Box. All the methods that do anything are in
+ * class Gtk::Box and this allows you to later change the direction of the
+ * box, when there's no dependencies to HBox and VBox classes.
+ *
+ * Use the Gtk::Box packing interface to determine the arrangement, spacing,
+ * width, and alignment of Gtk::HBox children.
+ *
+ * All children are allocated the same height.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ *
+ * @deprecated Use Box instead, which is a very quick and easy change. But we recommend switching to Grid, since
+ * Box will go away eventually.
+ */
+class HBox : public Box
+{
+ _CLASS_GTKOBJECT(HBox,GtkHBox,GTK_HBOX,Gtk::Box,GtkBox)
+ _IS_DEPRECATED
+public:
+
+ //TODO: Remove the homogoenous parameter as it was removed in gtk_box_new().
+ /** Creates a new horizontal box.
+ * @param spacing Determines the space in pixels between child widgets.
+ */
+ _WRAP_CTOR(HBox(bool homogeneous = false, int spacing = 0), gtk_hbox_new)
+
+};
+
+} // namespace Gtk
diff --git a/gtk/src/hvbuttonbox.ccg b/gtk/src/hvbuttonbox.ccg
new file mode 100644
index 0000000..88a0dd3
--- /dev/null
+++ b/gtk/src/hvbuttonbox.ccg
@@ -0,0 +1,39 @@
+/* Copyright 1998-2011 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <gtk/gtk.h>
+
+namespace Gtk
+{
+
+VButtonBox::VButtonBox(ButtonBoxStyle layout, int spacing)
+:
+ _CONSTRUCT_SPECIFIC(ButtonBox, VButtonBox)
+{
+ set_layout(layout);
+ set_spacing(spacing);
+}
+
+HButtonBox::HButtonBox(ButtonBoxStyle layout, int spacing)
+:
+ _CONSTRUCT_SPECIFIC(ButtonBox, HButtonBox)
+{
+ set_layout(layout);
+ set_spacing(spacing);
+}
+
+} // namespace Gtk
diff --git a/gtk/src/hvbuttonbox.hg b/gtk/src/hvbuttonbox.hg
new file mode 100644
index 0000000..838fda5
--- /dev/null
+++ b/gtk/src/hvbuttonbox.hg
@@ -0,0 +1,76 @@
+/* Copyright (C) 1998-2011 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <gtkmm/buttonbox.h>
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/buttonbox_p.h)
+
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
+
+namespace Gtk
+{
+
+/** A container for arranging buttons vertically.
+ *
+ * A button box should be used to provide a consistent layout of buttons
+ * throughout your application. There is one default layout and a default spacing
+ * value that are persistant across all Gtk::VButtonBox widgets.
+ *
+ * The layout/spacing can then be altered by the programmer, or if desired,
+ * by the user to alter the 'feel' of a program to a small degree.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ *
+ * @deprecated Use ButtonBox instead.
+ */
+class VButtonBox : public ButtonBox
+{
+ _CLASS_GTKOBJECT(VButtonBox,GtkVButtonBox,GTK_VBUTTON_BOX,Gtk::ButtonBox,GtkButtonBox)
+ _IS_DEPRECATED
+public:
+ explicit VButtonBox(ButtonBoxStyle layout = BUTTONBOX_EDGE, int spacing = BUTTONBOX_DEFAULT_SPACING);
+};
+
+/** A container for arranging buttons horizontally.
+ *
+ * A button box should be used to provide a consistent layout of buttons
+ * throughout your application. There is one default layout and a default spacing
+ * value that are persistant across all Gtk::HButtonBox widgets.
+ *
+ * The layout/spacing can then be altered by the programmer, or if desired,
+ * by the user to alter the 'feel' of a program to a small degree.
+ *
+ * The HButtonBox widget looks like this:
+ * @image html hbuttonbox1.png
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ *
+ * @deprecated Use ButtonBox instead.
+ */
+class HButtonBox : public ButtonBox
+{
+ _CLASS_GTKOBJECT(HButtonBox,GtkHButtonBox,GTK_HBUTTON_BOX,Gtk::ButtonBox,GtkButtonBox)
+ _IS_DEPRECATED
+public:
+ explicit HButtonBox(ButtonBoxStyle layout = BUTTONBOX_EDGE, int spacing = BUTTONBOX_DEFAULT_SPACING);
+};
+
+} // namespace Gtk
diff --git a/gtk/src/hvpaned.ccg b/gtk/src/hvpaned.ccg
new file mode 100644
index 0000000..a10ea1b
--- /dev/null
+++ b/gtk/src/hvpaned.ccg
@@ -0,0 +1,24 @@
+/* Copyright 1998-2011 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <gtk/gtk.h>
+
+namespace Gtk
+{
+
+} // namespace Gtk
+
diff --git a/gtk/src/hvpaned.hg b/gtk/src/hvpaned.hg
new file mode 100644
index 0000000..e980628
--- /dev/null
+++ b/gtk/src/hvpaned.hg
@@ -0,0 +1,65 @@
+/* Copyright (C) 1998-2011 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <gtkmm/paned.h>
+
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/paned_p.h)
+
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
+
+namespace Gtk
+{
+
+/**
+ * The Gtk::HPaned widget is a container widget with two children arranged
+ * horizontally. The division between the two panes is adjustable by the
+ * user by dragging a handle. See Gtk::Paned for details.
+ *
+ * @ingroup Widgets
+ *
+ * @deprecated Use Paned instead.
+ */
+class HPaned : public Paned
+{
+ _CLASS_GTKOBJECT(HPaned,GtkHPaned,GTK_HPANED,Gtk::Paned,GtkPaned)
+ _IS_DEPRECATED
+public:
+ _CTOR_DEFAULT()
+};
+
+/**
+ * The Gtk::VPaned widget is a container widget with two children arranged
+ * vertically. The division between the two panes is adjustable by the
+ * user by dragging a handle. See Gtk::Paned for details.
+ *
+ * @ingroup Widgets
+ *
+ * @deprecated Use Paned instead.
+ */
+class VPaned : public Paned
+{
+ _CLASS_GTKOBJECT(VPaned,GtkVPaned,GTK_VPANED,Gtk::Paned,GtkPaned)
+ _IS_DEPRECATED
+public:
+ _CTOR_DEFAULT()
+
+};
+
+} // namespace Gtk
diff --git a/gtk/src/hvscale.ccg b/gtk/src/hvscale.ccg
new file mode 100644
index 0000000..2f5242e
--- /dev/null
+++ b/gtk/src/hvscale.ccg
@@ -0,0 +1,87 @@
+// -*- c++ -*-
+/* $Id: scale.ccg,v 1.2 2004/01/19 19:48:44 murrayc Exp $ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <gtkmm/adjustment.h>
+
+#include <gtk/gtk.h>
+#include <math.h>
+#include <cstring> //For strlen()
+#include <memory>
+
+using std::strlen;
+
+namespace Gtk
+{
+
+VScale::VScale(double min, double max, double step)
+:
+ _CONSTRUCT_SPECIFIC(Scale, VScale)
+{
+ Glib::RefPtr<Adjustment> adjustment = Adjustment::create(min, min, max, step, 10 * step, step);
+ set_adjustment(adjustment);
+
+ set_digits( calc_digits_(step) );
+}
+
+VScale::VScale(const Glib::RefPtr<Adjustment>& adjustment)
+:
+ _CONSTRUCT_SPECIFIC(Scale, VScale)
+{
+ set_adjustment(adjustment);
+}
+
+VScale::VScale()
+:
+ _CONSTRUCT_SPECIFIC(Scale, VScale)
+{
+ Glib::RefPtr<Adjustment> adjustment = Adjustment::create(0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0);
+ set_adjustment(adjustment);
+}
+
+HScale::HScale(double min, double max, double step)
+:
+ _CONSTRUCT_SPECIFIC(Scale, HScale)
+{
+ Glib::RefPtr<Adjustment> adjustment = Adjustment::create(min, min, max, step, 10 * step, step);
+ set_adjustment(adjustment);
+
+ set_digits( calc_digits_(step) );
+}
+
+HScale::HScale()
+:
+ _CONSTRUCT_SPECIFIC(Scale, HScale)
+{
+ Glib::RefPtr<Adjustment> adjustment = Adjustment::create(0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0);
+ set_adjustment(adjustment);
+}
+
+HScale::HScale(const Glib::RefPtr<Adjustment>& adjustment)
+:
+ _CONSTRUCT_SPECIFIC(Scale, HScale)
+{
+ set_adjustment(adjustment);
+}
+
+} // namespace Gtk
diff --git a/gtk/src/hvscale.hg b/gtk/src/hvscale.hg
new file mode 100644
index 0000000..a5ab2fe
--- /dev/null
+++ b/gtk/src/hvscale.hg
@@ -0,0 +1,93 @@
+/* $Id: scale.hg,v 1.7 2006/04/12 11:11:25 murrayc Exp $ */
+
+/* scale.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <gtkmm/scale.h>
+_DEFS(gtkmm,gtk)
+
+_PINCLUDE(gtkmm/private/scale_p.h)
+
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
+
+namespace Gtk
+{
+
+/** A vertical slider for selecting values.
+ *
+ * The Gtk::VScale widget is used to allow the user to select a value using a
+ * vertical slider. See the Gtk::Scale documentation for more information
+ * on how to use a Gtk::VScale.
+ *
+ * A VScale widget looks like this:
+ * @image html vscale1.png
+ *
+ * @ingroup Widgets
+ *
+ * @deprecated Use Scale instead.
+ */
+class VScale : public Scale
+{
+ _CLASS_GTKOBJECT(VScale,GtkVScale,GTK_VSCALE,Gtk::Scale,GtkScale)
+ _IS_DEPRECATED
+public:
+ VScale();
+
+ /**
+ * Construct a VScale with the given minimum and maximum. The step size is the
+ * distance the slider moves when the arrow keys are used to adjust the scale
+ * value.
+ */
+ VScale(double min, double max, double step);
+ explicit VScale(const Glib::RefPtr<Adjustment>& adjustment);
+
+};
+
+/** A horizontal slider for selecting values.
+ *
+ * The Gtk::HScale widget is used to allow the user to select a value using a
+ * horizontal slider. See the Gtk::Scale documentation for more information
+ * on how to use a Gtk::HScale.
+ *
+ * The HScale widget looks like this:
+ * @image html hscale1.png
+ *
+ * @ingroup Widgets
+ *
+ * @deprecated Use Scale instead.
+ */
+class HScale : public Scale
+{
+ _CLASS_GTKOBJECT(HScale,GtkHScale,GTK_HSCALE,Gtk::Scale,GtkScale)
+ _IS_DEPRECATED
+public:
+ HScale();
+ /**
+ * Construct a HScale with the given minimum and maximum. The step size is the
+ * distance the slider moves when the arrow keys are used to adjust the scale
+ * value.
+ */
+ HScale(double min, double max, double step);
+ explicit HScale(const Glib::RefPtr<Adjustment>& adjustment);
+
+};
+
+} /* namespace Gtk */
diff --git a/gtk/src/hvseparator.ccg b/gtk/src/hvseparator.ccg
new file mode 100644
index 0000000..7a21129
--- /dev/null
+++ b/gtk/src/hvseparator.ccg
@@ -0,0 +1,18 @@
+/* Copyright 1998-2011 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <gtk/gtk.h>
diff --git a/gtk/src/hvseparator.hg b/gtk/src/hvseparator.hg
new file mode 100644
index 0000000..0887512
--- /dev/null
+++ b/gtk/src/hvseparator.hg
@@ -0,0 +1,71 @@
+/* Copyright (C) 1998-2011 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <gtkmm/separator.h>
+
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/separator_p.h)
+
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
+
+namespace Gtk
+{
+
+
+/** Vertical line widget.
+ * Filler widget used to separate widgets with a visible line.
+ * This widget has no window and receives no configuration events.
+ * It should be considered a leaf widget.
+ *
+ * A VSeparator widget looks like this:
+ * @image html vseparator1.png
+ *
+ * @ingroup Widgets
+ */
+class VSeparator : public Separator
+{
+ _CLASS_GTKOBJECT(VSeparator,GtkVSeparator,GTK_VSEPARATOR,Gtk::Separator,GtkSeparator)
+ _IS_DEPRECATED
+public:
+ _CTOR_DEFAULT
+
+};
+
+
+/** Horizontal line widget.
+ * Filler widget used to separate widgets with a visible line.
+ * This widget has no window and receives no configuration events.
+ * It should be considered a leaf widget.
+ *
+ * The HSeparator widget looks like this:
+ * @image html hseparator1.png
+ *
+ * @ingroup Widgets
+ */
+class HSeparator : public Separator
+{
+ _CLASS_GTKOBJECT(HSeparator,GtkHSeparator,GTK_HSEPARATOR,Gtk::Separator,GtkSeparator)
+ _IS_DEPRECATED
+public:
+ _CTOR_DEFAULT
+
+};
+
+} /* namespace Gtk */
+
diff --git a/gtk/src/paned.hg b/gtk/src/paned.hg
index 90b2f73..a398ad4 100644
--- a/gtk/src/paned.hg
+++ b/gtk/src/paned.hg
@@ -27,10 +27,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/container_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
-
namespace Gtk
{
@@ -109,39 +105,4 @@ public:
_WRAP_PROPERTY("max-position", int)
};
-/**
- * The Gtk::HPaned widget is a container widget with two children arranged
- * horizontally. The division between the two panes is adjustable by the
- * user by dragging a handle. See Gtk::Paned for details.
- *
- * @ingroup Widgets
- *
- * @deprecated Use Paned instead.
- */
-class HPaned : public Paned
-{
- _CLASS_GTKOBJECT(HPaned,GtkHPaned,GTK_HPANED,Gtk::Paned,GtkPaned)
- _IS_DEPRECATED
-public:
- _CTOR_DEFAULT()
-};
-
-/**
- * The Gtk::VPaned widget is a container widget with two children arranged
- * vertically. The division between the two panes is adjustable by the
- * user by dragging a handle. See Gtk::Paned for details.
- *
- * @ingroup Widgets
- *
- * @deprecated Use Paned instead.
- */
-class VPaned : public Paned
-{
- _CLASS_GTKOBJECT(VPaned,GtkVPaned,GTK_VPANED,Gtk::Paned,GtkPaned)
- _IS_DEPRECATED
-public:
- _CTOR_DEFAULT()
-
-};
-
} // namespace Gtk
diff --git a/gtk/src/scale.ccg b/gtk/src/scale.ccg
index eec20b4..d3a4629 100644
--- a/gtk/src/scale.ccg
+++ b/gtk/src/scale.ccg
@@ -32,13 +32,18 @@ using std::strlen;
namespace Gtk
{
+Scale::Scale(Orientation orientation)
+:
+ _CONSTRUCT_SPECIFIC(Range, Scale, "orientation", (GtkOrientation)(orientation))
+{
+}
+
Scale::Scale(const Glib::RefPtr<Adjustment>& adjustment, Orientation orientation)
:
_CONSTRUCT_SPECIFIC(Range, Scale, "adjustment", Glib::unwrap(adjustment), "orientation", (GtkOrientation)(orientation))
{
}
-
int Scale::calc_digits_(double step) const
{
int digits = 0;
@@ -55,57 +60,4 @@ int Scale::calc_digits_(double step) const
return digits;
}
-VScale::VScale(double min, double max, double step)
-:
- _CONSTRUCT_SPECIFIC(Scale, VScale)
-{
- Glib::RefPtr<Adjustment> adjustment = Adjustment::create(min, min, max, step, 10 * step, step);
- set_adjustment(adjustment);
-
- set_digits( calc_digits_(step) );
-}
-
-VScale::VScale(const Glib::RefPtr<Adjustment>& adjustment)
-:
- _CONSTRUCT_SPECIFIC(Scale, VScale)
-{
- set_adjustment(adjustment);
-}
-
-VScale::VScale()
-:
- _CONSTRUCT_SPECIFIC(Scale, VScale)
-{
- Glib::RefPtr<Adjustment> adjustment = Adjustment::create(0.0, 0.0, 0.0,
- 0.0, 0.0, 0.0);
- set_adjustment(adjustment);
-}
-
-
-HScale::HScale(double min, double max, double step)
-:
- _CONSTRUCT_SPECIFIC(Scale, HScale)
-{
- Glib::RefPtr<Adjustment> adjustment = Adjustment::create(min, min, max, step, 10 * step, step);
- set_adjustment(adjustment);
-
- set_digits( calc_digits_(step) );
-}
-
-HScale::HScale()
-:
- _CONSTRUCT_SPECIFIC(Scale, HScale)
-{
- Glib::RefPtr<Adjustment> adjustment = Adjustment::create(0.0, 0.0, 0.0,
- 0.0, 0.0, 0.0);
- set_adjustment(adjustment);
-}
-
-HScale::HScale(const Glib::RefPtr<Adjustment>& adjustment)
-:
- _CONSTRUCT_SPECIFIC(Scale, HScale)
-{
- set_adjustment(adjustment);
-}
-
} // namespace Gtk
diff --git a/gtk/src/scale.hg b/gtk/src/scale.hg
index 368f951..d3a4126 100644
--- a/gtk/src/scale.hg
+++ b/gtk/src/scale.hg
@@ -21,13 +21,8 @@
#include <gtkmm/range.h>
_DEFS(gtkmm,gtk)
-_DEFS(gtkmm,gtk)
-_DEFS(gtkmm,gtk)
-_PINCLUDE(gtkmm/private/range_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
+_PINCLUDE(gtkmm/private/range_p.h)
namespace Gtk
{
@@ -48,8 +43,14 @@ class Scale : public Range
public:
_CTOR_DEFAULT()
+
+ //Note that we try to use the same default parameter value as the default property value.
+ /**
+ * @newin{3,2}
+ */
+ explicit Scale(Orientation orientation = ORIENTATION_HORIZONTAL);
- //Note that we try to use the same defaul parameter value as the default property value.
+ //Note that we try to use the same default parameter value as the default property value.
explicit Scale(const Glib::RefPtr<Adjustment>& adjustment, Orientation orientation = ORIENTATION_HORIZONTAL);
_IGNORE(gtk_scale_new)
@@ -126,63 +127,4 @@ protected:
virtual int calc_digits_(double step) const;
};
-/** A vertical slider for selecting values.
- *
- * The Gtk::VScale widget is used to allow the user to select a value using a
- * vertical slider. See the Gtk::Scale documentation for more information
- * on how to use a Gtk::VScale.
- *
- * A VScale widget looks like this:
- * @image html vscale1.png
- *
- * @ingroup Widgets
- *
- * @deprecated Use Scale instead.
- */
-class VScale : public Scale
-{
- _CLASS_GTKOBJECT(VScale,GtkVScale,GTK_VSCALE,Gtk::Scale,GtkScale)
- _IS_DEPRECATED
-public:
- VScale();
-
- /**
- * Construct a VScale with the given minimum and maximum. The step size is the
- * distance the slider moves when the arrow keys are used to adjust the scale
- * value.
- */
- VScale(double min, double max, double step);
- explicit VScale(const Glib::RefPtr<Adjustment>& adjustment);
-
-};
-
-/** A horizontal slider for selecting values.
- *
- * The Gtk::HScale widget is used to allow the user to select a value using a
- * horizontal slider. See the Gtk::Scale documentation for more information
- * on how to use a Gtk::HScale.
- *
- * The HScale widget looks like this:
- * @image html hscale1.png
- *
- * @ingroup Widgets
- *
- * @deprecated Use Scale instead.
- */
-class HScale : public Scale
-{
- _CLASS_GTKOBJECT(HScale,GtkHScale,GTK_HSCALE,Gtk::Scale,GtkScale)
- _IS_DEPRECATED
-public:
- HScale();
- /**
- * Construct a HScale with the given minimum and maximum. The step size is the
- * distance the slider moves when the arrow keys are used to adjust the scale
- * value.
- */
- HScale(double min, double max, double step);
- explicit HScale(const Glib::RefPtr<Adjustment>& adjustment);
-
-};
-
} /* namespace Gtk */
diff --git a/gtk/src/separator.hg b/gtk/src/separator.hg
index 4fb7406..34460ce 100644
--- a/gtk/src/separator.hg
+++ b/gtk/src/separator.hg
@@ -25,9 +25,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/widget_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
namespace Gtk
{
@@ -47,44 +44,5 @@ public:
_WRAP_CTOR(Separator(Orientation orientation = ORIENTATION_HORIZONTAL), gtk_separator_new)
};
-/** Vertical line widget.
- * Filler widget used to separate widgets with a visible line.
- * This widget has no window and receives no configuration events.
- * It should be considered a leaf widget.
- *
- * A VSeparator widget looks like this:
- * @image html vseparator1.png
- *
- * @ingroup Widgets
- */
-class VSeparator : public Separator
-{
- _CLASS_GTKOBJECT(VSeparator,GtkVSeparator,GTK_VSEPARATOR,Gtk::Separator,GtkSeparator)
- _IS_DEPRECATED
-public:
- _CTOR_DEFAULT
-
-};
-
-
-/** Horizontal line widget.
- * Filler widget used to separate widgets with a visible line.
- * This widget has no window and receives no configuration events.
- * It should be considered a leaf widget.
- *
- * The HSeparator widget looks like this:
- * @image html hseparator1.png
- *
- * @ingroup Widgets
- */
-class HSeparator : public Separator
-{
- _CLASS_GTKOBJECT(HSeparator,GtkHSeparator,GTK_HSEPARATOR,Gtk::Separator,GtkSeparator)
- _IS_DEPRECATED
-public:
- _CTOR_DEFAULT
-
-};
-
} /* namespace Gtk */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]