summaryrefslogtreecommitdiffstats
path: root/src/viewiface.cpp
blob: 592b0fe8e04faa5f1572bcc150e53af626fb62d5 (plain)
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
/***************************************************************************
 *   Copyright (C) 2005 by David Saxton                                    *
 *   david@bluehaze.org                                                    *
 *                                                                         *
 *   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.                                   *
 ***************************************************************************/

#include "circuitview.h"
#include "document.h"
#include "flowcodeview.h"
#include "mechanicsview.h"
#include "textview.h"
#include "viewiface.h"


//BEGIN class ViewIface
ViewIface::ViewIface( View * view )
	: DCOPObject("View")
{
	m_pView = view;
}

ViewIface::~ ViewIface( )
{
}

DCOPRef ViewIface::document( )
{
	return DCOPRef( m_pView->document()->dcopObject() );
}

bool ViewIface::isFocused( )
{
	return m_pView->isFocused();
}

bool ViewIface::close( )
{
	return m_pView->closeView();
}

void ViewIface::zoomIn( )
{
	m_pView->viewZoomIn();
}

void ViewIface::zoomOut( )
{
	m_pView->viewZoomOut();
}

bool ViewIface::canZoomIn( )
{
	return m_pView->canZoomIn();
}

bool ViewIface::canZoomOut( )
{
	return m_pView->canZoomOut();
}

void ViewIface::actualSize( )
{
	m_pView->actualSize();
}
//END class ViewIface



//BEGIN class TextViewIface
TextViewIface::TextViewIface( TextView * view )
	: ViewIface(view)
{
	m_pTextView = view;
}

void TextViewIface::toggleBreakpoint( )
{
	m_pTextView->toggleBreakpoint();
}

bool TextViewIface::gotoLine( const int line )
{
	return m_pTextView->gotoLine(line);
}
//END class TextViewIface



//BEGIN class ItemViewIface
ItemViewIface::ItemViewIface( ItemView * view )
	: ViewIface(view)
{
	m_pItemView = view;
}

double ItemViewIface::zoomLevel( )
{
	return m_pItemView->zoomLevel();
}
//END class ItemViewIface



//BEGIN class MechanicsViewIface
MechanicsViewIface::MechanicsViewIface( MechanicsView * view )
	: ItemViewIface(view)
{
	m_pMechanicsView = view;
}
//END class ICNViewIface



//BEGIN class ICNViewIface
ICNViewIface::ICNViewIface( ICNView * view )
	: ItemViewIface(view)
{
	m_pICNView = view;
}
//END class ICNViewIface



//BEGIN class CircuitViewIface
CircuitViewIface::CircuitViewIface( CircuitView * view )
	: ICNViewIface(view)
{
	m_pCircuitView = view;
}
//END class CircuitViewIface


//BEGIN class FlowCodeViewIface
FlowCodeViewIface::FlowCodeViewIface( FlowCodeView * view )
	: ICNViewIface(view)
{
}
//END class FlowCodeViewIface