ROOT_Application
2.0
C++ Core modules and GUIStock
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src_gui_root
ObjectStock
EditorObjStock.h
Go to the documentation of this file.
1
7
// not so clear seems that Editor
8
// store static temporary values when drawing it, no used for this
9
// for moving the object also ? not used for this
10
11
// in fact 2 different functions / roles, better to split
12
// declare types for helping to draw line and set move
13
// use global data, for kTranslate, kMove, GetSelect Support and Tendanc, Fibo...
14
15
// seems better implemented as namespace
16
// http://stackoverflow.com/questions/5793334/c-static-vs-namespace-vs-singleton
17
// if never need to derive from it !
18
19
// inline seems very important with namespace
20
// to avoid multiple definition
21
//http://stackoverflow.com/questions/7099947/namespace-either-undefined-or-redefined-why
22
23
#ifndef _EDITOROBJSTOCK_H_
24
#define _EDITOROBJSTOCK_H_
25
26
#include <iostream>
27
28
//can use forwarded with c++11 enum
29
// could include directly here, import TypeLine (segment)
30
#include "
TypeObjectLine.h
"
31
42
namespace
EditorObjStock {
43
44
// should be in unamed namespace ? works without
45
// strange error of compilation -fPIC missing to create the library ??
46
// namespace {
48
extern
TypeLine
fEditorModeObjStock
;
49
50
//boolean for Anchor, anchor selected by GUIMAinFrame, good use of static
51
extern
bool
kAnchor
;
52
extern
bool
kTranslate
;
53
extern
bool
kRotate
;
54
//} // anonymous
55
56
// cannot be static and const, no object, used ??
57
inline
TypeLine
GetMode
() {
return
fEditorModeObjStock
;}
58
void
SetMode
( std::string mode );
59
60
inline
bool
GetAnchor
() {
return
kAnchor
;}
61
inline
void
SetAnchor
(
bool
kbool ) { kbool ? (
kAnchor
=
true
) : (kAnchor=
false
);}
62
63
inline
bool
GetTranslate
() {
return
kTranslate
; }
64
inline
bool
GetRotate
() {
return
kRotate
; }
65
66
// switch on/off ( when key is pressed ), assert maximum one is on
67
inline
void
SetTranslate
() {
kTranslate
? (
kTranslate
=
false
) : (kTranslate=
true
);
68
kRotate
=
false
;}
69
inline
void
SetRotate
() {
kRotate
? (
kRotate
=
false
) : (kRotate=
true
);
70
kTranslate
=
false
;}
71
}
72
73
#endif // _EDITOROBJSTOCK_H_
EditorObjStock::GetTranslate
bool GetTranslate()
Definition:
EditorObjStock.h:63
EditorObjStock::GetMode
TypeLine GetMode()
Definition:
EditorObjStock.h:57
EditorObjStock::GetAnchor
bool GetAnchor()
Definition:
EditorObjStock.h:60
EditorObjStock::kTranslate
bool kTranslate
Definition:
EditorObjStock.cxx:18
EditorObjStock::SetRotate
void SetRotate()
Definition:
EditorObjStock.h:69
EditorObjStock::SetAnchor
void SetAnchor(bool kbool)
Definition:
EditorObjStock.h:61
EditorObjStock::fEditorModeObjStock
TypeLine fEditorModeObjStock
defined in TypeObjectLine segment, half-segment.
Definition:
EditorObjStock.cxx:16
TypeObjectLine.h
EditorObjStock::kRotate
bool kRotate
Definition:
EditorObjStock.cxx:19
EditorObjStock::SetMode
void SetMode(std::string mode)
Definition:
EditorObjStock.cxx:23
EditorObjStock::kAnchor
bool kAnchor
Definition:
EditorObjStock.cxx:17
TypeLine
TypeLine
c++ 11 style, used by both EditorObjectStock and ObjectLine cannot make dictionary with enum class ! ...
Definition:
TypeObjectLine.h:25
EditorObjStock::GetRotate
bool GetRotate()
Definition:
EditorObjStock.h:64
EditorObjStock::SetTranslate
void SetTranslate()
Definition:
EditorObjStock.h:67
Generated on Mon May 25 2015 20:35:30 for ROOT_Application by
1.8.6