OSDN Git Service

[denncoCreator] fixed a crash bug.
[dennco/denncoCreator.git] / Source / dcreceptor.h
1 //  Copyright (c) 2012 Dennco Project
2 //
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
16 //
17 //  Created by tkawata on Sep-30, 2012.
18 //
19 #ifndef DCRECEPTOR_H
20 #define DCRECEPTOR_H
21
22 #include "TKReceptor.h"
23
24 class DCCell;
25 class DCVCReceptor;
26 class DCVComponent;
27 class DCVCEditModeCursor;
28 class DCAxonTerminal;
29
30 class DCReceptor : public TKReceptor
31 {
32     friend struct DCComponentUtil;
33     DCReceptor(DCCell *theOwner);
34     void bindComponent(DCVComponent *component) { d_vComponent = component; }
35
36     DCVComponent        *d_vComponent;
37     bool                d_isTerminalVisible;
38     DCVCEditModeCursor  *d_editCursor;
39
40 public:
41     virtual ~DCReceptor();
42
43     DCAxonTerminal*     getTarget() const;
44     DCCell*             getOwnerCell() const;
45     DCVComponent*       getVComponent() const;
46     void                getViewReceptorOffsetPoint(float dx, float dy, float dz,float *x, float *y, float *z) const;
47     bool                getIsTerminalVisible() const { return d_isTerminalVisible; }
48     bool                hasEditCursor() const { return d_editCursor != 0; }
49     DCVCEditModeCursor* getEditCursor() const { return d_editCursor; }
50
51     void                setTerminalVisible(bool visible) { d_isTerminalVisible = visible; }
52     void                setEditingCursorViewMatrix(const float matrix[]);
53
54     void                registerEditCursor(DCVCEditModeCursor *cursor);
55     void                unregisterEditCursor();
56
57 };
58
59 #endif // DCRECEPTOR_H