karbon
vselectobjects.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __VSELECTOBJECTS_H__
00021 #define __VSELECTOBJECTS_H__
00022
00023
00024 #include "KoRect.h"
00025
00026 #include "vcomposite.h"
00027 #include "vgroup.h"
00028 #include "vtext.h"
00029 #include "vimage.h"
00030 #include "vvisitor.h"
00031
00038 class VSelectObjects : public VVisitor
00039 {
00040 public:
00041 VSelectObjects( VObjectList& selection, bool select = true )
00042 : m_selection( selection ), m_select( select ), m_rectMode( true ), m_insideGroups( false ) {}
00043
00044 VSelectObjects( VObjectList& selection, const KoRect& rect, bool select = true )
00045 : m_selection( selection ), m_select( select ), m_rect( rect ), m_rectMode( true ), m_insideGroups( false ) { }
00046
00047 VSelectObjects( VObjectList& selection, const KoPoint& point, bool select = true, bool insideGroups = false )
00048 : m_selection( selection ), m_select( select ), m_point( point ), m_rectMode( false ), m_insideGroups( insideGroups ) {}
00049
00050 virtual void visitVGroup( VGroup& group );
00051 virtual void visitVPath( VPath& composite );
00052 virtual void visitVText( VText& text );
00053 virtual void visitVImage( VImage& img )
00054 { visitVObject( img ); }
00055 virtual void visitVLayer( VLayer& layer );
00056
00057 private:
00058 void visitVObject( VObject& object );
00059
00060 VObjectList& m_selection;
00061
00062 bool m_select;
00063
00064 KoRect m_rect;
00065 KoPoint m_point;
00066 bool m_rectMode;
00067 bool m_insideGroups;
00068 };
00069
00070 #endif
00071
|