+void DrawingView::DeleteSelectedItems(void)
+{
+ std::vector<void *>::iterator i = document.objects.begin();
+
+ while (i != document.objects.end())
+ {
+ Object * obj = (Object *)(*i);
+
+ if (obj->selected)
+ {
+ delete obj;
+ document.objects.erase(i);
+ }
+ else
+ i++;
+ }
+}
+
+
+void DrawingView::ClearSelection(void)
+{
+ std::vector<void *>::iterator i;
+
+ for(i=document.objects.begin(); i!=document.objects.end(); i++)
+ ((Object *)(*i))->selected = false;
+}
+
+
+void DrawingView::AddHoveredToSelection(void)
+{
+ std::vector<void *>::iterator i;
+
+ for(i=document.objects.begin(); i!=document.objects.end(); i++)
+ {
+ if (((Object *)(*i))->hovered)
+ ((Object *)(*i))->selected = true;
+ }
+}
+
+
+void DrawingView::GetSelection(std::vector<void *> & v)
+{
+ v.empty();
+ std::vector<void *>::iterator i;
+
+ for(i=v.begin(); i!=v.end(); i++)
+ {
+ if (((Object *)(*i))->selected)
+ v.push_back(*i);
+ }
+}
+
+
+void DrawingView::GetHovered(std::vector<void *> & v)
+{
+ v.empty();
+ std::vector<void *>::iterator i;
+
+ for(i=v.begin(); i!=v.end(); i++)
+ {
+ if (((Object *)(*i))->hovered)
+ v.push_back(*i);
+ }
+}
+
+