1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Authors:
4  *   Murray C
5  *
6  * Copyright (C) 2012 Authors
7  *
8  * Released under GNU GPL v2+, read the file 'COPYING' for more information.
9  */
10 
11 #ifndef INKSCAPE_UI_WIDGET_FRAME_H
12 #define INKSCAPE_UI_WIDGET_FRAME_H
13 
14 #include <gtkmm/frame.h>
15 #include <gtkmm/label.h>
16 
17 namespace Inkscape {
18 namespace UI {
19 namespace Widget {
20 
21 /**
22  * Creates a Gnome HIG style indented frame with bold label
23  * See http://developer.gnome.org/hig-book/stable/controls-frames.html.en
24  */
25 class Frame : public Gtk::Frame
26 {
27 public:
28 
29     /**
30      * Construct a Frame Widget.
31      *
32      * @param label     The frame text.
33      */
34     Frame(Glib::ustring const &label = "", gboolean label_bold = TRUE);
35 
36     /**
37      * Return the label widget
38      */
39     Gtk::Label const *get_label_widget() const;
40 
41     /**
42      * Add a widget to this frame
43      */
44     void add(Widget& widget) override;
45 
46     /**
47      * Set the frame label text and if bold or not
48      */
49     void set_label(const Glib::ustring &label, gboolean label_bold = TRUE);
50 
51     /**
52      * Set the frame padding
53      */
54     void set_padding (guint padding_top, guint padding_bottom, guint padding_left, guint padding_right);
55 
56 protected:
57     Gtk::Label   _label;
58 };
59 
60 } // namespace Widget
61 } // namespace UI
62 } // namespace Inkscape
63 
64 #endif // INKSCAPE_UI_WIDGET_FRAME_H
65 
66 /*
67   Local Variables:
68   mode:c++
69   c-file-style:"stroustrup"
70   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
71   indent-tabs-mode:nil
72   fill-column:99
73   End:
74 */
75 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
76