Пример #1
0
Gtk::Widget *
Widget_RendDesc::create_other_tab()
{
	Gtk::Alignment *paddedPanel = manage(new Gtk::Alignment(0, 0, 1, 1));
	paddedPanel->set_padding(12, 12, 12, 12);

	Gtk::Box *panelBox = manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL, 12));
	panelBox->set_homogeneous(false);
	paddedPanel->add(*panelBox);

	Gtk::Frame *lockFrame = manage(new Gtk::Frame(_("Locks and Links")));
	lockFrame->set_shadow_type(Gtk::SHADOW_NONE);
	((Gtk::Label *) lockFrame->get_label_widget())->set_markup(_("<b>Locks and Links</b>"));
	panelBox->pack_start(*lockFrame, Gtk::PACK_SHRINK);

	Gtk::Alignment *lockPadding = manage(new Gtk::Alignment(0, 0, 1, 1));
	lockPadding->set_padding(6, 0, 24, 0);
	lockFrame->add(*lockPadding);

	Gtk::Grid *lockGrid = manage(new Gtk::Grid());
	lockGrid->set_row_spacing(6);
	lockGrid->set_column_spacing(12);
	lockPadding->add(*lockGrid);

	lockGrid->attach(*toggle_im_width,		0, 0, 1, 1);
	toggle_im_width->set_hexpand(true);
	lockGrid->attach(*toggle_im_height,		1, 0, 1, 1);
	toggle_im_height->set_hexpand(true);
	lockGrid->attach(*toggle_im_aspect,		2, 0, 1, 1);
	toggle_im_aspect->set_hexpand(true);
	lockGrid->attach(*toggle_im_span,		3, 0, 1, 1);
	toggle_im_span->set_hexpand(true);

	lockGrid->attach(*toggle_px_width,		0, 1, 1, 1);
	lockGrid->attach(*toggle_px_height,		1, 1, 1, 1);
	lockGrid->attach(*toggle_px_aspect,		2, 1, 1, 1);

	Gtk::Frame *focusFrame = manage(new Gtk::Frame(_("Focus Point")));
	focusFrame->set_shadow_type(Gtk::SHADOW_NONE);
	((Gtk::Label *) focusFrame->get_label_widget())->set_markup(_("<b>Focus Point</b>"));
	panelBox->pack_start(*focusFrame, Gtk::PACK_SHRINK);

	Gtk::Alignment *focusPadding = manage(new Gtk::Alignment(0, 0, 1, 1));
	focusPadding->set_padding(6, 0, 24, 0);
	focusFrame->add(*focusPadding);

	Gtk::Box *focusBox = manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 12));
	focusPadding->add(*focusBox);

	Gtk::Label *focusLabel = manage(new Gtk::Label(_("_Focus Point"), 0, 0.5, true));
	focusLabel->set_mnemonic_widget(*entry_focus);
	focusBox->pack_start(*focusLabel, Gtk::PACK_SHRINK);
	focusBox->pack_start(*entry_focus, Gtk::PACK_EXPAND_WIDGET);

	paddedPanel->show_all();
	return paddedPanel;
}
Пример #2
0
Gtk::Widget *
Widget_RendDesc::create_time_tab()
{
	Gtk::Alignment *paddedPanel = manage(new Gtk::Alignment(0, 0, 1, 1));
	paddedPanel->set_padding(12, 12, 12, 12);

	Gtk::Box *panelBox = manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL, 12));  // for future widgets
	panelBox->set_homogeneous(false);
	paddedPanel->add(*panelBox);

	time_frame = manage(new Gtk::Frame(_("Time Settings")));
	time_frame->set_shadow_type(Gtk::SHADOW_NONE);
	((Gtk::Label *) time_frame->get_label_widget())->set_markup(_("<b>Time Settings</b>"));
	panelBox->pack_start(*time_frame, Gtk::PACK_SHRINK);

	Gtk::Alignment *timeFramePadding = manage(new Gtk::Alignment(0, 0, 1, 1));
	timeFramePadding->set_padding(6, 0, 24, 0);
	time_frame->add(*timeFramePadding);

	Gtk::Grid *timeFrameGrid = manage(new Gtk::Grid());
	timeFramePadding->add(*timeFrameGrid);
	timeFrameGrid->set_row_spacing(6);
	timeFrameGrid->set_column_spacing(250);

	Gtk::Label *timeFPSLabel = manage(new Gtk::Label(_("_Frames per second"), 0, 0.5, true));
	timeFPSLabel->set_mnemonic_widget(*entry_fps);
	timeFrameGrid->attach(*timeFPSLabel, 0, 0, 1, 1);
	entry_fps->set_hexpand(true);
	timeFrameGrid->attach(*entry_fps, 1, 0, 1, 1);

	Gtk::Label *timeStartLabel = manage(new Gtk::Label(_("_Start Time"), 0, 0.5, true));
	timeStartLabel->set_mnemonic_widget(*entry_start_time);
	timeFrameGrid->attach(*timeStartLabel, 0, 1, 1, 1);
	timeFrameGrid->attach(*entry_start_time, 1, 1, 1, 1);

	Gtk::Label *timeEndLabel = manage(new Gtk::Label(_("_End Time"), 0, 0.5, true));
	timeEndLabel->set_mnemonic_widget(*entry_end_time);
	timeFrameGrid->attach(*timeEndLabel, 0, 2, 1, 1);
	timeFrameGrid->attach(*entry_end_time, 1, 2, 1, 1);

	Gtk::Label *timeDurationLabel = manage(new Gtk::Label(_("_Duration"), 0, 0.5, true));
	timeDurationLabel->set_mnemonic_widget(*entry_duration);
	timeFrameGrid->attach(*timeDurationLabel, 0, 3, 1, 1);
	timeFrameGrid->attach(*entry_duration, 1, 3, 1, 1);

	paddedPanel->show_all();
	return paddedPanel;
}
Пример #3
0
    Window() : canvas(), checkbutton1("Plot 1"),
      checkbutton2("Plot 2"), checkbutton3("Plot 3"),
      label_x("X:"),
      label_y("Y:") {
      set_default_size(720, 580);
      Gdk::Geometry geometry;
      geometry.min_aspect = geometry.max_aspect = double(720)/double(580);
      set_geometry_hints(*this, geometry, Gdk::HINT_ASPECT);
      set_title("Gtkmm-PLplot test4");
      canvas.set_hexpand(true);
      canvas.set_vexpand(true);
      canvas.set_background_color(Gdk::RGBA("Light Gray"));
      grid.set_column_homogeneous(true);
      checkbutton1.set_vexpand(false);
      checkbutton1.set_hexpand(false);
      checkbutton1.set_halign(Gtk::ALIGN_CENTER);
      checkbutton2.set_vexpand(false);
      checkbutton2.set_hexpand(false);
      checkbutton2.set_halign(Gtk::ALIGN_CENTER);
      checkbutton3.set_vexpand(false);
      checkbutton3.set_hexpand(false);
      checkbutton3.set_halign(Gtk::ALIGN_CENTER);

      std::valarray<double> x_va = Gtk::PLplot::indgen_va(1000)/50.0 - 10.0;
      std::valarray<double> y_va1 = sinh(x_va);
      std::valarray<double> y_va2 = cosh(x_va);
      std::valarray<double> y_va3 = tanh(x_va);

      //generate the data, the plot, add them to the canvas and use the return value to pass it to the checkbutton
      Gtk::PLplot::Plot2D *plot1 = Gtk::manage(
        new Gtk::PLplot::Plot2D(
          *Gtk::manage(
            new Gtk::PLplot::PlotData2D(
              x_va,
              y_va1,
              Gdk::RGBA("blue"),
              Gtk::PLplot::LineStyle::CONTINUOUS,
              3.0
            )
          ),
          "X-axis",
          "Y-axis",
          "Hyperbolic sine",
          0.5,
          0.5,
          0.0,
          0.0
        )
      );
      canvas.add_plot(*plot1);
      checkbutton1.connect_plot(plot1);

      Gtk::PLplot::Plot2D *plot2 = Gtk::manage(
        new Gtk::PLplot::Plot2D(
          *Gtk::manage(
            new Gtk::PLplot::PlotData2D(
              x_va,
              y_va2,
              Gdk::RGBA("red"),
              Gtk::PLplot::LineStyle::CONTINUOUS,
              3.0
            )
          ),
          "X-axis",
          "Y-axis",
          "Hyperbolic cosine",
          0.5,
          0.5,
          0.5,
          0.0
        )
      );
      canvas.add_plot(*plot2);
      checkbutton2.connect_plot(plot2);

      Gtk::PLplot::Plot2D *plot3 = Gtk::manage(
        new Gtk::PLplot::Plot2D(
          *Gtk::manage(
            new Gtk::PLplot::PlotData2D(
              x_va,
              y_va3,
              Gdk::RGBA("green"),
              Gtk::PLplot::LineStyle::CONTINUOUS,
              3.0
            )
          ),
          "X-axis",
          "Y-axis",
          "Hyperbolic tangent",
          0.4,
          0.4,
          0.2,
          0.55
        )
      );
      canvas.add_plot(*plot3);
      checkbutton3.connect_plot(plot3);

      checkbutton1.set_active();
      checkbutton2.set_active(false);
      checkbutton3.set_active();

      //let's make the first plot unpannable
      plot1->set_region_pannable(false);

      //let's override the background color of the second plot and hide it to make the surprise complete!!
      plot2->set_background_color(Gdk::RGBA("Yellow Green"));
      plot2->hide();

      //also let's disable the region selection, for no reason whatsoever!
      plot2->set_region_selectable(false);

      //let's override the default region of this plot, this is NOT influenced by set_region_selectable()!!!
      plot2->set_region(-10, 10, -10, 10);

      //we can also change some other colors
      plot2->set_axes_color(Gdk::RGBA("Blue"));
      plot2->set_titles_color(Gdk::RGBA("Purple"));
      plot2->set_box_style(Gtk::PLplot::BOX_TICKS_TICK_LABELS_MAIN_AXES_MAJOR_MINOR_TICK_GRID);

      //lets'give the third plot a nice opaque background color
      plot3->set_background_color(Gdk::RGBA("White"));

      //but disable zooming by scrolling
      plot3->set_region_zoomable(false);

      //and give it an unusual selection box
      plot3->set_region_selection_color(Gdk::RGBA("Purple"));
      plot3->set_region_selection_width(4.0);

      //hook up signal_cursor_motion to the entries
      unsigned int plotnr = 0;
      while (1) {
        try {
          Gtk::PLplot::Plot2D *plot = dynamic_cast<Gtk::PLplot::Plot2D *>(canvas.get_plot(plotnr++));
          plot->signal_cursor_motion().connect([this](double x, double y){
            entry_x.set_text(Glib::Ascii::dtostr(x));
            entry_y.set_text(Glib::Ascii::dtostr(y));
          });
        }
        catch (Gtk::PLplot::Exception &e) {
          break;
        }
      }

      grid.attach(checkbutton1, 0, 0, 1, 1);
      grid.attach(checkbutton2, 1, 0, 1, 1);
      grid.attach(checkbutton3, 2, 0, 1, 1);
      grid.attach(canvas, 0, 1, 3, 1);

      coordinates_grid.set_column_homogeneous(false);
      coordinates_grid.attach(label_x, 0, 0, 1, 1);
      coordinates_grid.attach(entry_x, 1, 0, 1, 1);
      coordinates_grid.attach(label_y, 2, 0, 1, 1);
      coordinates_grid.attach(entry_y, 3, 0, 1, 1);
      label_x.set_vexpand(false);
      label_x.set_hexpand(true);
      label_x.set_halign(Gtk::ALIGN_END);
      label_y.set_vexpand(false);
      label_y.set_hexpand(false);
      label_y.set_halign(Gtk::ALIGN_CENTER);
      entry_x.set_vexpand(false);
      entry_x.set_hexpand(false);
      entry_x.set_halign(Gtk::ALIGN_END);
      entry_y.set_vexpand(false);
      entry_y.set_hexpand(true);
      entry_y.set_halign(Gtk::ALIGN_START);
      coordinates_grid.set_column_spacing(5);
      grid.attach(coordinates_grid, 0, 2, 3, 1);
      grid.set_row_spacing(5);

      add(grid);
      set_border_width(10);
      grid.show_all();
    }
Пример #4
0
Gobby::StatusBar::MessageHandle
Gobby::StatusBar::add_message(Gobby::StatusBar::MessageType type,
                              const Glib::ustring& message,
                              const Glib::ustring& dialog_message,
                              unsigned int timeout)
{
	if(m_visible_messages >= 12)
	{
		for(MessageHandle iter = m_list.begin();
		    iter != m_list.end();
		    ++iter)
		{
			if(*iter)
			{
				if((*iter)->is_error())
					remove_message(iter);
				else
					// only hide message because whoever
					// installed it is expecting to be
					// able to call remove_message on it
					hide_message(iter);
				break;
			}
		}
	}

	Gtk::Grid* grid = Gtk::manage(new Gtk::Grid());
	grid->set_column_spacing(6);
	grid->set_margin_start(2);
	grid->set_margin_end(2);

	Gtk::Image* image = Gtk::manage(new Gtk::Image);
	image->set_from_icon_name(message_type_to_icon_name(type),
	                          Gtk::ICON_SIZE_MENU);
	grid->attach(*image, 0, 0, 1, 1);
	image->show();

	Gtk::Label* label = Gtk::manage(
		new Gtk::Label(message, Gtk::ALIGN_START));
	label->set_ellipsize(Pango::ELLIPSIZE_END);

	// If we set halign instead, the label will not behave correctly
	// when ellipsized, because then it has always all space around it
	// allocated, and the alignment "jumps" around whin resizing the
	// window due to new characters appearing or disappearing as a result
	// of the ellipsization.
#if GTK_CHECK_VERSION(3, 16, 0)
	gtk_label_set_xalign(label->gobj(), 0.0);
#else
	label->set_alignment(0.0, 0.0);
#endif
	label->show();
	grid->attach(*label, 1, 0, 1, 1);

	Gtk::Frame* frame = Gtk::manage(new Gtk::Frame);

	m_list.push_back(0);
	Gobby::StatusBar::MessageHandle iter(--m_list.end());
	sigc::connection timeout_conn;
	if(timeout)
	{
		timeout_conn = Glib::signal_timeout().connect_seconds(
			sigc::bind(
				sigc::bind_return(
					sigc::mem_fun(
						*this,
						&StatusBar::remove_message),
					false),
				iter),
			timeout);
	}
	*iter = new Message(frame, message, dialog_message, timeout_conn);
	++m_visible_messages;

	if(dialog_message.empty())
	{
		frame->add(*grid);
	}
	else
	{
		Gtk::EventBox *eventbox = Gtk::manage(new Gtk::EventBox);
		frame->add(*eventbox);
		eventbox->add(*grid);
		eventbox->signal_button_press_event().connect(
			sigc::bind_return(sigc::bind(
				sigc::mem_fun(
					*this,
					&StatusBar::on_message_clicked),
				iter), false));

		eventbox->show();
	}

	grid->show();

	// Insert at front
	gtk_grid_attach_next_to(
		gobj(), GTK_WIDGET(frame->gobj()),
		NULL, GTK_POS_LEFT, 1, 1);

	frame->set_halign(Gtk::ALIGN_START);
	frame->set_hexpand(false);
	frame->set_shadow_type(Gtk::SHADOW_NONE);
	frame->show();

	return iter;
}
Пример #5
0
    Window() :
      show_edges_label("Show edges"),
      show_labels_label("Show contour labels"),
      edge_color_label("Contour edge color"),
      edge_color(Gdk::RGBA("Red")),
      edge_width_label("Contour edge width"),
      edge_width_adj(Gtk::Adjustment::create(1.0, 0.1, 10.0, 0.1, 1.0, 0.0)),
      edge_width_spin(edge_width_adj, 0.1, 1),
      nlevels_label("Number of contour edges"),
      nlevels_adj(Gtk::Adjustment::create(7, 3, 20, 1, 5)),
      nlevels_spin(nlevels_adj, 1, 0),
      colormap_palette_label("Colormap palette"),
      area_fill_pattern_label("Fill pattern"),
      area_lines_width_label("Fill pattern width"),
      area_lines_width_adj(Gtk::Adjustment::create(1.0, 0.1, 10.0, 0.1, 1.0, 0.0)),
      area_lines_width_spin(area_lines_width_adj, 0.1, 1),
      colorbar_label("Show colorbar"),
      paned(Gtk::ORIENTATION_VERTICAL),
      aspect_frame(Glib::ustring(), Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER, 1.5, false)
      {

      Glib::ustring x_title = "X-axis";
      Glib::ustring y_title = "Y-axis";
      Glib::ustring plot_title = "Intensity vs detector position";

      // general window and canvas settings
      set_default_size(720, 720);
      Gdk::Geometry geometry;
      geometry.min_aspect = geometry.max_aspect = double(720)/double(720);
      set_geometry_hints(*this, geometry, Gdk::HINT_ASPECT);
      set_title("Gtkmm-PLplot test8");
      canvas.set_hexpand(true);
      canvas.set_vexpand(true);

      //read in our dataset
      std::ifstream fs;
      fs.exceptions(std::ifstream::failbit | std::ifstream::badbit | std::ifstream::eofbit);

      // 11 x 11 dataset (I know the file layout and the data dimensions already)
      const int nx = 11;
      const int ny = 11;
      std::vector<double> x(nx);
      std::vector<double> y(ny);
#ifdef GTKMM_PLPLOT_BOOST_ENABLED
      boost::multi_array<double, 2> z(boost::extents[nx][ny]);
      std::cout << "Using Boost multi_array!" << std::endl;
#else
      double **z = Gtk::PLplot::calloc_array2d(nx, ny);
#endif

      fs.open(TEST_CSV);
      std::string line;
      std::getline(fs, line);
      gchar **splitted = g_strsplit(line.c_str(), ",", 0);

      //first line contains the x values
      for (int i = 1 ; i < nx + 1 ; i++) {
        x[i-1] = g_ascii_strtod(splitted[i], NULL);
      }

      g_strfreev(splitted);

      for (int i = 0 ; i < ny ; i++) {
        line.clear();
        std::getline(fs, line);
        splitted = g_strsplit(line.c_str(), ",", 0);
        y[i] = g_ascii_strtod(splitted[0], NULL);
        for (int j = 1 ; j < nx + 1 ; j++) {
          z[j-1][i] = g_ascii_strtod(splitted[j], NULL);
        }
        g_strfreev(splitted);
      }

      //construct the plot
      auto plot = Gtk::manage(new Gtk::PLplot::PlotContourShades(
        *Gtk::manage(new Gtk::PLplot::PlotDataSurface(
          x,
          y,
          z
        )),
        x_title,
        y_title,
        plot_title,
        7,
        Gtk::PLplot::ColormapPalette::BLUE_RED,
        edge_color.get_rgba(),
        1.0
      ));

      canvas.add_plot(*plot);

      plot->set_background_color(Gdk::RGBA("Yellow Green"));

      //now let's set up the grid
      grid.set_column_homogeneous(true);
      grid.set_column_spacing(5);
      grid.set_row_homogeneous(false);
      grid.set_row_spacing(5);

      int row_counter = 0;

      show_edges_label.set_hexpand(true);
      show_edges_label.set_vexpand(false);
      show_edges_label.set_valign(Gtk::ALIGN_CENTER);
      show_edges_label.set_halign(Gtk::ALIGN_END);
      show_edges_switch.set_hexpand(true);
      show_edges_switch.set_vexpand(false);
      show_edges_switch.set_halign(Gtk::ALIGN_START);
      show_edges_switch.set_valign(Gtk::ALIGN_CENTER);
      show_edges_switch.set_active(plot->is_showing_edges());
      show_edges_switch.property_active().signal_changed().connect([this, plot](){
        if (show_edges_switch.get_active()) {
          edge_color.set_sensitive();
          edge_width_spin.set_sensitive();
          show_labels_switch.set_sensitive();
          plot->show_edges();
        }
        else {
          edge_color.set_sensitive(false);
          edge_width_spin.set_sensitive(false);
          show_labels_switch.set_sensitive(false);
          plot->hide_edges();
        }
      });

      grid.attach(show_edges_label, 0, row_counter, 1, 1);
      grid.attach(show_edges_switch, 1, row_counter++, 1, 1);

      // show contour labels
      show_labels_label.set_hexpand(true);
      show_labels_label.set_vexpand(false);
      show_labels_label.set_valign(Gtk::ALIGN_CENTER);
      show_labels_label.set_halign(Gtk::ALIGN_END);
      show_labels_switch.set_hexpand(true);
      show_labels_switch.set_vexpand(false);
      show_labels_switch.set_halign(Gtk::ALIGN_START);
      show_labels_switch.set_valign(Gtk::ALIGN_CENTER);
      show_labels_switch.set_active(plot->is_showing_labels());
      show_labels_switch.property_active().signal_changed().connect([this, plot](){
        if (show_labels_switch.get_active()) {
          plot->show_labels();
        }
        else {
          plot->hide_labels();
        }
      });

      grid.attach(show_labels_label, 0, row_counter, 1, 1);
      grid.attach(show_labels_switch, 1, row_counter++, 1, 1);

      //color button
      edge_color_label.set_hexpand(true);
      edge_color_label.set_vexpand(false);
      edge_color_label.set_valign(Gtk::ALIGN_CENTER);
      edge_color_label.set_halign(Gtk::ALIGN_END);

      edge_color.set_rgba(plot->get_edge_color());
      edge_color.set_use_alpha(true);
      edge_color.set_hexpand(true);
      edge_color.set_vexpand(false);
      edge_color.set_halign(Gtk::ALIGN_START);
      edge_color.set_valign(Gtk::ALIGN_CENTER);
      edge_color.signal_color_set().connect([this, plot](){plot->set_edge_color(edge_color.get_rgba());});

      grid.attach(edge_color_label, 0, row_counter, 1, 1);
      grid.attach(edge_color, 1, row_counter++, 1, 1);

      //the edge width spinbutton
      edge_width_label.set_hexpand(true);
      edge_width_label.set_vexpand(false);
      edge_width_label.set_valign(Gtk::ALIGN_CENTER);
      edge_width_label.set_halign(Gtk::ALIGN_END);

      edge_width_spin.set_hexpand(true);
      edge_width_spin.set_vexpand(false);
      edge_width_spin.set_halign(Gtk::ALIGN_START);
      edge_width_spin.set_valign(Gtk::ALIGN_CENTER);
      edge_width_spin.set_wrap(true);
      edge_width_spin.set_snap_to_ticks(true);
      edge_width_spin.set_numeric(true);
      edge_width_spin.set_value(plot->get_edge_width());
      edge_width_spin.signal_value_changed().connect([this, plot](){
        plot->set_edge_width(edge_width_spin.get_value());
      });

      grid.attach(edge_width_label, 0, row_counter, 1, 1);
      grid.attach(edge_width_spin, 1, row_counter++, 1, 1);

      //nlevels
      nlevels_label.set_hexpand(true);
      nlevels_label.set_vexpand(false);
      nlevels_label.set_valign(Gtk::ALIGN_CENTER);
      nlevels_label.set_halign(Gtk::ALIGN_END);
      nlevels_spin.set_hexpand(true);
      nlevels_spin.set_vexpand(false);
      nlevels_spin.set_halign(Gtk::ALIGN_START);
      nlevels_spin.set_valign(Gtk::ALIGN_CENTER);
      nlevels_spin.set_wrap(true);
      nlevels_spin.set_snap_to_ticks(true);
      nlevels_spin.set_numeric(true);
      nlevels_spin.set_value(plot->get_nlevels());
      nlevels_spin.signal_value_changed().connect([this, plot](){
        plot->set_nlevels(nlevels_spin.get_value());
      });

      grid.attach(nlevels_label, 0, row_counter, 1, 1);
      grid.attach(nlevels_spin, 1, row_counter++, 1, 1);

      // colormap palette
      colormap_palette_label.set_hexpand(true);
      colormap_palette_label.set_vexpand(false);
      colormap_palette_label.set_valign(Gtk::ALIGN_CENTER);
      colormap_palette_label.set_halign(Gtk::ALIGN_END);
      colormap_palette_combo.set_hexpand(true);
      colormap_palette_combo.set_vexpand(false);
      colormap_palette_combo.set_halign(Gtk::ALIGN_START);
      colormap_palette_combo.set_valign(Gtk::ALIGN_CENTER);

      colormap_palette_combo.append("Default");
      colormap_palette_combo.append("Blue → Red");
      colormap_palette_combo.append("Blue → Yellow");
      colormap_palette_combo.append("Gray");
      colormap_palette_combo.append("High frequencies");
      colormap_palette_combo.append("Low frequencies");
      colormap_palette_combo.append("Radar");

      colormap_palette_combo.set_active(plot->get_colormap_palette());
      colormap_palette_combo.signal_changed().connect([this, plot](){
        plot->set_colormap_palette(static_cast<Gtk::PLplot::ColormapPalette>(colormap_palette_combo.get_active_row_number()));
      });

      grid.attach(colormap_palette_label, 0, row_counter, 1, 1);
      grid.attach(colormap_palette_combo, 1, row_counter++, 1, 1);

      //area fill pattern
      area_fill_pattern_label.set_hexpand(true);
      area_fill_pattern_label.set_vexpand(false);
      area_fill_pattern_label.set_valign(Gtk::ALIGN_CENTER);
      area_fill_pattern_label.set_halign(Gtk::ALIGN_END);
      area_fill_pattern_combo.set_hexpand(true);
      area_fill_pattern_combo.set_vexpand(false);
      area_fill_pattern_combo.set_halign(Gtk::ALIGN_START);
      area_fill_pattern_combo.set_valign(Gtk::ALIGN_CENTER);

      area_fill_pattern_combo.append("Solid");
      area_fill_pattern_combo.append("Horizontal lines");
      area_fill_pattern_combo.append("Vertical lines");
      area_fill_pattern_combo.append("Upward lines at 45 degrees");
      area_fill_pattern_combo.append("Downward lines at 45 degrees");
      area_fill_pattern_combo.append("Upward lines at 30 degrees");
      area_fill_pattern_combo.append("Downward lines at 30 degrees");
      area_fill_pattern_combo.append("Horizontal and vertical lines");
      area_fill_pattern_combo.append("Upward and downward lines at 45 degrees");
      area_fill_pattern_combo.set_active(plot->get_area_fill_pattern());
      area_fill_pattern_combo.signal_changed().connect([this, plot](){
        plot->set_area_fill_pattern(static_cast<Gtk::PLplot::AreaFillPattern>(area_fill_pattern_combo.get_active_row_number()));
        if (area_fill_pattern_combo.get_active_row_number() == 0 /* SOLID */) {
          area_lines_width_spin.set_sensitive(false);
        }
        else {
          area_lines_width_spin.set_sensitive();
        }
      });

      grid.attach(area_fill_pattern_label, 0, row_counter, 1, 1);
      grid.attach(area_fill_pattern_combo, 1, row_counter++, 1, 1);

      //the area lines width spinbutton
      area_lines_width_label.set_hexpand(true);
      area_lines_width_label.set_vexpand(false);
      area_lines_width_label.set_valign(Gtk::ALIGN_CENTER);
      area_lines_width_label.set_halign(Gtk::ALIGN_END);

      area_lines_width_spin.set_hexpand(true);
      area_lines_width_spin.set_vexpand(false);
      area_lines_width_spin.set_halign(Gtk::ALIGN_START);
      area_lines_width_spin.set_valign(Gtk::ALIGN_CENTER);
      area_lines_width_spin.set_wrap(true);
      area_lines_width_spin.set_snap_to_ticks(true);
      area_lines_width_spin.set_numeric(true);
      area_lines_width_spin.set_value(plot->get_area_lines_width());
      area_lines_width_spin.signal_value_changed().connect([this, plot](){
        plot->set_area_lines_width(area_lines_width_spin.get_value());
      });

      area_lines_width_spin.set_sensitive(false);

      grid.attach(area_lines_width_label, 0, row_counter, 1, 1);
      grid.attach(area_lines_width_spin, 1, row_counter++, 1, 1);

      //colorbar
      colorbar_label.set_hexpand(true);
      colorbar_label.set_vexpand(false);
      colorbar_label.set_valign(Gtk::ALIGN_CENTER);
      colorbar_label.set_halign(Gtk::ALIGN_END);
      colorbar_switch.set_hexpand(true);
      colorbar_switch.set_vexpand(false);
      colorbar_switch.set_halign(Gtk::ALIGN_START);
      colorbar_switch.set_valign(Gtk::ALIGN_CENTER);
      colorbar_switch.set_active(plot->is_showing_colorbar());
      colorbar_switch.property_active().signal_changed().connect([this, plot](){
        if (colorbar_switch.get_active()) {
          plot->show_colorbar();
        }
        else {
          plot->hide_colorbar();
        }
      });

      grid.attach(colorbar_label, 0, row_counter, 1, 1);
      grid.attach(colorbar_switch, 1, row_counter++, 1, 1);
      paned.add1(grid);

      //add canvas to grid
      aspect_frame.add(canvas);
      paned.add2(aspect_frame);

      //finishing up
      add(paned);
      set_border_width(10);
#if GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION >= 18
      paned.set_wide_handle(true);
#endif
      paned.show_all();

    }