summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorTomasz Boczkowski <penginsbacon@gmail.com>2015-05-09 11:38:22 +0000
committerTomasz Boczkowski <penginsbacon@gmail.com>2015-05-09 11:38:22 +0000
commitdb85d12f8c106586a0b11f60bf32cdb8ca75d8f2 (patch)
treeae5cbc2ad4fdbb93dbc1d7fc8b92ee2e2012e853 /src/ui
parentrenamed SPPattern methods to match coding style (diff)
parentfix crash introduces by recent rev when clipping (diff)
downloadinkscape-db85d12f8c106586a0b11f60bf32cdb8ca75d8f2.tar.gz
inkscape-db85d12f8c106586a0b11f60bf32cdb8ca75d8f2.zip
merged trunk
(bzr r14059.1.21)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/document-properties.cpp4
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp31
-rw-r--r--src/ui/dialog/filter-effects-dialog.h4
-rw-r--r--src/ui/dialog/floating-behavior.cpp2
-rw-r--r--src/ui/dialog/grid-arrange-tab.cpp1
-rw-r--r--src/ui/dialog/icon-preview.cpp2
-rw-r--r--src/ui/dialog/object-properties.cpp4
-rw-r--r--src/ui/interface.cpp2
-rw-r--r--src/ui/tools/box3d-tool.cpp2
-rw-r--r--src/ui/tools/eraser-tool.cpp2
-rw-r--r--src/ui/tools/flood-tool.cpp2
-rw-r--r--src/ui/tools/pen-tool.cpp15
-rw-r--r--src/ui/tools/pencil-tool.cpp3
-rw-r--r--src/ui/tools/rect-tool.cpp1
-rw-r--r--src/ui/tools/select-tool.cpp1
-rw-r--r--src/ui/widget/object-composite-settings.cpp4
-rw-r--r--src/ui/widget/style-subject.cpp24
-rw-r--r--src/ui/widget/style-subject.h10
18 files changed, 60 insertions, 54 deletions
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index c381ed755..b04e8ecc1 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -1672,10 +1672,10 @@ void DocumentProperties::onDocUnitChange()
Inkscape::XML::Node *repr = getDesktop()->getNamedView()->getRepr();
- Inkscape::Util::Unit const *old_doc_unit = unit_table.getUnit("px");
+ /*Inkscape::Util::Unit const *old_doc_unit = unit_table.getUnit("px");
if(repr->attribute("inkscape:document-units")) {
old_doc_unit = unit_table.getUnit(repr->attribute("inkscape:document-units"));
- }
+ }*/
Inkscape::Util::Unit const *doc_unit = _rum_deflt.getUnit();
// Set document unit
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index f81519ed1..1ff9e4a1b 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -8,6 +8,7 @@
* Felipe C. da S. Sanches <juca@members.fsf.org>
* Jon A. Cruz <jon@joncruz.org>
* Abhishek Sharma
+ * insaner
*
* Copyright (C) 2007 Authors
*
@@ -1360,8 +1361,15 @@ FilterEffectsDialog::FilterModifier::FilterModifier(FilterEffectsDialog& d)
((Gtk::CellRendererText*)_list.get_column(1)->get_first_cell())->
signal_edited().connect(sigc::mem_fun(*this, &FilterEffectsDialog::FilterModifier::on_name_edited));
+ _list.append_column("#", _columns.count);
+ _list.get_column(2)->set_sizing(Gtk::TREE_VIEW_COLUMN_AUTOSIZE);
+ _list.get_column(2)->set_expand(false);
+
sw->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
_list.get_column(1)->set_resizable(true);
+ _list.get_column(1)->set_sizing(Gtk::TREE_VIEW_COLUMN_AUTOSIZE);
+ _list.get_column(1)->set_expand(true);
+
_list.set_reorderable(true);
_list.enable_model_drag_dest (Gdk::ACTION_MOVE);
@@ -1494,6 +1502,7 @@ void FilterEffectsDialog::FilterModifier::update_selection(Selection *sel)
(*iter)[_columns.sel] = 0;
}
}
+ update_counts();
}
void FilterEffectsDialog::FilterModifier::on_filter_selection_changed()
@@ -1565,6 +1574,15 @@ void FilterEffectsDialog::FilterModifier::on_selection_toggled(const Glib::ustri
}
}
+
+void FilterEffectsDialog::FilterModifier::update_counts()
+{
+ for(Gtk::TreeModel::iterator i = _model->children().begin(); i != _model->children().end(); ++i) {
+ SPFilter* f = SP_FILTER((*i)[_columns.filter]);
+ (*i)[_columns.count] = f->getRefCount();
+ }
+}
+
/* Add all filters in the document to the combobox.
Keeps the same selection if possible, otherwise selects the first element */
void FilterEffectsDialog::FilterModifier::update_filters()
@@ -2419,7 +2437,7 @@ bool FilterEffectsDialog::PrimitiveList::on_motion_notify_event(GdkEventMotion*
get_visible_rect(vis);
int vis_x, vis_y;
- int vis_x2, vis_y2; // NOTE: insaner added -- necessary to get the scrolling while dragging to work
+ int vis_x2, vis_y2;
convert_widget_to_tree_coords(vis.get_x(), vis.get_y(), vis_x2, vis_y2);
convert_tree_to_widget_coords(vis.get_x(), vis.get_y(), vis_x, vis_y);
@@ -2439,7 +2457,6 @@ bool FilterEffectsDialog::PrimitiveList::on_motion_notify_event(GdkEventMotion*
else
_autoscroll_y = 0;
- // NOTE: insaner added -- necessary to get the scrolling while dragging to work
double e2 = ( e->x - vis_x2/2);
// horizontal scrolling
if(e2 < vis_x)
@@ -2752,20 +2769,22 @@ FilterEffectsDialog::FilterEffectsDialog()
Gtk::ScrolledWindow* sw_infobox = Gtk::manage(new Gtk::ScrolledWindow);
Gtk::HBox* infobox = Gtk::manage(new Gtk::HBox(/*homogeneous:*/false, /*spacing:*/4));
Gtk::HBox* hb_prims = Gtk::manage(new Gtk::HBox);
+ Gtk::VBox* vb_prims = Gtk::manage(new Gtk::VBox);
_getContents()->add(*hpaned);
hpaned->pack1(_filter_modifier);
hpaned->pack2(_primitive_box);
_primitive_box.pack_start(*sw_prims);
- _primitive_box.pack_start(*hb_prims, false, false);
_primitive_box.pack_start(*sw_infobox, false, false);
sw_prims->add(_primitive_list);
- sw_infobox->add(*infobox);
+ sw_infobox->add(*vb_prims);
infobox->pack_start(_infobox_icon, false, false);
infobox->pack_start(_infobox_desc, false, false);
_infobox_desc.set_line_wrap(true);
- _infobox_desc.set_size_request(200, -1);
+ _infobox_desc.set_size_request(250, -1);
+ vb_prims->pack_start(*hb_prims);
+ vb_prims->pack_start(*infobox);
hb_prims->pack_start(_add_primitive, false, false);
hb_prims->pack_start(_add_primitive_type, false, false);
@@ -2781,7 +2800,7 @@ FilterEffectsDialog::FilterEffectsDialog()
_add_primitive_type.signal_changed().connect(
sigc::mem_fun(*this, &FilterEffectsDialog::update_primitive_infobox));
- sw_prims->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); /* NOTE: insaner -- SCROLL the connections panel thing!!! */
+ sw_prims->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
sw_prims->set_shadow_type(Gtk::SHADOW_IN);
sw_infobox->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_NEVER);
diff --git a/src/ui/dialog/filter-effects-dialog.h b/src/ui/dialog/filter-effects-dialog.h
index 3fc19e7de..a067cd70c 100644
--- a/src/ui/dialog/filter-effects-dialog.h
+++ b/src/ui/dialog/filter-effects-dialog.h
@@ -4,6 +4,7 @@
/* Authors:
* Nicholas Bishop <nicholasbishop@gmail.com>
* Rodrigo Kumpera <kumpera@gmail.com>
+ * insaner
*
* Copyright (C) 2007 Authors
*
@@ -69,11 +70,13 @@ private:
add(filter);
add(label);
add(sel);
+ add(count);
}
Gtk::TreeModelColumn<SPFilter*> filter;
Gtk::TreeModelColumn<Glib::ustring> label;
Gtk::TreeModelColumn<int> sel;
+ Gtk::TreeModelColumn<int> count;
};
void setTargetDesktop(SPDesktop *desktop);
@@ -89,6 +92,7 @@ private:
bool on_filter_move(const Glib::RefPtr<Gdk::DragContext>& /*context*/, int x, int y, guint /*time*/);
void on_selection_toggled(const Glib::ustring&);
+ void update_counts();
void update_filters();
void filter_list_button_release(GdkEventButton*);
void add_filter();
diff --git a/src/ui/dialog/floating-behavior.cpp b/src/ui/dialog/floating-behavior.cpp
index 740acd989..55ef0c5bb 100644
--- a/src/ui/dialog/floating-behavior.cpp
+++ b/src/ui/dialog/floating-behavior.cpp
@@ -112,7 +112,7 @@ bool FloatingBehavior::_trans_timer (void) {
}
float goal, current;
- goal = current = _d->get_opacity();
+ current = _d->get_opacity();
if (_dialog_active.get_value()) {
goal = _trans_focus;
diff --git a/src/ui/dialog/grid-arrange-tab.cpp b/src/ui/dialog/grid-arrange-tab.cpp
index 4465d73a9..c44f66a4d 100644
--- a/src/ui/dialog/grid-arrange-tab.cpp
+++ b/src/ui/dialog/grid-arrange-tab.cpp
@@ -170,7 +170,6 @@ void GridArrangeTab::arrange()
Inkscape::Selection *selection = desktop->getSelection();
const std::vector<SPItem*> items = selection ? selection->itemList() : std::vector<SPItem*>();
- cnt=0;
for(std::vector<SPItem*>::const_iterator i = items.begin();i!=items.end();i++){
SPItem *item = *i;
Geom::OptRect b = item->documentVisualBounds();
diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp
index 7dc55c95c..77f120e1a 100644
--- a/src/ui/dialog/icon-preview.cpp
+++ b/src/ui/dialog/icon-preview.cpp
@@ -312,7 +312,7 @@ void IconPreviewPanel::setDesktop( SPDesktop* desktop )
if ( this->desktop ) {
docReplacedConn = this->desktop->connectDocumentReplaced(sigc::hide<0>(sigc::mem_fun(this, &IconPreviewPanel::setDocument)));
if ( this->desktop->selection && Inkscape::Preferences::get()->getBool("/iconpreview/autoRefresh", true) ) {
- selChangedConn = desktop->selection->connectChanged(sigc::hide(sigc::mem_fun(this, &IconPreviewPanel::queueRefresh)));
+ selChangedConn = this->desktop->selection->connectChanged(sigc::hide(sigc::mem_fun(this, &IconPreviewPanel::queueRefresh)));
}
}
}
diff --git a/src/ui/dialog/object-properties.cpp b/src/ui/dialog/object-properties.cpp
index dfe211e94..fc21a30d4 100644
--- a/src/ui/dialog/object-properties.cpp
+++ b/src/ui/dialog/object-properties.cpp
@@ -467,14 +467,14 @@ void ObjectProperties::_labelChanged()
gchar *id = g_strdup(_entry_id.get_text().c_str());
g_strcanon(id, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.:", '_');
if (strcmp(id, item->getId()) == 0) {
- _label_id.set_markup_with_mnemonic(_("_ID:"));
+ _label_id.set_markup_with_mnemonic(_("_ID:") + Glib::ustring(" "));
} else if (!*id || !isalnum (*id)) {
_label_id.set_text(_("Id invalid! "));
} else if (SP_ACTIVE_DOCUMENT->getObjectById(id) != NULL) {
_label_id.set_text(_("Id exists! "));
} else {
SPException ex;
- _label_id.set_markup_with_mnemonic(_("_ID:"));
+ _label_id.set_markup_with_mnemonic(_("_ID:") + Glib::ustring(" "));
SP_EXCEPTION_INIT(&ex);
item->setAttribute("id", id, &ex);
DocumentUndo::done(SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM, _("Set object ID"));
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp
index 760d19e89..a129d4b92 100644
--- a/src/ui/interface.cpp
+++ b/src/ui/interface.cpp
@@ -439,7 +439,7 @@ sp_ui_dialog_title_string(Inkscape::Verb *verb, gchar *c)
gchar* key = sp_shortcut_get_label(shortcut);
s = g_stpcpy(s, " (");
s = g_stpcpy(s, key);
- s = g_stpcpy(s, ")");
+ g_stpcpy(s, ")");
g_free(key);
}
}
diff --git a/src/ui/tools/box3d-tool.cpp b/src/ui/tools/box3d-tool.cpp
index 538e0c7e2..27e755add 100644
--- a/src/ui/tools/box3d-tool.cpp
+++ b/src/ui/tools/box3d-tool.cpp
@@ -165,7 +165,7 @@ bool Box3dTool::item_handler(SPItem* item, GdkEvent* event) {
case GDK_BUTTON_PRESS:
if ( event->button.button == 1 && !this->space_panning) {
Inkscape::setup_for_drag_start(desktop, this, event);
- ret = TRUE;
+ //ret = TRUE;
}
break;
// motion and release are always on root (why?)
diff --git a/src/ui/tools/eraser-tool.cpp b/src/ui/tools/eraser-tool.cpp
index 01b75fdb4..10f8c8694 100644
--- a/src/ui/tools/eraser-tool.cpp
+++ b/src/ui/tools/eraser-tool.cpp
@@ -674,7 +674,7 @@ void EraserTool::set_to_accumulated() {
Inkscape::Rubberband *r = Inkscape::Rubberband::get(desktop);
toWorkOn = desktop->getDocument()->getItemsAtPoints(desktop->dkey, r->getPoints());
}
- toWorkOn.erase(find(toWorkOn.begin(),toWorkOn.end(),acid));
+ toWorkOn.erase(std::remove(toWorkOn.begin(), toWorkOn.end(), acid), toWorkOn.end());
} else {
toWorkOn= selection->itemList();
wasSelection = true;
diff --git a/src/ui/tools/flood-tool.cpp b/src/ui/tools/flood-tool.cpp
index ffd41d97d..748c82717 100644
--- a/src/ui/tools/flood-tool.cpp
+++ b/src/ui/tools/flood-tool.cpp
@@ -932,7 +932,7 @@ static void sp_flood_do_flood_fill(ToolBase *event_context, GdkEvent *event, boo
std::deque<Geom::Point>::iterator start_sort = fill_queue.begin();
std::deque<Geom::Point>::iterator end_sort = fill_queue.begin();
unsigned int sort_y = (unsigned int)cp[Geom::Y];
- unsigned int current_y = sort_y;
+ unsigned int current_y;
for (std::deque<Geom::Point>::iterator i = fill_queue.begin(); i != fill_queue.end(); ++i) {
Geom::Point current = *i;
diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp
index daffc7032..be6156fa2 100644
--- a/src/ui/tools/pen-tool.cpp
+++ b/src/ui/tools/pen-tool.cpp
@@ -762,14 +762,12 @@ bool PenTool::_handleButtonRelease(GdkEventButton const &revent) {
}
}
this->state = PenTool::CONTROL;
- ret = true;
break;
case PenTool::CONTROL:
// End current segment
this->_endpointSnap(p, revent.state);
this->_finishSegment(p, revent.state);
this->state = PenTool::POINT;
- ret = true;
break;
case PenTool::CLOSE:
// End current segment
@@ -783,12 +781,10 @@ bool PenTool::_handleButtonRelease(GdkEventButton const &revent) {
}
this->_finish(true);
this->state = PenTool::POINT;
- ret = true;
break;
case PenTool::STOP:
// This is allowed, if we just canceled curve
this->state = PenTool::POINT;
- ret = true;
break;
default:
break;
@@ -823,7 +819,6 @@ bool PenTool::_handleButtonRelease(GdkEventButton const &revent) {
break;
}
this->state = PenTool::POINT;
- ret = true;
break;
default:
break;
@@ -1432,8 +1427,7 @@ void PenTool::_bsplineSpiroStartAnchorOn()
{
using Geom::X;
using Geom::Y;
- SPCurve *tmp_curve = new SPCurve();
- tmp_curve = this->sa->curve->copy();
+ SPCurve *tmp_curve = this->sa->curve->copy();
if(this->sa->start)
tmp_curve = tmp_curve ->create_reverse();
Geom::CubicBezier const * cubic = dynamic_cast<Geom::CubicBezier const*>(&*tmp_curve ->last_segment());
@@ -1465,8 +1459,7 @@ void PenTool::_bsplineSpiroStartAnchorOn()
void PenTool::_bsplineSpiroStartAnchorOff()
{
- SPCurve *tmp_curve = new SPCurve();
- tmp_curve = this->sa->curve->copy();
+ SPCurve *tmp_curve = this->sa->curve->copy();
if(this->sa->start)
tmp_curve = tmp_curve ->create_reverse();
Geom::CubicBezier const * cubic = dynamic_cast<Geom::CubicBezier const*>(&*tmp_curve ->last_segment());
@@ -1564,7 +1557,7 @@ void PenTool::_bsplineSpiroEndAnchorOn()
using Geom::Y;
this->p[2] = this->p[3] + (1./3)*(this->p[0] - this->p[3]);
this->p[2] = Geom::Point(this->p[2][X] + HANDLE_CUBIC_GAP,this->p[2][Y] + HANDLE_CUBIC_GAP);
- SPCurve *tmp_curve = new SPCurve();
+ SPCurve *tmp_curve;
SPCurve *last_segment = new SPCurve();
Geom::Point point_c(0,0);
bool reverse = false;
@@ -1621,7 +1614,7 @@ void PenTool::_bsplineSpiroEndAnchorOn()
void PenTool::_bsplineSpiroEndAnchorOff()
{
- SPCurve *tmp_curve = new SPCurve();
+ SPCurve *tmp_curve;
SPCurve *last_segment = new SPCurve();
bool reverse = false;
this->p[2] = this->p[3];
diff --git a/src/ui/tools/pencil-tool.cpp b/src/ui/tools/pencil-tool.cpp
index 008804162..ba103fa8e 100644
--- a/src/ui/tools/pencil-tool.cpp
+++ b/src/ui/tools/pencil-tool.cpp
@@ -357,7 +357,6 @@ bool PencilTool::_handleButtonRelease(GdkEventButton const &revent) {
// Ctrl+click creates a single point so only set context in ADDLINE mode when Ctrl isn't pressed
this->state = SP_PENCIL_CONTEXT_ADDLINE;
}
- ret = true;
break;
case SP_PENCIL_CONTEXT_ADDLINE:
/* Finish segment now */
@@ -371,7 +370,6 @@ bool PencilTool::_handleButtonRelease(GdkEventButton const &revent) {
this->_finishEndpoint();
this->state = SP_PENCIL_CONTEXT_IDLE;
sp_event_context_discard_delayed_snap_event(this);
- ret = true;
break;
case SP_PENCIL_CONTEXT_FREEHAND:
if (revent.state & GDK_MOD1_MASK) {
@@ -413,7 +411,6 @@ bool PencilTool::_handleButtonRelease(GdkEventButton const &revent) {
// reset sketch mode too
this->sketch_n = 0;
}
- ret = true;
break;
case SP_PENCIL_CONTEXT_SKETCH:
default:
diff --git a/src/ui/tools/rect-tool.cpp b/src/ui/tools/rect-tool.cpp
index 62a9006ea..844965c4d 100644
--- a/src/ui/tools/rect-tool.cpp
+++ b/src/ui/tools/rect-tool.cpp
@@ -143,7 +143,6 @@ bool RectTool::item_handler(SPItem* item, GdkEvent* event) {
case GDK_BUTTON_PRESS:
if ( event->button.button == 1 && !this->space_panning) {
Inkscape::setup_for_drag_start(desktop, this, event);
- ret = TRUE;
}
break;
// motion and release are always on root (why?)
diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp
index f8375a1bb..f06b03d91 100644
--- a/src/ui/tools/select-tool.cpp
+++ b/src/ui/tools/select-tool.cpp
@@ -777,7 +777,6 @@ bool SelectTool::root_handler(GdkEvent* event) {
}
rb_escaped = 0;
- ret = TRUE;
}
}
}
diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp
index 598a90e95..8acf083d0 100644
--- a/src/ui/widget/object-composite-settings.cpp
+++ b/src/ui/widget/object-composite-settings.cpp
@@ -125,8 +125,8 @@ ObjectCompositeSettings::_blendBlurValueChanged()
const Glib::ustring blendmode = _fe_cb.get_blend_mode();
//apply created filter to every selected item
- std::vector<SPItem*> sel=_subject->getDesktop()->getSelection()->itemList();
- for (std::vector<SPItem*>::const_iterator i = sel.begin() ; i != sel.end() ; ++i ) {
+ std::vector<SPObject*> sel=_subject->list();
+ for (std::vector<SPObject*>::const_iterator i = sel.begin() ; i != sel.end() ; ++i ) {
if (!SP_IS_ITEM(*i)) {
continue;
}
diff --git a/src/ui/widget/style-subject.cpp b/src/ui/widget/style-subject.cpp
index 95b89bf5f..da3bbcd20 100644
--- a/src/ui/widget/style-subject.cpp
+++ b/src/ui/widget/style-subject.cpp
@@ -54,15 +54,13 @@ Inkscape::Selection *StyleSubject::Selection::_getSelection() const {
return NULL;
}
}
-/*
-StyleSubject::iterator StyleSubject::Selection::begin() {
+
+std::vector<SPObject*> StyleSubject::Selection::list(){
Inkscape::Selection *selection = _getSelection();
- if (selection) {
- return iterator(selection->list());
- } else {
- return iterator(NULL);
- }
-}*/
+ if(selection)
+ return selection->list();
+ else return std::vector<SPObject*>();
+}
Geom::OptRect StyleSubject::Selection::getBounds(SPItem::BBoxType type) {
Inkscape::Selection *selection = _getSelection();
@@ -133,10 +131,12 @@ SPObject *StyleSubject::CurrentLayer::_getLayerSList() const {
return _element;
}
-/*
-StyleSubject::iterator StyleSubject::CurrentLayer::begin() {
- return iterator(_getLayerSList());
-}*/
+
+std::vector<SPObject*> StyleSubject::CurrentLayer::list(){
+ std::vector<SPObject*> list;
+ list.push_back(_element);
+ return list;
+}
Geom::OptRect StyleSubject::CurrentLayer::getBounds(SPItem::BBoxType type) {
SPObject *layer = _getLayer();
diff --git a/src/ui/widget/style-subject.h b/src/ui/widget/style-subject.h
index 60f979eb0..15a072f44 100644
--- a/src/ui/widget/style-subject.h
+++ b/src/ui/widget/style-subject.h
@@ -10,7 +10,6 @@
#ifndef SEEN_INKSCAPE_UI_WIDGET_STYLE_SUBJECT_H
#define SEEN_INKSCAPE_UI_WIDGET_STYLE_SUBJECT_H
-#include "util/glib-list-iterators.h"
#include <boost/optional.hpp>
#include <2geom/rect.h>
#include "sp-item.h"
@@ -35,8 +34,6 @@ public:
class Selection;
class CurrentLayer;
- //typedef Util::GSListConstIterator<SPObject *> iterator;
- typedef std::list<SPObject*>::iterator iterator;
StyleSubject();
virtual ~StyleSubject();
@@ -44,11 +41,10 @@ public:
void setDesktop(SPDesktop *desktop);
SPDesktop *getDesktop() const { return _desktop; }
-// virtual iterator begin() = 0;
-// virtual iterator end() { return iterator(NULL); }
virtual Geom::OptRect getBounds(SPItem::BBoxType type) = 0;
virtual int queryStyle(SPStyle *query, int property) = 0;
virtual void setCSS(SPCSSAttr *css) = 0;
+ virtual std::vector<SPObject*> list(){return std::vector<SPObject*>();};
sigc::connection connectChanged(sigc::signal<void>::slot_type slot) {
return _changed_signal.connect(slot);
@@ -68,10 +64,10 @@ public:
Selection();
~Selection();
-// virtual iterator begin();
virtual Geom::OptRect getBounds(SPItem::BBoxType type);
virtual int queryStyle(SPStyle *query, int property);
virtual void setCSS(SPCSSAttr *css);
+ virtual std::vector<SPObject*> list();
protected:
virtual void _afterDesktopSwitch(SPDesktop *desktop);
@@ -89,10 +85,10 @@ public:
CurrentLayer();
~CurrentLayer();
-// virtual iterator begin();
virtual Geom::OptRect getBounds(SPItem::BBoxType type);
virtual int queryStyle(SPStyle *query, int property);
virtual void setCSS(SPCSSAttr *css);
+ virtual std::vector<SPObject*> list();
protected:
virtual void _afterDesktopSwitch(SPDesktop *desktop);