2007-06-18 03:40:41 +00:00
|
|
|
/*
|
2021-10-18 20:22:31 +00:00
|
|
|
* This file Copyright (C) 2007-2021 Mnemosyne LLC
|
2007-06-06 00:30:13 +00:00
|
|
|
*
|
2014-01-21 03:10:30 +00:00
|
|
|
* It may be used under the GNU GPL versions 2 or 3
|
2014-01-19 01:09:44 +00:00
|
|
|
* or any future license endorsed by Mnemosyne LLC.
|
2008-09-23 19:11:04 +00:00
|
|
|
*
|
2007-06-18 03:40:41 +00:00
|
|
|
*/
|
2007-06-06 00:30:13 +00:00
|
|
|
|
2016-03-29 16:37:21 +00:00
|
|
|
#pragma once
|
2007-06-06 00:30:13 +00:00
|
|
|
|
2021-10-18 20:22:31 +00:00
|
|
|
#include <gtkmm.h>
|
2007-06-06 00:30:13 +00:00
|
|
|
|
2021-12-14 08:43:27 +00:00
|
|
|
#include <libtransmission/tr-macros.h>
|
|
|
|
|
2007-06-06 00:30:13 +00:00
|
|
|
/**
|
2008-02-14 17:18:00 +00:00
|
|
|
*** utility code for making dialog layout that follows the Gnome HIG.
|
|
|
|
*** see section 8.2.2, Visual Design > Window Layout > Dialogs.
|
2007-06-06 00:30:13 +00:00
|
|
|
**/
|
|
|
|
|
2021-10-18 20:22:31 +00:00
|
|
|
class HigWorkarea : public Gtk::Grid
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
HigWorkarea();
|
|
|
|
|
2021-12-14 08:43:27 +00:00
|
|
|
TR_DISABLE_COPY_MOVE(HigWorkarea)
|
|
|
|
|
2021-10-18 20:22:31 +00:00
|
|
|
void add_section_divider(guint& row);
|
|
|
|
void add_section_title_widget(guint& row, Gtk::Widget& w);
|
|
|
|
void add_section_title(guint& row, Glib::ustring const& section_title);
|
|
|
|
void add_wide_tall_control(guint& row, Gtk::Widget& w);
|
|
|
|
void add_wide_control(guint& row, Gtk::Widget& w);
|
|
|
|
Gtk::CheckButton* add_wide_checkbutton(guint& row, Glib::ustring const& mnemonic_string, bool is_active);
|
|
|
|
void add_label_w(guint row, Gtk::Widget& label_widget);
|
|
|
|
Gtk::Label* add_tall_row(
|
|
|
|
guint& row,
|
|
|
|
Glib::ustring const& mnemonic_string,
|
|
|
|
Gtk::Widget& control,
|
|
|
|
Gtk::Widget* mnemonic_or_null_for_control = nullptr);
|
|
|
|
Gtk::Label* add_row(
|
|
|
|
guint& row,
|
|
|
|
Glib::ustring const& mnemonic_string,
|
|
|
|
Gtk::Widget& control,
|
|
|
|
Gtk::Widget* mnemonic_or_null_for_control = nullptr);
|
|
|
|
void add_row_w(
|
|
|
|
guint& row,
|
|
|
|
Gtk::Widget& label_widget,
|
|
|
|
Gtk::Widget& control,
|
|
|
|
Gtk::Widget* mnemonic_or_null_for_control = nullptr);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void add_tall_control(guint row, Gtk::Widget& control);
|
|
|
|
void add_control(guint row, Gtk::Widget& control);
|
|
|
|
};
|
2008-02-14 17:18:00 +00:00
|
|
|
|
2007-06-06 00:30:13 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
GUI_PAD_SMALL = 3,
|
|
|
|
GUI_PAD = 6,
|
|
|
|
GUI_PAD_BIG = 12,
|
|
|
|
GUI_PAD_LARGE = 12
|
|
|
|
};
|