File: Editor.h

package info (click to toggle)
pymol 3.1.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 74,084 kB
  • sloc: cpp: 482,660; python: 89,328; ansic: 29,512; javascript: 6,792; sh: 84; makefile: 25
file content (108 lines) | stat: -rw-r--r-- 4,138 bytes parent folder | download
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

/* 
A* -------------------------------------------------------------------
B* This file contains source code for the PyMOL computer program
C* copyright 1998-2000 by Warren Lyford Delano of DeLano Scientific. 
D* -------------------------------------------------------------------
E* It is unlawful to modify or remove this copyright notice.
F* -------------------------------------------------------------------
G* Please see the accompanying LICENSE file for further information. 
H* -------------------------------------------------------------------
I* Additional authors of this source file include:
-* 
-* 
-*
Z* -------------------------------------------------------------------
*/
#ifndef _H_Editor
#define _H_Editor

#include "pymol/math_defines.h"
#include "Result.h"
#include "P.h"

namespace pymol
{
    struct CObject;
}
struct ObjectMolecule;

#define cEditorSele1 "pk1"
#define cEditorSele2 "pk2"
#define cEditorSele3 "pk3"
#define cEditorSele4 "pk4"
#define cEditorFragPref "_pkfrag"
#define cEditorBasePref "_pkbase"
#define cEditorSet    "pkset"
#define cEditorBond   "pkbond"
#define cEditorRes    "pkresi"
#define cEditorChain  "pkchain"
#define cEditorObject "pkobject"
#define cEditorComp   "pkmol"
#define cEditorLink   "pkfrag"
#define cEditorDihedral "_pkdihe"
#define cEditorDihe1    "_pkdihe1"
#define cEditorDihe2    "_pkdihe2"
#define cEditorDrag    "_drag"
#define cEditorMeasure "_auto_measure"

#define EDITOR_SCHEME_OBJ 1
#define EDITOR_SCHEME_FRAG 2
#define EDITOR_SCHEME_DRAG 3

int EditorInit(PyMOLGlobals * G);
int EditorActive(PyMOLGlobals * G);
void EditorRender(PyMOLGlobals * G, int state);
int EditorLogState(PyMOLGlobals * G, int pkresi);
void EditorFavorOrigin(PyMOLGlobals * G, float *v1);

void EditorFree(PyMOLGlobals * G);
void EditorSetDrag(PyMOLGlobals * G, pymol::CObject * obj, int sele, int quiet,
                   int state);
void EditorReadyDrag(PyMOLGlobals * G, int state);
void EditorPrepareDrag(PyMOLGlobals * G, pymol::CObject * obj, int sele, int index,
                       int state, int mode);
int EditorDraggingObjectMatrix(PyMOLGlobals *G);
void EditorDrag(PyMOLGlobals * G, pymol::CObject * obj, int index, int mode, int state,
                float *pt, float *mov, float *z_dir);

void EditorActivate(PyMOLGlobals * G, int state, int enable_bond);
pymol::CObject* EditorDragObject(PyMOLGlobals* G);
pymol::Result<> EditorReplace(PyMOLGlobals* G, const char* elem, int geom,
    int valence, const char* name = "", int quiet = 1);
pymol::Result<> EditorAttach(PyMOLGlobals* G, const char* elem, int geom,
    int valence, const char* name, int quiet = true);
pymol::Result<> EditorRemove(
    PyMOLGlobals* G, int hydrogen = true, int quiet = true);
pymol::Result<> EditorHFill(PyMOLGlobals * G, int quiet=1);
pymol::Result<> EditorHFix(
    PyMOLGlobals* G, const char* sele = "", int quiet = true);
pymol::Result<> EditorCycleValence(PyMOLGlobals * G, int quiet=1);
void EditorInactivate(PyMOLGlobals * G);

int EditorIsAnActiveObject(PyMOLGlobals * G, ObjectMolecule * obj);

pymol::Result<> EditorSelect(PyMOLGlobals* G, const char* s0 = "",
    const char* s1 = "none", const char* s2 = "none", const char* s3 = "none",
    int pkresi = false, int pkbond = true, int quiet = true);
pymol::Result<> EditorTorsion(PyMOLGlobals * G, float angle);
pymol::Result<> EditorInvert(PyMOLGlobals* G, int quiet = true);

PyObject *EditorAsPyList(PyMOLGlobals * G);
int EditorFromPyList(PyMOLGlobals * G, PyObject * list);
void EditorGetNextMultiatom(PyMOLGlobals * G, char *name);
int EditorGetSinglePicked(PyMOLGlobals * G, char *name);
int EditorIsBondMode(PyMOLGlobals * G);
int EditorDeselectIfSelected(PyMOLGlobals * G, ObjectMolecule * obj, int index,
                             int update);
void EditorDefineExtraPks(PyMOLGlobals * G);
int EditorGetNFrag(PyMOLGlobals * G);
void EditorUpdate(PyMOLGlobals * G);
void EditorMouseInvalid(PyMOLGlobals * G);
int EditorGetScheme(PyMOLGlobals * G);
void EditorDihedralInvalid(PyMOLGlobals * G, ObjectMolecule * obj);

void EditorInvalidateShaderCGO(PyMOLGlobals * G);
void EditorRemoveStale(PyMOLGlobals* G);

#endif