BRL-CAD
Loading...
Searching...
No Matches
setup.h
Go to the documentation of this file.
1/* T C L C A D / S E T U P . H
2 * BRL-CAD
3 *
4 * Copyright (c) 2004-2026 United States Government as represented by
5 * the U.S. Army Research Laboratory.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * version 2.1 as published by the Free Software Foundation.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this file; see the file named COPYING for more
18 * information.
19 */
20/** @addtogroup libtclcad */
21/** @{ */
22/** @file tclcad/setup.h
23 *
24 * @brief
25 * Setup header file for the BRL-CAD TclCAD Library, LIBTCLCAD.
26 *
27 */
28
29#ifndef TCLCAD_SETUP_H
30#define TCLCAD_SETUP_H
31
32#include "common.h"
33#include "bu/cmd.h"
34#include "bu/process.h"
35#include "tcl.h"
36#include "dm.h"
37#include "tclcad/defines.h"
38
40
45
46/**
47 * Allows LIBRT to be dynamically loaded to a vanilla tclsh/wish with
48 * "load /usr/brlcad/lib/libbu.so"
49 * "load /usr/brlcad/lib/libbn.so"
50 * "load /usr/brlcad/lib/librt.so"
51 */
52TCLCAD_EXPORT extern int Rt_Init(Tcl_Interp *interp);
53TCLCAD_EXPORT extern int Bu_Init(Tcl_Interp *interp);
54TCLCAD_EXPORT extern int Bn_Init(Tcl_Interp *interp);
55TCLCAD_EXPORT extern int Dm_Init(Tcl_Interp *interp);
56TCLCAD_EXPORT extern int Dmo_Init(Tcl_Interp *interp);
57TCLCAD_EXPORT extern int Fbo_Init(Tcl_Interp *interp);
58TCLCAD_EXPORT extern int Ged_Init(Tcl_Interp *interp);
59
60
61/* defined in cmdhist_obj.c */
62TCLCAD_EXPORT extern int Cho_Init(Tcl_Interp *interp);
63
64/**
65 * Open a command history object.
66 *
67 * USAGE:
68 * ch_open name
69 */
70TCLCAD_EXPORT extern int cho_open_tcl(ClientData clientData, Tcl_Interp *interp, int argc, const char **argv);
71
72
73/**
74 * This is a convenience routine for registering an array of commands
75 * with a Tcl interpreter. Note - this is not intended for use by
76 * commands with associated state (i.e. ClientData). The interp is
77 * passed to the bu_cmdtab function as clientdata instead of the
78 * bu_cmdtab entry.
79 *
80 * @param interp - Tcl interpreter wherein to register the commands
81 * @param cmds - commands and related function pointers
82 */
83TCLCAD_EXPORT extern void tclcad_register_cmds(Tcl_Interp *interp, struct bu_cmdtab *cmds);
84
85
86/**
87 * Set the variables "argc" and "argv" in interp.
88 */
89TCLCAD_EXPORT extern void tclcad_set_argv(Tcl_Interp *interp, int argc, const char **argv);
90
91/**
92 * This is the "all-in-one" initialization intended for use by
93 * applications that are providing a Tcl_Interp and want to initialize
94 * all of the BRL-CAD Tcl/Tk interfaces.
95 *
96 * libbu, libbn, librt, libged, and Itcl are always initialized.
97 *
98 * To initialize graphical elements (Tk/Itk), set init_gui to 1.
99 */
100TCLCAD_EXPORT extern int tclcad_init(Tcl_Interp *interp, int init_gui, struct bu_vls *tlog);
101
103
104#endif /* TCLCAD_SETUP_H */
105
106/** @} */
107/*
108 * Local Variables:
109 * mode: C
110 * tab-width: 8
111 * indent-tabs-mode: t
112 * c-file-style: "stroustrup"
113 * End:
114 * ex: shiftwidth=4 tabstop=8
115 */
Definition dvec.h:74
Header file for the BRL-CAD common definitions.
int Rt_Init(Tcl_Interp *interp)
int cho_open_tcl(ClientData clientData, Tcl_Interp *interp, int argc, const char **argv)
void tclcad_register_cmds(Tcl_Interp *interp, struct bu_cmdtab *cmds)
int Bu_Init(Tcl_Interp *interp)
int Dm_Init(Tcl_Interp *interp)
int tclcad_init(Tcl_Interp *interp, int init_gui, struct bu_vls *tlog)
void tclcad_bn_setup(Tcl_Interp *interp)
void tclcad_tcl_library(Tcl_Interp *interp)
int Ged_Init(Tcl_Interp *interp)
int tclcad_tk_setup(Tcl_Interp *interp)
void tclcad_auto_path(Tcl_Interp *interp)
int Dmo_Init(Tcl_Interp *interp)
int Cho_Init(Tcl_Interp *interp)
int Fbo_Init(Tcl_Interp *interp)
void tclcad_set_argv(Tcl_Interp *interp, int argc, const char **argv)
int Bn_Init(Tcl_Interp *interp)
Definition vls.h:53
Definitions header file for the BRL-CAD TclCAD Library, LIBTCLCAD.