]> git.lyx.org Git - features.git/commitdiff
Add mathsmatrix dialog.
authorJohn Spray <spray@lyx.org>
Tue, 5 Oct 2004 12:37:26 +0000 (12:37 +0000)
committerJohn Spray <spray@lyx.org>
Tue, 5 Oct 2004 12:37:26 +0000 (12:37 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9048 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/gtk/ChangeLog
src/frontends/gtk/Dialogs.C
src/frontends/gtk/GMathsMatrix.C [new file with mode: 0644]
src/frontends/gtk/GMathsMatrix.h [new file with mode: 0644]
src/frontends/gtk/Makefile.am
src/frontends/gtk/glade/mathMatrix.glade [new file with mode: 0644]

index cfa7793fdc5a9577fd17655e6cebc2f0ff27f473..367fc5ba198dce0e30f51e83d04fbcf4eec59927 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-04  John Spray  <spray_john@users.sourceforge.net>
+
+       * The MathsMatrix dialog
+       * Dialogs.C, GMathsMatrix.C, GMathsMatrix.h, Makefile.am
+
 2004-10-04  John Spray  <spray_john@users.sourceforge.net>
 
        * GMenubar.C: use item->submenu() instead of
index 2ad6be6ea6132b04435cd7e556bbb4f1b14deff9..1d15cab6026bf282acb37de771268c2ab06bc5fa 100644 (file)
@@ -69,7 +69,7 @@
 #include "FormLog.h"
 #include "GMathPanel.h"
 #include "FormMathsBitmap.h"
-#include "FormMathsMatrix.h"
+#include "GMathsMatrix.h"
 #include "FormMathsSpace.h"
 #include "FormMathsStyle.h"
 #include "FormNote.h"
@@ -432,9 +432,10 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
                dialog->setView(new GMathDelim(*dialog));
                dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
        } else if (name == "mathmatrix") {
+               dialog->bc().view(new GBC(dialog->bc()));
                dialog->setController(new ControlMath(*dialog));
-               dialog->setView(new FormMathsMatrix(*dialog));
-               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
+               dialog->setView(new GMathsMatrix(*dialog));
+               dialog->bc().bp(new OkCancelReadOnlyPolicy);
        } else if (name == "mathspace") {
                dialog->setController(new ControlMath(*dialog));
                dialog->setView(new FormMathsSpace(*dialog));
diff --git a/src/frontends/gtk/GMathsMatrix.C b/src/frontends/gtk/GMathsMatrix.C
new file mode 100644 (file)
index 0000000..a968c0b
--- /dev/null
@@ -0,0 +1,144 @@
+/**
+ * \file GMathsMatrix.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author John Spray
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#include <config.h>
+
+#include "GMathsMatrix.h"
+#include "ControlMath.h"
+
+#include "GViewBase.h"
+#include "ghelpers.h"
+
+#include <sstream>
+
+
+using std::ostringstream;
+using std::string;
+
+namespace lyx {
+namespace frontend {
+
+
+GMathsMatrix::GMathsMatrix(Dialog & parent)
+       : GViewCB<ControlMath, GViewGladeB>(parent, _("Math Matrix"), false)
+{}
+
+
+void GMathsMatrix::doBuild()
+{
+       string const gladeName = findGladeFile("mathMatrix");
+       xml_ = Gnome::Glade::Xml::create(gladeName);
+
+       Gtk::Button * button;
+       xml_->get_widget("Cancel",button);
+       setCancel(button);
+       xml_->get_widget("Insert",button);
+       setOK(button);
+       // No inserting matrices into readonly docs!
+       bcview().addReadOnly(button);
+
+       // Get widget pointers
+       xml_->get_widget("Top", topradio_);
+       xml_->get_widget("Bottom", bottomradio_);
+       xml_->get_widget("Center", centerradio_);
+       xml_->get_widget("Columns", columnsspin_);
+       xml_->get_widget("Rows", rowsspin_);
+       xml_->get_widget("HorzAlign", horzalignentry_);
+
+       // Make center vertical alignment the default
+       centerradio_->set_active(true);
+
+       // Allow only [clr], keep length as number of cols
+       ignoreHorzAlign_ = false;
+       horzalignentry_->signal_changed().connect(
+               sigc::mem_fun(*this, &GMathsMatrix::updateHorzAlignEntry));
+       columnsspin_->signal_value_changed().connect(
+               sigc::mem_fun(*this, &GMathsMatrix::updateHorzAlignEntry));
+}
+
+
+void GMathsMatrix::apply()
+{
+       string const h_align = horzalignentry_->get_text();
+       int const nx =
+               static_cast<int>(columnsspin_->get_adjustment()->get_value());
+       int const ny =
+               static_cast<int>(rowsspin_->get_adjustment()->get_value());
+       char v_align = 'c';
+       if (topradio_->get_active())
+               v_align = 't';
+       else if (centerradio_->get_active())
+               v_align = 'c';
+       else if (bottomradio_->get_active())
+               v_align = 'b';
+
+       ostringstream os;
+       os << nx << ' ' << ny << ' ' << v_align << ' ' << h_align;
+       controller().dispatchMatrix(os.str());
+}
+
+
+void GMathsMatrix::update()
+{
+       ButtonPolicy::SMInput activate = ButtonPolicy::SMI_VALID;
+       bc().input(activate);
+}
+
+
+void GMathsMatrix::updateHorzAlignEntry()
+{
+       if (ignoreHorzAlign_) return;
+
+       Glib::ustring orig = horzalignentry_->get_text();
+  Glib::ustring stripped;
+
+  Glib::ustring::iterator cur;
+  for (cur = orig.begin(); cur != orig.end(); ++cur) {
+         if (*cur == 'c' || *cur == 'l' ||
+             *cur == 'r' || *cur == '|')
+           stripped += *cur;
+       }
+
+       int barcount = countbars(stripped);
+       while (stripped.length() - barcount >
+                    columnsspin_->get_adjustment()->get_value()) {
+               // erase last character of stripped
+               stripped = stripped.erase(stripped.length() - 1,1);
+               barcount =      countbars(stripped);
+       }
+
+       while (stripped.length() - barcount <
+              columnsspin_->get_adjustment()->get_value()) {
+               stripped = stripped + "c";
+               barcount =      countbars(stripped);
+       }
+
+  if (orig.compare(stripped) != 0) {
+       ignoreHorzAlign_ = true;
+               horzalignentry_->set_text(stripped);
+               ignoreHorzAlign_ = false;
+       }
+}
+
+int GMathsMatrix::countbars(Glib::ustring str)
+{
+       int barcount = 0;
+  Glib::ustring::iterator cur = str.begin();
+  Glib::ustring::iterator end = str.end();
+       for (; cur != end; ++cur) {
+               if (*cur == '|')
+                       ++barcount;
+       }
+       return barcount;
+}
+
+
+} // namespace frontend
+} // namespace lyx
diff --git a/src/frontends/gtk/GMathsMatrix.h b/src/frontends/gtk/GMathsMatrix.h
new file mode 100644 (file)
index 0000000..643e3e2
--- /dev/null
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+/**
+ * \file GMathsMatrix.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author John Spray
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#ifndef GMATHSMATRIX_H
+#define GMATHSMATRIX_H
+
+#include "GViewBase.h"
+
+namespace lyx {
+namespace frontend {
+
+class ControlMath;
+
+/**
+ * This class provides an GTK implementation of the maths matrix dialog.
+ */
+class GMathsMatrix
+       : public GViewCB<ControlMath, GViewGladeB> {
+public:
+       GMathsMatrix(Dialog &);
+       int AlignFilter(char const *, int);
+private:
+       virtual void apply();
+       virtual void doBuild();
+       virtual void update();
+
+       void updateHorzAlignEntry();
+       int countbars(Glib::ustring str);
+
+       Gtk::RadioButton * topradio_;
+       Gtk::RadioButton * bottomradio_;
+       Gtk::RadioButton * centerradio_;
+       Gtk::SpinButton * rowsspin_;
+       Gtk::SpinButton * columnsspin_;
+       Gtk::Entry * horzalignentry_;
+       bool ignoreHorzAlign_;
+};
+
+} // namespace frontend
+} // namespace lyx
+
+#endif //  GMATHSMATRIX_H
+
index f7e43aa728ed42778c96cd47640c457dee22c10f..4c14451910077929562fa8e59c72e5e702b94df9 100644 (file)
@@ -32,6 +32,8 @@ libgtk_la_SOURCES = \
        GMathDelim.h \
        GMathPanel.C \
        GMathPanel.h \
+       GMathsMatrix.C \
+       GMathsMatrix.h \
        GMenubar.C \
        GMenubar.h \
        GMiniBuffer.C \
@@ -109,7 +111,6 @@ xforms_objects = \
        ../xforms/FormLog.lo \
        ../xforms/FormMathsBitmap.lo \
        ../xforms/FormMathsDelim.lo \
-       ../xforms/FormMathsMatrix.lo \
        ../xforms/FormMathsSpace.lo \
        ../xforms/FormMathsStyle.lo \
        ../xforms/FormNote.lo \
diff --git a/src/frontends/gtk/glade/mathMatrix.glade b/src/frontends/gtk/glade/mathMatrix.glade
new file mode 100644 (file)
index 0000000..bc9779b
--- /dev/null
@@ -0,0 +1,648 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="dialog">
+  <property name="border_width">6</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Create Matrix</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+       <widget class="GtkHButtonBox" id="dialog-action_area1">
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+         <child>
+           <widget class="GtkButton" id="Cancel">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-cancel</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="response_id">-6</property>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="Insert">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="has_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="response_id">0</property>
+
+             <child>
+               <widget class="GtkAlignment" id="alignment7">
+                 <property name="visible">True</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xscale">0</property>
+                 <property name="yscale">0</property>
+                 <property name="top_padding">0</property>
+                 <property name="bottom_padding">0</property>
+                 <property name="left_padding">0</property>
+                 <property name="right_padding">0</property>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox4">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">2</property>
+
+                     <child>
+                       <widget class="GtkImage" id="image4">
+                         <property name="visible">True</property>
+                         <property name="stock">gtk-new</property>
+                         <property name="icon_size">4</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkLabel" id="label11">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">_Insert Matrix</property>
+                         <property name="use_underline">True</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">True</property>
+         <property name="pack_type">GTK_PACK_END</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkVBox" id="vbox2">
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkFrame" id="frame3">
+             <property name="visible">True</property>
+             <property name="label_xalign">0</property>
+             <property name="label_yalign">0.5</property>
+             <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+             <child>
+               <widget class="GtkAlignment" id="alignment6">
+                 <property name="visible">True</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xscale">1</property>
+                 <property name="yscale">1</property>
+                 <property name="top_padding">0</property>
+                 <property name="bottom_padding">0</property>
+                 <property name="left_padding">12</property>
+                 <property name="right_padding">0</property>
+
+                 <child>
+                   <widget class="GtkTable" id="table1">
+                     <property name="visible">True</property>
+                     <property name="n_rows">2</property>
+                     <property name="n_columns">3</property>
+                     <property name="homogeneous">False</property>
+                     <property name="row_spacing">6</property>
+                     <property name="column_spacing">0</property>
+
+                     <child>
+                       <widget class="GtkLabel" id="label10">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">C_olumns:</property>
+                         <property name="use_underline">True</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                         <property name="mnemonic_widget">Columns</property>
+                       </widget>
+                       <packing>
+                         <property name="left_attach">0</property>
+                         <property name="right_attach">1</property>
+                         <property name="top_attach">1</property>
+                         <property name="bottom_attach">2</property>
+                         <property name="x_options">fill</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkSpinButton" id="Columns">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="climb_rate">1</property>
+                         <property name="digits">0</property>
+                         <property name="numeric">True</property>
+                         <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                         <property name="snap_to_ticks">False</property>
+                         <property name="wrap">False</property>
+                         <property name="adjustment">2 1 20 1 10 10</property>
+                       </widget>
+                       <packing>
+                         <property name="left_attach">1</property>
+                         <property name="right_attach">2</property>
+                         <property name="top_attach">1</property>
+                         <property name="bottom_attach">2</property>
+                         <property name="x_options">expand</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkSpinButton" id="Rows">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="has_focus">True</property>
+                         <property name="climb_rate">1</property>
+                         <property name="digits">0</property>
+                         <property name="numeric">True</property>
+                         <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                         <property name="snap_to_ticks">False</property>
+                         <property name="wrap">False</property>
+                         <property name="adjustment">2 1 20 1 10 10</property>
+                       </widget>
+                       <packing>
+                         <property name="left_attach">1</property>
+                         <property name="right_attach">2</property>
+                         <property name="top_attach">0</property>
+                         <property name="bottom_attach">1</property>
+                         <property name="x_options"></property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkLabel" id="label9">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">_Rows:</property>
+                         <property name="use_underline">True</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                         <property name="mnemonic_widget">Rows</property>
+                       </widget>
+                       <packing>
+                         <property name="left_attach">0</property>
+                         <property name="right_attach">1</property>
+                         <property name="top_attach">0</property>
+                         <property name="bottom_attach">1</property>
+                         <property name="x_options">fill</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label8">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Size&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="type">label_item</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkFrame" id="frame1">
+             <property name="border_width">4</property>
+             <property name="visible">True</property>
+             <property name="label_xalign">0</property>
+             <property name="label_yalign">0.5</property>
+             <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+             <child>
+               <widget class="GtkAlignment" id="alignment1">
+                 <property name="visible">True</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xscale">1</property>
+                 <property name="yscale">1</property>
+                 <property name="top_padding">0</property>
+                 <property name="bottom_padding">0</property>
+                 <property name="left_padding">12</property>
+                 <property name="right_padding">0</property>
+
+                 <child>
+                   <widget class="GtkVBox" id="vbox2">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">0</property>
+
+                     <child>
+                       <widget class="GtkRadioButton" id="Top">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                         <property name="focus_on_click">True</property>
+                         <property name="active">False</property>
+                         <property name="inconsistent">False</property>
+                         <property name="draw_indicator">True</property>
+
+                         <child>
+                           <widget class="GtkAlignment" id="alignment3">
+                             <property name="visible">True</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xscale">0</property>
+                             <property name="yscale">0</property>
+                             <property name="top_padding">0</property>
+                             <property name="bottom_padding">0</property>
+                             <property name="left_padding">0</property>
+                             <property name="right_padding">0</property>
+
+                             <child>
+                               <widget class="GtkHBox" id="hbox1">
+                                 <property name="visible">True</property>
+                                 <property name="homogeneous">False</property>
+                                 <property name="spacing">2</property>
+
+                                 <child>
+                                   <widget class="GtkImage" id="image1">
+                                     <property name="visible">True</property>
+                                     <property name="stock">gtk-goto-top</property>
+                                     <property name="icon_size">4</property>
+                                     <property name="xalign">0.5</property>
+                                     <property name="yalign">0.5</property>
+                                     <property name="xpad">0</property>
+                                     <property name="ypad">0</property>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">False</property>
+                                     <property name="fill">False</property>
+                                   </packing>
+                                 </child>
+
+                                 <child>
+                                   <widget class="GtkLabel" id="label5">
+                                     <property name="visible">True</property>
+                                     <property name="label" translatable="yes">_Top</property>
+                                     <property name="use_underline">True</property>
+                                     <property name="use_markup">False</property>
+                                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                                     <property name="wrap">False</property>
+                                     <property name="selectable">False</property>
+                                     <property name="xalign">0.5</property>
+                                     <property name="yalign">0.5</property>
+                                     <property name="xpad">0</property>
+                                     <property name="ypad">0</property>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">False</property>
+                                     <property name="fill">False</property>
+                                   </packing>
+                                 </child>
+                               </widget>
+                             </child>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkRadioButton" id="Center">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                         <property name="focus_on_click">True</property>
+                         <property name="active">True</property>
+                         <property name="inconsistent">False</property>
+                         <property name="draw_indicator">True</property>
+                         <property name="group">Top</property>
+
+                         <child>
+                           <widget class="GtkAlignment" id="alignment5">
+                             <property name="visible">True</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xscale">0</property>
+                             <property name="yscale">0</property>
+                             <property name="top_padding">0</property>
+                             <property name="bottom_padding">0</property>
+                             <property name="left_padding">0</property>
+                             <property name="right_padding">0</property>
+
+                             <child>
+                               <widget class="GtkHBox" id="hbox3">
+                                 <property name="visible">True</property>
+                                 <property name="homogeneous">False</property>
+                                 <property name="spacing">2</property>
+
+                                 <child>
+                                   <widget class="GtkImage" id="image3">
+                                     <property name="visible">True</property>
+                                     <property name="stock">gtk-justify-center</property>
+                                     <property name="icon_size">4</property>
+                                     <property name="xalign">0.5</property>
+                                     <property name="yalign">0.5</property>
+                                     <property name="xpad">0</property>
+                                     <property name="ypad">0</property>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">False</property>
+                                     <property name="fill">False</property>
+                                   </packing>
+                                 </child>
+
+                                 <child>
+                                   <widget class="GtkLabel" id="label7">
+                                     <property name="visible">True</property>
+                                     <property name="label" translatable="yes">C_enter</property>
+                                     <property name="use_underline">True</property>
+                                     <property name="use_markup">False</property>
+                                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                                     <property name="wrap">False</property>
+                                     <property name="selectable">False</property>
+                                     <property name="xalign">0.5</property>
+                                     <property name="yalign">0.5</property>
+                                     <property name="xpad">0</property>
+                                     <property name="ypad">0</property>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">False</property>
+                                     <property name="fill">False</property>
+                                   </packing>
+                                 </child>
+                               </widget>
+                             </child>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkRadioButton" id="Bottom">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                         <property name="focus_on_click">True</property>
+                         <property name="active">False</property>
+                         <property name="inconsistent">False</property>
+                         <property name="draw_indicator">True</property>
+                         <property name="group">Top</property>
+
+                         <child>
+                           <widget class="GtkAlignment" id="alignment4">
+                             <property name="visible">True</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xscale">0</property>
+                             <property name="yscale">0</property>
+                             <property name="top_padding">0</property>
+                             <property name="bottom_padding">0</property>
+                             <property name="left_padding">0</property>
+                             <property name="right_padding">0</property>
+
+                             <child>
+                               <widget class="GtkHBox" id="hbox2">
+                                 <property name="visible">True</property>
+                                 <property name="homogeneous">False</property>
+                                 <property name="spacing">2</property>
+
+                                 <child>
+                                   <widget class="GtkImage" id="image2">
+                                     <property name="visible">True</property>
+                                     <property name="stock">gtk-goto-bottom</property>
+                                     <property name="icon_size">4</property>
+                                     <property name="xalign">0.5</property>
+                                     <property name="yalign">0.5</property>
+                                     <property name="xpad">0</property>
+                                     <property name="ypad">0</property>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">False</property>
+                                     <property name="fill">False</property>
+                                   </packing>
+                                 </child>
+
+                                 <child>
+                                   <widget class="GtkLabel" id="label6">
+                                     <property name="visible">True</property>
+                                     <property name="label" translatable="yes">_Bottom</property>
+                                     <property name="use_underline">True</property>
+                                     <property name="use_markup">False</property>
+                                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                                     <property name="wrap">False</property>
+                                     <property name="selectable">False</property>
+                                     <property name="xalign">0.5</property>
+                                     <property name="yalign">0.5</property>
+                                     <property name="xpad">0</property>
+                                     <property name="ypad">0</property>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">False</property>
+                                     <property name="fill">False</property>
+                                   </packing>
+                                 </child>
+                               </widget>
+                             </child>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label1">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Vertical Alignment&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="type">label_item</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkFrame" id="frame2">
+             <property name="border_width">4</property>
+             <property name="visible">True</property>
+             <property name="label_xalign">0</property>
+             <property name="label_yalign">0.5</property>
+             <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+             <child>
+               <widget class="GtkAlignment" id="alignment2">
+                 <property name="border_width">5</property>
+                 <property name="visible">True</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xscale">1</property>
+                 <property name="yscale">1</property>
+                 <property name="top_padding">0</property>
+                 <property name="bottom_padding">0</property>
+                 <property name="left_padding">12</property>
+                 <property name="right_padding">0</property>
+
+                 <child>
+                   <widget class="GtkEntry" id="HorzAlign">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="editable">True</property>
+                     <property name="visibility">True</property>
+                     <property name="max_length">0</property>
+                     <property name="text" translatable="yes">cc</property>
+                     <property name="has_frame">True</property>
+                     <property name="invisible_char" translatable="yes">*</property>
+                     <property name="activates_default">False</property>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label4">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;_Horizontal Alignment&lt;/b&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="mnemonic_widget">HorzAlign</property>
+               </widget>
+               <packing>
+                 <property name="type">label_item</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>