gCAD3D 2.35
xa_brw.c File Reference

Object-Browser. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_txt.h"
#include "../ut/ut_os.h"
#include "../ut/ut_cast.h"
#include "../ut/ut_txTab.h"
#include "../gui/gui__.h"
#include "../db/ut_DB.h"
#include "../ut/func_types.h"
#include "../xa/xa_brw.h"
#include "../xa/xa.h"
#include "../xa/xa_ico.h"
#include "../xa/xa_mem.h"
#include "../ut/ut_memTab.h"
#include "../xa/xa_ed_mem.h"

Functions

int Brw_sMdl_ren_CB (char *smNam)
 
int Brw_sMdl_ren__ ()
 
int Brw_sMdl_del_CB (MemObj *mo, void **data)
 ===================================================================== More...
 
int Brw_sMdl_del__ ()
 
int Brw_Mdl_init ()
 
char * Brw_getTxt ()
 
int Brw_getAux ()
 
int Brw_CB_sel (MemObj *mo, void **data)
 
int Brw_Clear ()
 
int Brw_Mdl_del_sm (char *txt)
 
int Brw_Mdl_upd ()
 
int Brw_Prcs_Init ()
 
int Brw_Prcs_add (char *pNam)
 
int Brw_Prcs_upd (char *pNam, int mode)
 
int Brw_Prcs_del (char *pNam)
 
int Brw_sMdl_Init ()
 
int Brw_Mdl_createRow (TreeNode *chdNd, char *mdlNam)
 
int Brw_Mod_add (char *mdlNam)
 
int Brw_objRow_upd (int typ, long ind)
 
int Brw_typeRow_upd (int *bti, TreeNode *itTr, int typ, TreeNode *parNd)
 
int Brw_typeRow_sel (char *txt)
 
int Brw_typeRow_open (int typ)
 
int Brw_objRow_add (int typ, long dbi, int ico)
 
int Brw_load_object1 (int typ, long ind, int ico)
 
int Brw_hili_dli (long dli)
 
int Brw_close_typeRows (TreeNode *parNd)
 
int Brw_childs_passive (TreeNode *parNd)
 
int Brw_Mod_is_main_active ()
 
int Brw_sMdl_act (char *mdlNam)
 
int Brw_unselect_all ()
 
int Brw_obj_mod (int typ, long dbi, int mode)
 
int Brw_obj_upd (int typ, long dbi, int mode)
 

Variables

MemObj winBrw
 
int winBrStat
 
static TreeNode mdlNod
 
static TreeNode topNod
 
static TreeNode actNod
 
static int rowAux
 
static char rowTxt [256]
 
static char * typTxt []
 
static int Brw_ope =1
 

Detailed Description

Object-Browser.

=====================================================
List_functions_start:
Brw_load_object1 add objRow to actNod
Brw_typeRow_sel open or close TypeRow
Brw_typeRow_open add objects to objectRow
Brw_typeRow_upd update a typeRow
Brw_objRow_upd update active obj's
Brw_load_object1 create a objectRow
Brw_close_typeRows remove all childs of typeRows
Brw_childs_passive make all childs passive
Brw_chg_mdl activate subModel in Browser
Brw_obj_upd update object-row (active or deleted)
Brw_obj_mod modify object-row (active or deleted)
Brw_Mdl_init create primary model & all subModels
Brw_sMdl_Init create all subModelNodes from Mod.lst
Brw_Mdl_upd update active model mdlNod
Brw_sMdl_act activate subModel in Browser
Brw_Mod_add add subModelRow
Brw_Mdl_createRow create new (sub)ModelRow
Brw_sMdl_ren_CB rename the active mdlNod to <smNam>
Brw_sMdl_ren__ rename the active mdlNod
Brw_sMdl_del_CB
Brw_sMdl_del__ delete model in browserWin
Brw_Mod_is_main_active test is mainModel is active
Brw_CB_sel callback tree-obj-selection
// Brw_CB_mouse callback-function mousebutton
Brw_CB_key callback-function keyIn NOT ACTIVE
Brw_Init create Window
Brw_Clear clear window
Brw_hili_dli hilite row (CB M1-selection in GR-Win)
Brw_unselect_all unselect all
Brw_getAux return rowAux;
Brw_getTxt return text of active row;
List_functions_end:
=====================================================

Function Documentation

int Brw_sMdl_ren_CB ( char *  smNam)

rename the active mdlNod to <smNam>

int Brw_sMdl_ren__ ( )

rename the active mdlNod to <smNam>

int Brw_sMdl_del_CB ( MemObj mo,
void **  data 
)

=====================================================================

=====================================================================

int Brw_sMdl_del__ ( )

delete model in browserWin

int Brw_Mdl_init ( )

create primary model & all subModels

char* Brw_getTxt ( )

Brw_getTxt return text of active row;

int Brw_getAux ( )
int Brw_CB_sel ( MemObj mo,
void **  data 
)
callback tree-obj-selection
Input:
data pointer to winBrw
see also UI_mcl_CBL
int Brw_Clear ( )
int Brw_Mdl_del_sm ( char *  txt)
int Brw_Mdl_upd ( )
mainNode: clear tree and update;
else update tree.
Input:
parNd mainNode or parentNode to be updated.
int Brw_Prcs_Init ( )

create all processes

int Brw_Prcs_add ( char *  pNam)
int Brw_Prcs_upd ( char *  pNam,
int  mode 
)
int Brw_Prcs_del ( char *  pNam)
int Brw_sMdl_Init ( )

create all subModelNodes from Mod.lst

int Brw_Mdl_createRow ( TreeNode chdNd,
char *  mdlNam 
)

create new (sub)ModelRow

int Brw_Mod_add ( char *  mdlNam)

see also Brw_sMdl_act

int Brw_objRow_upd ( int  typ,
long  ind 
)
update a objRow (add obj to row; create row if it does not exist)
test if typeRow expanded
if yes: create new objRow;
if not: do nothing ..
int Brw_typeRow_upd ( int *  bti,
TreeNode itTr,
int  typ,
TreeNode parNd 
)
update a TypeRow
- create row if it does not exist
- fix nr of objs for this typ.
Input:
parNd parent-node (model)
Output:
bti index into typTxt, equals enums TT_* and ICO_*
itTr typeRow
RetCod -1 row has been removed !
-2 error
int Brw_typeRow_sel ( char *  txt)
open or close TypeRow
open row: create & display objectRows;
close row: remove objectRows;
int Brw_typeRow_open ( int  typ)
open (expand) a typeRow; create all objs for this type.
the node of the typeRow = actNod = Input !
int Brw_objRow_add ( int  typ,
long  dbi,
int  ico 
)

add objRow to actNod Input: mode 0=active, -1=deleted

int Brw_load_object1 ( int  typ,
long  ind,
int  ico 
)

add objRow to actNod

int Brw_hili_dli ( long  dli)
Brw_hili_dli hilite row (CB M1-selection in GR-Win)
see also Brw_objRow_upd !
int Brw_close_typeRows ( TreeNode parNd)
remove all childs of typeRows != "Models"
loop tru all childs of parNd; get its text; if it is "Models": continue;
else remove all childs of this node !
int Brw_childs_passive ( TreeNode parNd)

make parents-childs !=models passive, "M"-nodes normal.

int Brw_Mod_is_main_active ( )
int Brw_sMdl_act ( char *  mdlNam)
activate subModel in Browser
add SM if it does not exist
int Brw_unselect_all ( )
int Brw_obj_mod ( int  typ,
long  dbi,
int  mode 
)
int Brw_obj_upd ( int  typ,
long  dbi,
int  mode 
)

Variable Documentation

MemObj winBrw
int winBrStat
TreeNode mdlNod
static
TreeNode topNod
static
TreeNode actNod
static
int rowAux
static
char rowTxt[256]
static
char* typTxt[]
static
Initial value:
={
"Values ","Vectors ","Points ", "Lines ", "Circles ",
"Curves ","Planes ", "Surfaces ","Solids ", "Notes ",
"Models ","Models ", "Models ", "Models "
}
int Brw_ope =1
static