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