~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/ui/widget/labelled.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * \brief Labelled Widget - Adds a label with optional icon or suffix to
 
3
 *        another widget.
 
4
 *
 
5
 * Authors:
 
6
 *   Carl Hetherington <inkscape@carlh.net>
 
7
 *   Derek P. Moore <derekm@hackunix.org>
 
8
 *
 
9
 * Copyright (C) 2004 Carl Hetherington
 
10
 *
 
11
 * Released under GNU GPL.  Read the file 'COPYING' for more information.
 
12
 */
 
13
 
 
14
#ifndef INKSCAPE_UI_WIDGET_LABELLED_H
 
15
#define INKSCAPE_UI_WIDGET_LABELLED_H
 
16
 
 
17
#include <gtkmm/box.h>
 
18
#include <gtkmm/label.h>
 
19
#include <gtkmm/image.h>
 
20
#include <gtkmm/tooltips.h>
 
21
 
 
22
namespace Inkscape {
 
23
namespace UI {
 
24
namespace Widget {
 
25
 
 
26
class Labelled : public Gtk::HBox
 
27
{
 
28
public:
 
29
    Labelled(Glib::ustring const &label, Glib::ustring const &tooltip,
 
30
             Gtk::Widget *widget,
 
31
             Glib::ustring const &suffix = "",
 
32
             Glib::ustring const &icon = "",
 
33
             bool mnemonic = true);
 
34
 
 
35
    /**
 
36
     * Allow the setting of the width of the labelled widget
 
37
     */
 
38
    void setWidgetSizeRequest(int width, int height);
 
39
    Gtk::Widget const *getWidget() const;
 
40
    Gtk::Label const *getLabel() const;
 
41
 
 
42
protected:
 
43
    Gtk::Widget  *_widget;
 
44
    Gtk::Label   *_label;
 
45
    Gtk::Label   *_suffix;
 
46
    Gtk::Widget  *_icon;
 
47
    Gtk::Tooltips _tooltips;
 
48
};
 
49
 
 
50
} // namespace Widget
 
51
} // namespace UI
 
52
} // namespace Inkscape
 
53
 
 
54
#endif // INKSCAPE_UI_WIDGET_LABELLED_H
 
55
 
 
56
/*
 
57
  Local Variables:
 
58
  mode:c++
 
59
  c-file-style:"stroustrup"
 
60
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
61
  indent-tabs-mode:nil
 
62
  fill-column:99
 
63
  End:
 
64
*/
 
65
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :