+ Glib::RefPtr<Gdk::Display> display(Gdk::Display::get_default());
+ Glib::RefPtr<const Gdk::Screen> screen(display->get_default_screen());
+ Gdk::Rectangle rect;
+ // A proper way to obtain the primary monitor is to use the
+ // Gdk::Screen::get_primary_monitor () const member. But as it
+ // was introduced in gtkmm 2.20 I assume that the monitor 0 is the
+ // primary one.
+ screen->get_monitor_geometry(0,rect);
+ synfig::info("x=%d, y=%d, w=%d, h=%d",
+ rect.get_x(),rect.get_y(), rect.get_width(), rect.get_height());
+#define hpanel_width 79
+#define hpanel_height 25
+#define vpanel_width 20
+#define vpanel_height 100
+#define vdock 20
+#define hdock 20
+
+/* percentages referred to width or height of the screen
+ *---------------------------------------------------------------------*
+ * t | |
+ * o | |
+ * o | |vdock%
+ * l | |
+ * b | |------------
+ * o | |
+ * x | |vdock%
+ * -------- |
+ * |
+ * |------------
+ * |
+ * |vdock%
+ * |
+ * |
+ *-----hdock%----------------------------------------------|------------
+ * | |
+ * | |vdock%
+ * | |
+ * | |
+ * --------------------------------------------------------------------*
+*/
+// Vertical Panel
+ int v_xpos=rect.get_x() + rect.get_width()*(1-vpanel_width/100);
+ int v_xsize=rect.get_width()*vpanel_width/100;
+ int v_ypos=rect.get_y();
+ int v_ysize=rect.get_height()*vpanel_height/100;
+ std::string v_pos(strprintf("%d %d", v_xpos, v_ypos));
+ std::string v_size(strprintf("%d %d", v_xsize, v_ysize));
+ synfig::info(v_pos);
+ synfig::info(v_size);
+// Horizontal Panel
+ int h_xpos=rect.get_x();
+ int h_xsize=rect.get_width()*hpanel_width/100;
+ int h_ypos=rect.get_y()+ rect.get_height()*(1-hpanel_height/100);;
+ int h_ysize=rect.get_height()*hpanel_height/100;
+ std::string h_pos(strprintf("%d %d", h_xpos, h_ypos));
+ std::string h_size(strprintf("%d %d", h_xsize, h_ysize));
+ int v_dock = rect.get_height()*vdock/100;
+ int h_dock = rect.get_width()*hdock/100;
+//Contents size
+ std::string v_contents(strprintf("%d %d %d", v_dock, v_dock, v_dock));
+ std::string h_contents(strprintf("%d", h_dock));
+// Tool Box position
+ std::string tbox_pos(strprintf("%d %d", rect.get_x(), rect.get_y()));
+