b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith/*
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith * Authors:
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith * Murray C
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith *
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith * Copyright (C) 2012 Authors
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith *
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith * Released under GNU GPL. Read the file 'COPYING' for more information.
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith */
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith#ifndef INKSCAPE_UI_WIDGET_FRAME_H
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith#define INKSCAPE_UI_WIDGET_FRAME_H
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith
a34103bb11674e2d8489be2022aea65ea639c6b9Alex Valavanis#include <gtkmm/alignment.h>
a34103bb11674e2d8489be2022aea65ea639c6b9Alex Valavanis#include <gtkmm/frame.h>
a34103bb11674e2d8489be2022aea65ea639c6b9Alex Valavanis#include <gtkmm/label.h>
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smithnamespace Inkscape {
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smithnamespace UI {
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smithnamespace Widget {
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith/**
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith * Creates a Gnome HIG style indented frame with bold label
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith * See http://developer.gnome.org/hig-book/stable/controls-frames.html.en
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith */
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smithclass Frame : public Gtk::Frame
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith{
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smithpublic:
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith /**
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith * Construct a Frame Widget.
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith *
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith * @param label The frame text.
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith */
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith Frame(Glib::ustring const &label = "", gboolean label_bold = TRUE);
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith /**
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith * Return the label widget
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith */
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith Gtk::Label const *get_label_widget() const;
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith /**
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith * Add a widget to this frame
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith */
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith virtual void add(Widget& widget);
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith /**
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith * Set the frame label text and if bold or not
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith */
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith void set_label(const Glib::ustring &label, gboolean label_bold = TRUE);
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith /**
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith * Set the frame padding
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith */
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith void set_padding (guint padding_top, guint padding_bottom, guint padding_left, guint padding_right);
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smithprotected:
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith Gtk::Label _label;
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith Gtk::Alignment _alignment;
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith};
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith} // namespace Widget
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith} // namespace UI
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith} // namespace Inkscape
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith#endif // INKSCAPE_UI_WIDGET_FRAME_H
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith/*
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith Local Variables:
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith mode:c++
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith c-file-style:"stroustrup"
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith indent-tabs-mode:nil
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith fill-column:99
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith End:
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith*/
b113f74cd28fecc5bfaa6bc97346a9a62c258e7fJohn Smith// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :