File indexing completed on 2024-12-01 11:20:56

0001 /***************************************************************************
0002  *   Copyright (C) 2005 by David Saxton                                    *
0003  *   david@bluehaze.org                                                    *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  ***************************************************************************/
0010 
0011 #ifndef VIEWIFACE_H
0012 #define VIEWIFACE_H
0013 
0014 // #include <dcopobject.h>
0015 // #include <dcopref.h>
0016 #include "dcop_stub.h"
0017 
0018 class CircuitView;
0019 class FlowCodeView;
0020 class ICNView;
0021 class ItemView;
0022 class MechanicsView;
0023 class TextView;
0024 class View;
0025 
0026 /**
0027 @author David Saxton
0028 */
0029 class ViewIface : public DCOPObject
0030 {
0031     K_DCOP
0032 
0033 public:
0034     ViewIface(View *view);
0035     virtual ~ViewIface();
0036 
0037     k_dcop : DCOPRef document();
0038     bool hasFocus();
0039     bool close();
0040     void zoomIn();
0041     void zoomOut();
0042     bool canZoomIn();
0043     bool canZoomOut();
0044     void actualSize();
0045 
0046 protected:
0047     View *m_pView;
0048 };
0049 
0050 class TextViewIface : public ViewIface
0051 {
0052     K_DCOP
0053 
0054 public:
0055     TextViewIface(TextView *view);
0056 
0057     k_dcop : void toggleBreakpoint();
0058     bool gotoLine(const int line);
0059 
0060 protected:
0061     TextView *m_pTextView;
0062 };
0063 
0064 class ItemViewIface : public ViewIface
0065 {
0066     K_DCOP
0067 
0068 public:
0069     ItemViewIface(ItemView *view);
0070 
0071     k_dcop : double zoomLevel();
0072 
0073 protected:
0074     ItemView *m_pItemView;
0075 };
0076 
0077 class MechanicsViewIface : public ItemViewIface
0078 {
0079     K_DCOP
0080 
0081 public:
0082     MechanicsViewIface(MechanicsView *view);
0083 
0084 protected:
0085     MechanicsView *m_pMechanicsView;
0086 };
0087 
0088 class ICNViewIface : public ItemViewIface
0089 {
0090     K_DCOP
0091 
0092 public:
0093     ICNViewIface(ICNView *view);
0094 
0095 protected:
0096     ICNView *m_pICNView;
0097 };
0098 
0099 class CircuitViewIface : public ICNViewIface
0100 {
0101     K_DCOP
0102 
0103 public:
0104     CircuitViewIface(CircuitView *view);
0105 
0106 protected:
0107     CircuitView *m_pCircuitView;
0108 };
0109 
0110 class FlowCodeViewIface : public ICNViewIface
0111 {
0112     K_DCOP
0113 
0114 public:
0115     FlowCodeViewIface(FlowCodeView *view);
0116 
0117 protected:
0118     FlowCodeView *m_pFlowCodeView;
0119 };
0120 
0121 #endif