diff options
Diffstat (limited to '')
-rw-r--r-- | src/ui/widget/frame.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/src/ui/widget/frame.h b/src/ui/widget/frame.h new file mode 100644 index 0000000..b2934b6 --- /dev/null +++ b/src/ui/widget/frame.h @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Authors: + * Murray C + * + * Copyright (C) 2012 Authors + * + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ + +#ifndef INKSCAPE_UI_WIDGET_FRAME_H +#define INKSCAPE_UI_WIDGET_FRAME_H + +#include <gtkmm/frame.h> +#include <gtkmm/label.h> + +namespace Inkscape { +namespace UI { +namespace Widget { + +/** + * Creates a Gnome HIG style indented frame with bold label + * See http://developer.gnome.org/hig-book/stable/controls-frames.html.en + */ +class Frame : public Gtk::Frame +{ +public: + + /** + * Construct a Frame Widget. + * + * @param label The frame text. + */ + Frame(Glib::ustring const &label = "", gboolean label_bold = TRUE); + + /** + * Return the label widget + */ + Gtk::Label const *get_label_widget() const; + + /** + * Add a widget to this frame + */ + void add(Widget& widget) override; + + /** + * Set the frame label text and if bold or not + */ + void set_label(const Glib::ustring &label, gboolean label_bold = TRUE); + + /** + * Set the frame padding + */ + void set_padding (guint padding_top, guint padding_bottom, guint padding_left, guint padding_right); + +protected: + Gtk::Label _label; +}; + +} // namespace Widget +} // namespace UI +} // namespace Inkscape + +#endif // INKSCAPE_UI_WIDGET_FRAME_H + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : |