1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
/**
* @file Object properties dialog.
*/
/*
* Inkscape, an Open Source vector graphics editor
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright (C) 2012 Kris De Gussem <Kris.DeGussem@gmail.com>
* c++version based on former C-version (GPL v2) with authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* bulia byak <buliabyak@users.sf.net>
* Johan Engelen <goejendaagh@zonnet.nl>
* Abhishek Sharma
*/
#ifndef SEEN_DIALOGS_ITEM_PROPERTIES_H
#define SEEN_DIALOGS_ITEM_PROPERTIES_H
#include "ui/widget/panel.h"
#include "ui/widget/frame.h"
#include <gtkmm/entry.h>
#include <gtkmm/expander.h>
#include <gtkmm/frame.h>
#include <gtkmm/textview.h>
#include "ui/dialog/desktop-tracker.h"
#include "widgets/sp-attribute-widget.h"
class SPDesktop;
class SPItem;
namespace Inkscape {
namespace UI {
namespace Dialog {
/**
* A dialog widget to show object properties.
*
* A widget to enter an ID, label, title and description for an object.
* In addition it allows to edit the properties of an object.
*/
class ObjectProperties : public Widget::Panel {
public:
ObjectProperties ();
~ObjectProperties ();
static ObjectProperties &getInstance() { return *new ObjectProperties(); }
/**
* Updates entries and other child widgets on selection change, object modification, etc.
*/
void widget_setup(void);
private:
bool blocked;
SPItem *CurrentItem; //to store the current item, for not wasting resources
std::vector<Glib::ustring> int_labels;
Gtk::Table TopTable; //the table with the object properties
Gtk::Label LabelID; //the label for the object ID
Gtk::Entry EntryID; //the entry for the object ID
Gtk::Label LabelLabel; //the label for the object label
Gtk::Entry EntryLabel; //the entry for the object label
Gtk::Label LabelTitle; //the label for the object title
Gtk::Entry EntryTitle; //the entry for the object title
Gtk::Label LabelDescription; //the label for the object description
UI::Widget::Frame FrameDescription; //the frame for the object description
Gtk::Frame FrameTextDescription; //the frame for the text of the object description
Gtk::TextView TextViewDescription; //the text view object showing the object description
Gtk::HBox HBoxCheck; // the HBox for the check boxes
Gtk::Table CheckTable; //the table for the check boxes
Gtk::CheckButton CBHide; //the check button hide
Gtk::CheckButton CBLock; //the check button lock
Gtk::Button BSet; //the button set
Gtk::Label LabelInteractivity; //the label for interactivity
Gtk::Expander EInteractivity; //the label for interactivity
SPAttributeTable attrTable; //the widget for showing the on... names at the bottom
SPDesktop *desktop;
DesktopTracker deskTrack;
sigc::connection desktopChangeConn;
sigc::connection selectChangedConn;
sigc::connection subselChangedConn;
/**
* Constructor auxiliary function creating the child widgets.
*/
void MakeWidget(void);
/**
* Sets object properties (ID, label, title, description) on user input.
*/
void label_changed(void);
/**
* Callback for checkbox Lock.
*/
void sensitivity_toggled (void);
/**
* Callback for checkbox Hide.
*/
void hidden_toggled(void);
/**
* Can be invoked for setting the desktop. Currently not used.
*/
void setDesktop(SPDesktop *desktop);
/**
* Is invoked by the desktop tracker when the desktop changes.
*/
void setTargetDesktop(SPDesktop *desktop);
};
}
}
}
#endif
/*
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 :
|