NEURON
settext.cpp
Go to the documentation of this file.
1
#include <../../nrnconf.h>
2
#include "
hoc.h
"
3
#define Ret(a) \
4
hoc_ret(); \
5
hoc_pushx(a);
6
7
#include "
gui-redirect.h
"
8
extern
Object
** (*nrnpy_gui_helper_)(
const
char
*
name
,
Object
* obj);
9
extern
double (*
nrnpy_object_to_double_
)(
Object
*);
10
11
int
newstyle
;
12
unsigned
int
text_style
= 0,
text_size
= 1,
text_orient
= 0;
13
14
void
hoc_settext
(
void
) {
15
TRY_GUI_REDIRECT_DOUBLE
(
"settext"
,
NULL
);
16
if
(!
ifarg
(1)) {
17
text_style
= 0;
18
text_size
= 1;
19
text_orient
= 0;
20
}
else
if
(
ifarg
(3)) {
21
text_size
= *
getarg
(1);
22
text_style
= *
getarg
(2);
23
text_orient
= *
getarg
(3);
24
}
else
if
(
ifarg
(2)) {
25
text_size
= *
getarg
(1);
26
text_style
= *
getarg
(2);
27
}
else
if
(
ifarg
(1)) {
28
text_size
= *
getarg
(1);
29
}
30
if
(
text_style
< 1)
31
text_style
= 1;
32
if
(
text_style
> 4)
33
text_style
= 0;
34
if
(
text_orient
> 1)
35
text_orient
= 0;
36
newstyle
= 1;
37
Ret
(1.);
38
}
gui-redirect.h
TRY_GUI_REDIRECT_DOUBLE
#define TRY_GUI_REDIRECT_DOUBLE(name, obj)
Definition:
gui-redirect.h:58
hoc.h
getarg
#define getarg
Definition:
hocdec.h:15
ifarg
int ifarg(int)
Definition:
code.cpp:1581
name
char * name
Definition:
init.cpp:16
Ret
#define Ret(a)
Definition:
settext.cpp:3
text_size
unsigned int text_size
Definition:
settext.cpp:12
hoc_settext
void hoc_settext(void)
Definition:
settext.cpp:14
text_style
unsigned int text_style
Definition:
settext.cpp:12
nrnpy_object_to_double_
double(* nrnpy_object_to_double_)(Object *)
Definition:
xmenu.cpp:14
text_orient
unsigned int text_orient
Definition:
settext.cpp:12
newstyle
int newstyle
Definition:
settext.cpp:11
NULL
#define NULL
Definition:
sptree.h:16
Object
Definition:
hocdec.h:227
src
oc
settext.cpp